On Wed, Feb 10, 2010 at 8:38 AM, Tim Starling tstarling@wikimedia.org wrote:
That sounds like it needs a one-line fix in OggHandler::normaliseParams(), not 50 lines of code and a new decoder. Do you have a test file or a bug report or something?
Just switching the thumbnailer should be sufficient, I agree the pile of code and the retries were fairly lame (and I think I complained about it on IRC). I'm not sure why any support for thumbnailing ogv's with ffmpeg was retained.
I don't see how you can fix it in normalizeParams call unless you've scanned the stream and know where the keyframes are. Ffmpeg could be fixed, of course, but the ogg demuxer basically needs a rewrite... I think the patch you did to ffmpeg a while back was a lot better than the code they ultimately included.
Here is a file that won't thumbnail under the current code: http://myrandomnode.dyndns.org:8080/~gmaxwell/theora/only_one_keyframe.ogv
ffmpeg -y -ss 5 -i only_one_keyframe.ogv -f mjpeg -an -vframes 1 foo.jpeg throws a pile of errors then foo.jpeg is a zero byte file.