Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: ducttape45
I checked out that video and there is no 1080p listed for it. It only goes as high as 720p.

It turns out that that YouTube video does have a 1080p version, as do many others. If you bring up the page and clck the gear icon in the player window, you will see a 1080p format listed. However, it turns out to be DASH format (Dynamic Adaptive Streaming over HTTP). That means the video and audio are separate streams and have to be downloaded separately and combined client-side. YouTube is in the process of converting over to the use of DASH. So, over time, more and more videos will have this issue.

The current crop of browser extensions are unable to perform the step of combining the video and audio. Hence, the problems. The current "fix" is to omit listing formats that are available only in DASH.

I did some googling around on this, and I found youtube-dl, a handy open-source command-line utility for video downloading. For instance, you can ask it to list the formats available for a particular YouTube (the -F option tells it to just list the available formats without downloading):

$ youtube-dl -F http://www.youtube.com/watch?v=cG1v1sghSeA
[youtube] Setting language
[youtube] cG1v1sghSeA: Downloading video webpage
[youtube] cG1v1sghSeA: Downloading video info webpage
[youtube] cG1v1sghSeA: Extracting video information
Available formats:
22	:	mp4	[720x1280]
18	:	mp4	[360x640]
43	:	webm	[360x640]
5	:	flv	[240x400]
36	:	3gp	[240x320]
17	:	3gp	[144x176]
137	:	mp4	[1080p] (DASH Video)
136	:	mp4	[720p] (DASH Video)
135	:	mp4	[480p] (DASH Video)
134	:	mp4	[360p] (DASH Video)
133	:	mp4	[240p] (DASH Video)
160	:	mp4	[192p] (DASH Video)
141	:	m4a	[256k] (DASH Audio)
140	:	m4a	[128k] (DASH Audio)
139	:	m4a	[48k] (DASH Audio)

The best normal format is #22, 720p (you can read about formats at YouTube's Wikipedia page).

But we see that 1080p is available as format 137. However, that's DASH, so that file will be video-only. We also have a choice of three DASH audio formats. We could go with 140 for decent quality, or we might choose to settle for 139, since this video is just an interview. Either way, we will have two files: a big fat 1080p video and a much smaller audio track.

So, we download the video and audio:

$ youtube-dl -f 137 -o video.mp4 http://www.youtube.com/watch?v=cG1v1sghSeA
[youtube] Setting language
[youtube] cG1v1sghSeA: Downloading video webpage
[youtube] cG1v1sghSeA: Downloading video info webpage
[youtube] cG1v1sghSeA: Extracting video information
[download] Destination: video.mp4
[download] 100% of 90.22MiB in 00:14
$ youtube-dl -f 140 -o video.m4a http://www.youtube.com/watch?v=cG1v1sghSeA
[youtube] Setting language
[youtube] cG1v1sghSeA: Downloading video webpage
[youtube] cG1v1sghSeA: Downloading video info webpage
[youtube] cG1v1sghSeA: Extracting video information
[download] Destination: video.m4a
[download] 100% of 5.51MiB in 00:00
$ ls -l video.*
-rw-r--r--  1 cynwoody  cynwoody   5772463 Nov 12 07:54 video.m4a
-rw-r--r--  1 cynwoody  cynwoody  94607399 Nov 12 07:51 video.mp4

Once we have the files downloaded, VLC can play them together. Use the Advanced Open dialog to select the video file (video.mp4), check the "Play another media synchronously" option and choose the audio file (video.m4a). This will play the video with sound. You can also check the Streaming/Saving box and direct VLC to save the combined stream to a third file, which will then play with sound when clicked.

Also, it's more than a bit obscure, but you can get VLC to do the combine step from the command line:

$ vlc -I dummy video.mp4 --input-slave video.m4a --sout file/ts:video-combined.mp4 vlc://quit
VLC media player 2.1.1 Rincewind (revision 2.1.1-0-g89db9aa)
[0x1006249e0] dummy interface: using the dummy interface module...
TagLib: MP4: No audio tracks
TagLib: MP4: No audio tracks
[0x1006250d0] idummy demux: command `quit'
$ ls -l video-combined.mp4 
-rw-r--r--  1 cynwoody  cynwoody  106098740 Nov 22 15:23 video-combined.mp4

The -I dummy option tells VLC not to show its normal GUI interface, and the vlc://quit reminds it to exit when it finishes the stream-combining operation.

The combined file plays with sound.

Rumor has it that ffmpeg can also do the combining step, perhaps more easily. But I haven't tried it yet.

53 posted on 11/22/2013 1:08:24 PM PST by cynwoody
[ Post Reply | Private Reply | To 44 | View Replies ]


To: cynwoody

Ah, this would explain why my temps have been spiking a bit more with YT lately....ty for the explanation. Saved me dragging the machine apart more often than needed, to be sure.


54 posted on 11/22/2013 2:58:44 PM PST by Fire_on_High (RIP City of Heroes and Paragon Studios, victim of the Obamaconomy.)
[ Post Reply | Private Reply | To 53 | View Replies ]

To: cynwoody
I guess my question to your post is; is that what caused me to not be able to download any videos?

I guess I am also wondering if this problem is caused by a bug in my system or if Youtube/Google caused it.

That’s what I need to find out. If I still have whatever caused the problem on my computer then I either need to find it a eradicate it, or reprogram it.

What’s your feeling?

Thanks for your help.

55 posted on 11/23/2013 3:22:04 PM PST by ducttape45
[ Post Reply | Private Reply | To 53 | View Replies ]

To: cynwoody
I guess my question to your post is; is that what caused me to not be able to download any videos?

I guess I am also wondering if this problem is caused by a bug in my system or if Youtube/Google caused it.

That’s what I need to find out. If I still have whatever caused the problem on my computer then I either need to find it a eradicate it, or reprogram it.

What’s your feeling?

Thanks for your help.

56 posted on 11/23/2013 3:33:21 PM PST by ducttape45
[ Post Reply | Private Reply | To 53 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson