GNOME Bugzilla – Bug 736190
avidemux output invalid pts
Last modified: 2014-09-12 11:26:20 UTC
please try this pipeline: gst-launch-1.0 videotestsrc num-buffers=1000 ! avenc_mpeg4 ! avimux ! filesink location=/tmp/test.avi and then: gst-launch-1.0 filesrc location= /tmp/test.avi ! avidemux ! matroskamux ! filesink location=/tmp/test.mkv test.mkv is much smaller than test.avi matroskamux drop a lot of buffers with warnings like this: matroskamux matroska-mux.c:3268:gst_matroska_mux_write_data:<matroskamux0:video_0> Invalid buffer timestamp; dropping buffer if you try: gst-launch-1.0 -v filesrc location= /tmp/test.avi ! avidemux ! fakesink silent=false you can see that avidemux output buffers with dts not none and pts none, for example: /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (3836 bytes, dts: 0:00:33.000000000, pts: 0:00:33.000000000, duration: 0:00:00.033333333, offset: 990, offset_end: 991, flags: 00000000 ) 0x7f5958003560 /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (1467 bytes, dts: 0:00:33.033333333, pts: none, duration: 0:00:00.033333333, offset: 991, offset_end: 992, flags: 00002000 delta-unit ) 0x7f5958003340 /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (1349 bytes, dts: 0:00:33.066666666, pts: none, duration: 0:00:00.033333334, offset: 992, offset_end: 993, flags: 00002000 delta-unit ) 0x7f5958003450 /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (1394 bytes, dts: 0:00:33.100000000, pts: none, duration: 0:00:00.033333333, offset: 993, offset_end: 994, flags: 00002000 delta-unit ) 0x7f5958003010 /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (1387 bytes, dts: 0:00:33.133333333, pts: none, duration: 0:00:00.033333333, offset: 994, offset_end: 995, flags: 00002000 delta-unit ) 0x7f5958003120 /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (1376 bytes, dts: 0:00:33.166666666, pts: none, duration: 0:00:00.033333334, offset: 995, offset_end: 996, flags: 00002000 delta-unit ) 0x7f5958003230 /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (1396 bytes, dts: 0:00:33.200000000, pts: none, duration: 0:00:00.033333333, offset: 996, offset_end: 997, flags: 00002000 delta-unit ) 0x7f5958003120 /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (1375 bytes, dts: 0:00:33.233333333, pts: none, duration: 0:00:00.033333333, offset: 997, offset_end: 998, flags: 00002000 delta-unit ) 0x7f5958003010 I can reproduce the same issue with generic avi files tested with 1.4 and git master, this is a regression, 0.10 works fine
the problem could be in avidemux here: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/gst/avi/gstavidemux.c#n5214 as you can see avidemux set pts none on all delta units or in matroskamux here: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/gst/matroska/matroska-mux.c#n3266 that consider only pts and not dts what should be fixed? 1) avidemux should set pts and dts 2) matroskamux should consider both pts and dts
Created attachment 285570 [details] [review] fix for avidemux
Created attachment 285572 [details] [review] fix for matroskamux
Comment on attachment 285570 [details] [review] fix for avidemux avidemux does not know about PTS.
What needs to be done is make parsers fix that up, see e.g. bug #659489.
ok, thanks what about the patch for matroskamux, is rejected too?
qtmux seems fine, so probably it use dts when pts is none
Comment on attachment 285572 [details] [review] fix for matroskamux Matroska must store the PTS, not the DTS. The parsers need to calculate the PTS for matroskamux to work, same story really.
*** This bug has been marked as a duplicate of bug 659489 ***