GNOME Bugzilla – Bug 602790
New oggdemux parsers break theora/vorbis playback
Last modified: 2009-11-27 07:38:59 UTC
With the new oggdemuxer parsers in place, playback of plain ogg/vorbis files (at least) is completely broken, with choppy audio. Example output from vorbisdec: /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 4608 bytes, timestamp: 0:00:00.005804988, duration: 0:00:00.013061224, offset: 255, offset_end: 831, flags: 32) 0x94e5c00" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 8192 bytes, timestamp: 0:00:00.039183673, duration: 0:00:00.023219954, offset: 1727, offset_end: 2751, flags: 0) 0x94e5ca0" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 8192 bytes, timestamp: 0:00:00.062403628, duration: 0:00:00.023219954, offset: 2751, offset_end: 3775, flags: 0) 0x94e5d40" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 8192 bytes, timestamp: 0:00:00.085623582, duration: 0:00:00.023219954, offset: 3775, offset_end: 4799, flags: 0) 0x94e5de0" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 8192 bytes, timestamp: 0:00:00.108843537, duration: 0:00:00.023219954, offset: 4799, offset_end: 5823, flags: 0) 0x94e5d90" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 8192 bytes, timestamp: 0:00:00.132063492, duration: 0:00:00.023219954, offset: 5823, offset_end: 6847, flags: 0) 0x94e5cf0" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 8192 bytes, timestamp: 0:00:00.155283446, duration: 0:00:00.023219954, offset: 6847, offset_end: 7871, flags: 0) 0x94e5c50" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 8192 bytes, timestamp: 0:00:00.178503401, duration: 0:00:00.023219954, offset: 7871, offset_end: 8895, flags: 0) 0x94e5b90" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 8192 bytes, timestamp: 0:00:00.201723356, duration: 0:00:00.023219954, offset: 8895, offset_end: 9919, flags: 0) 0x94e5af0" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 8192 bytes, timestamp: 0:00:00.224943310, duration: 0:00:00.023219954, offset: 9919, offset_end: 10943, flags: 0) 0x94e5aa0" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 8192 bytes, timestamp: 0:00:00.248163265, duration: 0:00:00.023219954, offset: 10943, offset_end: 11967, flags: 0) 0x94e59b0" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 8192 bytes, timestamp: 0:00:00.271383219, duration: 0:00:00.023219954, offset: 11967, offset_end: 12991, flags: 0) 0x94e5910" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 8192 bytes, timestamp: 0:00:00.268480725, duration: 0:00:00.023219955, offset: 11840, offset_end: 12864, flags: 0) 0x94e5870" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 8192 bytes, timestamp: 0:00:00.314920634, duration: 0:00:00.023219954, offset: 13887, offset_end: 14911, flags: 0) 0x94e58c0" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 8192 bytes, timestamp: 0:00:00.338140589, duration: 0:00:00.023219954, offset: 14911, offset_end: 15935, flags: 0) 0x94e5960" /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < ( 8192 bytes, timestamp: 0:00:00.361360544, duration: 0:00:00.023219954, offset: 15935, offset_end: 16959, flags: 0) 0x94e5a00" Commenting out the part of oggdemux that applies timestamps to outgoing buffers, to restore the vorbisdec interpretation and interpolation of granulepos fixes it.
commit 78aad52cbff7af9ac94f01d9bbb27f60efc7fa5e Author: David Schleef <ds@schleef.org> Date: Tue Nov 24 21:22:03 2009 -0800 oggdemux: Fix vorbis parsing Add a granule to granulepos conversion function. Fix the duration function for vorbis. Handle timestamps on header packets differently and be more careful about calculating OFFSET and OFFSET_END. After this change, timestamps for vorbis don't exactly match up with the timestamps that vorbisparse outputs, but it's unclear if vorbisparse is actually correct and it would add a lot more code to make oggdemux match vorbisparse. Fixes #602790.
I am still having troubles with at least one Ogg/Vorbis/Theora video - choppy playback, and the sink complaining about late arrival all the time. I haven't had time to investigate it further - but might later today.
It seems ok now for vorbis though, btw
Please attach and/or link to anything that is still not working.
Created attachment 148492 [details] broken file The attached file used to play fine, but is busted now. However, oggz-validate says that it's broken in many places. I *think* I created it with GStreamer, in which case it is probably from the old bustified oggmux. Only attaching it because it used to play well, which implies that the new system is somehow less forgiving of problem files.
It's an old-style Ogg/Theora file that has a granulepos of 0:0 on the first frame. There might be other problems with it, but it's definitely a file we should play. Fixed: commit d2c9d7fc1c21cedeb98d4a5f6f73653032866ec7 Author: David Schleef <ds@schleef.org> Date: Wed Nov 25 17:04:41 2009 -0800 oggdemux: handle theora streams with 0 keyoffset After this commit, it appears all the Ogg files on samples.mplayerhq.hu that aren't completely broken play correctly.
David, then there's still bug #602954 where it fails to find any chains in the Ogg file.