[Bug 766790] v4l2src generates wrong timestamps for encoded video.

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue May 24 12:53:10 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=766790

--- Comment #2 from Peter Maersk-Moller <pmaersk at gmail.com> ---
I promised myself to abtain from coding GStreamer, don't know the internal well
enough, and better spend my time for the project finding and document bugs.
That said, let me think about it. I might look into it and see what can be
done.

Can you point me to some file/functions where you do the bad time stamp
detection and time stamp interpolation in v4l2src?

In my code, I read from a frame fifo at a constant frame rate and it works
pretty well even out time stamps from all these buggy webcams. The encoded
frames may have variable timed timestamps, but the frames them selves are
captured at an steady rate (and subsequently should be palyed at a steady
rate).

Anyway in uvch264src, you have the parameter 'fixed-framerate'. I would have
expected that, when enabled, it would try to generate equal spaced time stamps.

True that we should not break things. However, I also believe we should in
general try to correct the timestamps, when possible. It could be a parameter
you can enable so other things that don't need/want it can ignore it.

True the firmware should be fixed in all these cameras, but that is not going
to happen. True it should be fixed in the driver and or in V4L2 community.
Don't really know anyone there so that may not happen either.

True I can compensate for it in my software, although it would be really nice
to have it done earlier.

One thought. h264parse does, as I understand try to correct some TS errors. It
could happen there as well. Something like 'videorate', but for a H264 stream
although adding frames is most likely not possible and throwing away frames can
cause problems. Admittedly I haven't thought it through. But best would be to
be able to correct timestamps in v4l2src or alterntively in the uvch264src
using v4l2src.

Regards
Peter

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list