GNOME Bugzilla – Bug 740961
avidemux doesn't set PTS on keyframes when operating in push mode
Last modified: 2018-11-03 14:56:23 UTC
1.pull mode(PTS written on KF): gst-launch-1.0 -v filesrc location='/tmp/xvid_packed_AS.avi' !avidemux!fakesink silent=false /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (2486 bytes, dts: 0:00:00.000000000, pts: 0:00:00.000000000, duration: 0:00:00.040000000, offset: 0, offset_end: 1, flags: 00000040 discont ) 0x76b02840 /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (125 bytes, dts: 0:00:00.040000000, pts: none, duration: 0:00:00.040000000, offset: 1, offset_end: 2, flags: 00002000 delta-unit ) 0x76b02a20 .... /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (6576 bytes, dts: 0:00:04.400000000, pts: none, duration: 0:00:00.040000000, offset: 110, offset_end: 111, flags: 00002000 delta-unit ) 0x76b02c00 /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (25142 bytes, dts: 0:00:04.440000000, pts: 0:00:04.440000000, duration: 0:00:00.040000000, offset: 111, offset_end: 112, flags: 00000000 ) 0x76b02d40 2.push mode(PTS not written on KF): gst-launch-1.0 -v souphttpsrc location='https://dl.dropboxusercontent.com/u/38760017/xvid_packed_AS.avi' !queue2!avidemux!fakesink silent=false /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (2486 bytes, dts: 0:00:00.000000000, pts: none, duration: 0:00:00.040000000, offset: 0, offset_end: 1, flags: 00004040 discont tag-memory ) 0x75b02140 /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (125 bytes, dts: 0:00:00.040000000, pts: none, duration: 0:00:00.040000000, offset: 1, offset_end: 2, flags: 00004000 tag-memory ) 0x75b02000 .... /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (6576 bytes, dts: 0:00:04.400000000, pts: none, duration: 0:00:00.040000000, offset: 110, offset_end: 111, flags: 00000000 ) 0x74933a30 /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (25142 bytes, dts: 0:00:04.440000000, pts: none, duration: 0:00:00.040000000, offset: 111, offset_end: 112, flags: 00000000 ) 0x75c02320 Our HW decoder expects PTS to be written on keyframes when dealing with mpeg4 part2 codecs, but when avidemux operates in PUSH mode, there is no PTS available so playback doesn't work.
I just found the same issue on a file of mine, I've uploaded it here: http://absolut.zogzog.org/goinfre/share/samples/avi/La%20Strat%c3%a9gie%20De%20L%27%c3%a9chec.avi There's a jump from 0:00:01.000000000 to 0:00:02.320000000, in push mode there's only DTS set so the timestamps are lost after decode, and audio/video sync is lost.
This seems to be due to having no index in push mode. The PTS is set on keyframes in pull mode, and whether a frame is a keyframe or not seems determined by the index, rather than the frame itself. So it'd need using the index in push mode. Not sure why it's ignored in push mode. It might be just because there's no code for it, or because it's not streamable easily.
The index seems to be at the end, at least on this file. And there doesn't seem to be a way to get keyframeness of a video frame.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/145.