Page MenuHomePhabricator

Generation of a WebM video thumbnail on Commons broken
Closed, ResolvedPublic


On the creation of a thumbnail seems to be broken and the links to the thumbnails in other resolutions produce an error message.

Event Timeline

Pristurus raised the priority of this task from to Low.
Pristurus updated the task description. (Show Details)
Pristurus added a subscriber: Pristurus.
Aklapper renamed this task from Generation of a thumbnail broken to Generation of a WebM video thumbnail on Commons broken.Nov 1 2015, 4:45 PM
Aklapper set Security to None.
$:andre\> wget -vv 17:46:33--
Resolving (, 2620:0:862:ed1a::2:b
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 429 Too Many Requests
2015-11-01 17:47:17 ERROR 429: Too Many Requests.

It's a VP9-based file; so one possibility could be that thumbnailing servers have not (all?) received software updates for ffmpeg/libvpx/etc...

Ok, testing in isolation on a vagrant setup.... the thumbnailing via ffmpeg works, but can take like a full minute to create. o_O

If I'm reading output from mkvinfo correctly, it seems to have only 2 keyframes in the entire file -- so it's probably decoding half the file up to the midpoint to get the output frame. :(

Well it is transcoded from a lossless avi by ffmpeg (two pass transcoding) with ""ffmpeg.exe" -i infile -c:v libvpx-vp9 -pass 1 -aspect 16:9 -b:v 12000K -crf 10 -threads 8 -speed 4 -tile-columns 6 -frame-parallel 1 -an -f webm
ffmpeg.exe" -i infile -c:v libvpx-vp9 -pass 2 -b:v 12000K -crf 10 -aspect 16:9 -threads 8 -speed 2 -tile-columns 6 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -an -f webm outfile.webm"
I also used these settings on a few other but shorter (e.g. File:Trichterspinne mit Beute -2015-06-14.webm) uploads. In fact the creation of the thumbnail seems to take a significant longer time than using the vp8 codec.

@Pristurus ok I've found a couple other references to keyframe issues with ffmpeg vp9 output, and am seeing similar behavior on a couple of files I encoded myself as well. I'll try fiddling with the settings and see if I can resolve it by forcing more keyframes...

Note that the file also can't be seeked during playback due to the lack of keyframes. (If you get the vp8 or theora transcodes they seek fine, but the original doesn't)

Thanks for your examination of the problem. Yes, the seeking issue here is also reproducibly . I wish you success in solving the problem!

@Pristurus ok, adding '-g 128' into the ffmpeg command lines fixes both seeking and the thumbnail generation. This forces a keyframe every 128 frames, the same setting we use on our output files. I'm not quite sure why the default is 'no keyframes' ;) but this seems to help!

Fine! As far as I know this parameter is used to set the maximum interval between keyframes. So the real size of intervals will be different from this value. Why do you prefer a value of 128? I think it should depend on the framerate of the input video. Otherwise it will produce in a 60fps file a new keyframe after about 2 seconds and in a 24fps file after about 5 seconds (theoretical maximum).

That's just the value we happen to use, no idea if it was selected with any particular thought. Feel free to use any suitable value.

Okay I have uploaded a new version of the video and thumbnail is created now. Thanks for your help!

brion claimed this task.