rtp timestamp issue

Chuck Crisler ccrisler at mutualink.net
Mon Jul 21 13:17:05 PDT 2014


I am having a problem displaying video from GStreamer on VLC. I am using
GStreamer 0.10.30 (yes, I know but upgrading isn't an option).

Here is my GStreamer pipeline:

gst-launch v4l2src device=/dev/video0 always-copy=false !
'video/x-h264,width=640,height=480,framerate=30000/1001,format=(fourcc)H264'
\
   ! rtph264pay pt=96 config-interval=2 ! udpsink host=$1 port=$2

I added support for the fourcc H264 to v4l2src which invokes a hardware
capture device and uses a hardware H264 encoder. So we receive H264 video
directly. I also added the config-interval property on the RTP payloader to
send the SPS/PPS at configured intervals. I had to do that because I have
found some RTSP sources that only send the SPS and PPS in the SDP, never in
band.

The problem is that VLC will only display the first frame. I think that is
because the RTP timestamps are not correct. The first 5 timestamps as
displayed in Wireshark in a recent packet capture were:

167924849
199587163
232816734
266168948
299524584

As you can see, they are increasing way too fast. I suspect a bug in the
gstbasertppayload.c module which calculates the timestamp in the
gst_segment_to_running_time() function in gstsegment.c. I am sorry but the
code is not exactly "intuitively obvious to the most casual observer". I am
trying to slog through it to understand it and would really appreciate it
if anyone could shed to light on this antique code. From the ChangeLog it
looks like this function was touched many times in this release.

Thank you,
Chuck Crisler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140721/347fe1a7/attachment.html>


More information about the gstreamer-devel mailing list