Commons talk:YouTube files

From Wikimedia Commons, the free media repository
Jump to: navigation, search

720p WebM[edit]

(copied from User_talk:Tbayer_(WMF)#YouTube_webm:)

I noticed File:WMF Monthly Metrics Meeting November 7, 2013.ogv in ogv and I see:

$ youtube-dl -F https://www.youtube.com/watch?v=YgXT3aA5CyE
[youtube] Setting language
[youtube] YgXT3aA5CyE: Downloading video webpage
[youtube] YgXT3aA5CyE: Downloading video info webpage
[youtube] YgXT3aA5CyE: Extracting video information
Available formats:
22      :       mp4     [720x1280]
43      :       webm    [360x640]
18      :       mp4     [360x640]
5       :       flv     [240x400]
36      :       3gp     [240x320]
17      :       3gp     [144x176]
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)

Too bad; does YouTube ever create webm derivatives at full resolution too? Do you know why they don't use their own preferred format webm for the videos they create themselves? --Nemo 11:43, 16 November 2013 (UTC)

(end of copied comment)

Yes, all the WebM files in Category:Video recordings from the WMF Metrics and Activities Meetings came directly from YouTube without conversion, and the August to October videos were all available in 720p when I transferred them. It looks like these 720p WebMs have been removed retroactively from YouTube, leaving only the MP4 version of the highest resolution. (However, per [1][2] it seems also possible that the 720p WebMs are still there, but are not detected - I checked with JDownloader 2 beta, youtube-dl and the bookmarklet.)
Regards, Tbayer (WMF) (talk) 03:34, 17 November 2013 (UTC)
(YouTube not accepting VP9-codec as upload option to their own servers and also not offering VP8 HD transcodes is some weird kind of irony, indeed....)
I guess there is nothing we can do except to hope that google publishes the WebM HD transcodes again. My (optimistic) guess would be that they are trying to convert all of their videos to VP9. However, I have stopped my activity to import CC-videos from youtube and created Category:Videos with missing WebM HD transcode on youtube in the meanwhile. --McZusatz (talk) 10:33, 17 November 2013 (UTC)
Seems like we get them back as 4K-VP9: http://news.cnet.com/8301-1023_3-57616481-93/youtube-2014-is-the-year-of-the-high-def-stream/ --McZusatz (talk) 22:54, 2 January 2014 (UTC)

bookmarklet[edit]

I tried the github b.let. Dl options appeared, got a name from the clipboard, but what happened after I o keyed? No indication if its slowly being uploaded to commons, or tried and failed to dl locally? Danny lost (talk) 23:31, 22 March 2014 (UTC)

It is only to download a video. (Use right click to download). --McZusatz (talk) 22:24, 23 March 2014 (UTC)

WebM transcoding[edit]

Now YouTube don't offer anymore good WebM versions, we must proceed differently. We have to download audio and mp4 video tracks separately, then start encoding in WebM:

format code extension resolution  note 
140         m4a       audio only  DASH audio , audio@128k (worst)
160         mp4       144p        DASH video , video only
133         mp4       240p        DASH video , video only
134         mp4       360p        DASH video , video only
135         mp4       480p        DASH video , video only
136         mp4       720p        DASH video , video only
137         mp4       1080p       DASH video , video only
17          3gp       176x144     
36          3gp       320x240     
5           flv       400x240     
43          webm      640x360     
18          mp4       640x360     
22          mp4       1280x720    (best)

We want tracks 140 (audio) and 137 (MP4 at 1080p)

$ youtube-dl -f 140 -o input.m4a https://www.youtube.com/...
$ youtube-dl -f 137 -o input.mp4 https://www.youtube.com/...

Then we run a two-pass encoding. For owners of an old CPU, we can replace the -deadline best option by -deadline good. According to the documentation, the quality is almost the same. Also consider replacing -threads 8 option by the number of cores available on your processor.

$ ffmpeg -i input.mp4 -i input.m4a -codec:v libvpx -deadline best -cpu-used 0 -qmin 10 -qmax 42 -maxrate 500k -bufsize 1000k -threads 8 -an -pass 1 -f webm -y /dev/null
$ ffmpeg -i input.mp4 -i input.m4a -codec:v libvpx -deadline best -cpu-used 0 -qmin 10 -qmax 42 -maxrate 500k -bufsize 1000k -threads 8 -codec:a libvorbis -b:a 128k -pass 2 -f webm output.webm

We now have a quality video in WebM format (ok, it will always be worse than the MP4 original version, but it's free :)

Okki (talk) 15:45, 22 April 2014 (UTC)

Thanks for this interesting information! If one chooses to upload as OGV instead of WebM, it's still possible to convert the full MP4 video (including audio) in one step using ffmpeg2theora. Regards, Tbayer (WMF) (talk) 18:39, 24 April 2014 (UTC)

Is there a WebM version?[edit]

I figured, since most readers don't have their computer set up to view Wikimedia videos, the caption of each video ought to include a link to a Youtube version which all home computers, smartphones or whatever, can see even if the owner doesn't know what a "file format" is. Which means, to convert the format, I ought to upload to Youtube first in whatever format my camera made, then download the WebM version which Wikimedia thinks is the best one, thus killing two birds with one stone. So, I signed on with my old Google account, and now my little video is [ here] oh, I'm not allowed to link to it. Always people smarter than me are finding ways to make things more difficult. Anyway, this being my first Youtube upload, I have no idea how to make it send me a WebM version. I'm beginning to suspect this path is leading into a dead end or at least a thicket, and figuring out how to convert the file on my own old Windows machine will be easier, but am I missing something fairly obvious that ought to be mentioned on this page? Jim.henderson (talk) 13:29, 1 May 2014 (UTC)

Report in Google Data APIs issue tracker[edit]

Regarding download issues, see also:

Issue 2945: Download of Creative Commons licensed videos from youtube (reported by Mathias Schindler from Wikimedia Germany in August 2012, not resolved yet)

Regards, Tbayer (WMF) (talk) 07:00, 12 August 2014 (UTC)

Template:YouTube CC-BY[edit]

YT videos using CC-BY-4.0 (not 3.0) exist, maybe {{YouTube CC-BY}} cited as {{YouTube}} on the project page, and the project page itself, need an update. I can't tell if they switched generally from 3.0 to 4.0 or offer a choice, my only example is File:All Writs Act.ogv. –Be..anyone (talk) 07:45, 6 December 2014 (UTC)