After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 736190 - avidemux output invalid pts
avidemux output invalid pts
Status: RESOLVED DUPLICATE of bug 659489
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.x
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-06 14:41 UTC by Nicola
Modified: 2014-09-12 11:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix for avidemux (769 bytes, patch)
2014-09-06 14:55 UTC, Nicola
rejected Details | Review
fix for matroskamux (1.49 KB, patch)
2014-09-06 15:01 UTC, Nicola
rejected Details | Review

Description Nicola 2014-09-06 14:41:18 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
Comment 1 Nicola 2014-09-06 14:55:27 UTC
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
Comment 2 Nicola 2014-09-06 14:55:52 UTC
Created attachment 285570 [details] [review]
fix for avidemux
Comment 3 Nicola 2014-09-06 15:01:52 UTC
Created attachment 285572 [details] [review]
fix for matroskamux
Comment 4 Tim-Philipp Müller 2014-09-06 15:26:44 UTC
Comment on attachment 285570 [details] [review]
fix for avidemux

avidemux does not know about PTS.
Comment 5 Tim-Philipp Müller 2014-09-06 15:27:46 UTC
What needs to be done is make parsers fix that up, see e.g. bug #659489.
Comment 6 Nicola 2014-09-06 17:59:20 UTC
ok, thanks

what about the patch for matroskamux, is rejected too?
Comment 7 Nicola 2014-09-06 19:06:30 UTC
qtmux seems fine, so probably it use dts when pts is none
Comment 8 Sebastian Dröge (slomo) 2014-09-12 11:25:56 UTC
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.
Comment 9 Sebastian Dröge (slomo) 2014-09-12 11:26:20 UTC

*** This bug has been marked as a duplicate of bug 659489 ***