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 631855 - [x264enc] encoder generates timestamps in the wrong order
[x264enc] encoder generates timestamps in the wrong order
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-10-11 08:23 UTC by Tibor Kocsis
Modified: 2010-10-11 13:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tibor Kocsis 2010-10-11 08:23:16 UTC
Hi,

I get the timestamps in the wrong order when I set the key-int-max property.

Try these pipelines:

Timestamps are ok: 
gst-launch v4l2src -v ! videoscale ! videorate ! video/x-raw-yuv,width=640,height=480,framerate=1/1 ! x264enc ! fakesink

Incorrect order:
gst-launch v4l2src -v ! videoscale ! videorate ! video/x-raw-yuv,width=640,height=480,framerate=1/1 ! x264enc key-int-max=12 ! fakesink

/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain   ******* < (57790 bytes, timestamp: 0:00:01.000000000, duration: 0:00:01.000000000, offset: -1, offset_end: -1, flags: 256) 0x7fcc913c4530"
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain   ******* < (57591 bytes, timestamp: 0:00:02.000000000, duration: 0:00:01.000000000, offset: -1, offset_end: -1, flags: 256) 0x7fcc913c40b0"
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain   ******* < (75606 bytes, timestamp: 0:00:04.000000000, duration: 0:00:01.000000000, offset: -1, offset_end: -1, flags: 256) 0x17b0e10"
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain   ******* < (51785 bytes, timestamp: 0:00:03.000000000, duration: 0:00:01.000000000, offset: -1, offset_end: -1, flags: 256) 0x7fcc9000c820"
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain   ******* < (76187 bytes, timestamp: 0:00:06.000000000, duration: 0:00:01.000000000, offset: -1, offset_end: -1, flags: 256) 0x7fcc913c40b0"


Tibor
Comment 1 Edward Hervey 2010-10-11 09:41:08 UTC
I'd say those are correct (the gstreamer buffer timestamps are presentation timestamps (PTS)), and the encoder will be outputting buffers in decoding order (!= playback order).

Needs double checking, but I don't really see an issue.
Comment 2 Mark Nauwelaerts 2010-10-11 13:50:23 UTC
After some testing:

- using an old libx264, default settings lead to no b-frames, and then timestamps are ascending (with or without key-int-max)

- using a more recent libx264 (where default settings have b-frames), (PTS) timestamps are non-ascending (with or without key-int-max).

So, comment above applies.