GNOME Bugzilla – Bug 735628
matroska: Looses dts in presence of b-frames h264 stream
Last modified: 2014-08-29 06:06:54 UTC
If I mux a matroska file using the following (note it's matroska with streamable=1 and h264 with b-frames): gst-launch-1.0 videotestsrc is-live=1 ! \ video/x-raw,width=1280,height=720,framerate=24/1 ! \ timeoverlay ! x264enc bitrate=4000 ! \ video/x-h264,profile=main ! \ queue ! \ mux. audiotestsrc is-live=1 wave=0 ! \ audio/x-raw,channels=2 ! \ faac ! \ queue ! \ mux. matroskamux name=mux streamable=true ! \ queue ! \ filesink location=test.mkv And later demux it with: gst-launch-1.0 filesrc location=test.mks ! matroskademux name=demux ! h264parse ! fakesink Only PTS is set, and the DTS is lost. This may result in choppy playback, or confuse other muxer when transmuxing.
Looks like in fact DTS/PTS support is to be implemented for this container ...
Ok, matroska does not support that, the solution seems to calculate DTS from PTS in h264parse. *** This bug has been marked as a duplicate of bug 659489 ***