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 789821 - vaapih264enc: Non-monotonous DTS in output stream
vaapih264enc: Non-monotonous DTS in output stream
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
1.12.2
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-11-02 14:48 UTC by blaxar.waldarax
Modified: 2017-12-06 06:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description blaxar.waldarax 2017-11-02 14:48:47 UTC
Using vaapih264enc gives erroneous DTS values, making the final mp4 file being played improperly in some non-linear video editors (like Final Cut Pro), with video-sound desync and/or black frames showing up.

A way to reproduce this is to run the following command:
gst-launch-1.0 videotestsrc num-buffers=250 ! vaapih264enc ! h264parse ! qtmux ! filesink location=test.mp4

Then try re-encoding the resulting file with ffmpeg:
ffmpeg -i ./test.mp4 -acodec copy -vcodec copy test-copy.mp4

Warnings of this kind will show up during the process (they do not show up using x264enc):

[mp4 @ 0xe557c0] Non-monotonous DTS in output stream 0:0; previous: 400, current: 400; changing to 401. This may result in incorrect timestamps in the output file.
[mp4 @ 0xe557c0] Non-monotonous DTS in output stream 0:0; previous: 12400, current: 12400; changing to 12401. This may result in incorrect timestamps in the output file.
[mp4 @ 0xe557c0] Non-monotonous DTS in output stream 0:0; previous: 24400, current: 24400; changing to 24401. This may result in incorrect timestamps in the output file.
[mp4 @ 0xe557c0] Non-monotonous DTS in output stream 0:0; previous: 36400, current: 36400; changing to 36401. This may result in incorrect timestamps in the output file.

[...]

Removing h264parse or using mp4mux instead of qtmux does not affect the output.
Comment 1 Víctor Manuel Jáquez Leal 2017-11-15 16:55:09 UTC
Hi. I can replicate the error using gstreamer-vaapi 1.12, but not current master.

Can you try with current master of gstreamer?

There is a good amount of work done for encoders in gstremaer-vaapi which cannot be easily backported to 1.12.
Comment 2 blaxar.waldarax 2017-11-27 14:19:23 UTC
Hi. Sorry for the delay, as you suggested I tried to use current master for gstreamer and it worked with no issue!

Thanks :)
Comment 3 pauldotknopf 2017-12-06 06:55:36 UTC
Is it possible to use gstreamer-vaapi on master, while still using 1.12 for everything else?