[gst-devel] RTSP/RTP streaming - setting correct clock rate

Wim Taymans wim at fluendo.com
Fri Aug 25 12:25:19 CEST 2006

On Fri, 2006-08-25 at 15:37 +0530, Deeptendu Bikash wrote:
> Hi,
> This problem has been solved!
> This was not a clock rate problem at all. After debugging, I found
> that the clock rate was being correctly set, after all.

That subset error you get is pretty harmless and should be solved in
CVS, as well. 

> Setting the 'sync' property of the xvimagesink to false solved the
> problem! 
> Can anyone explain about the sync property and why setting it to false
> caused the video to play smoothly?

rtspsrc acts as a live source (combining other UDP live sources,
actually) it however does not expose a clock with the rate at which it
produces data (yet), neither does it timestamp based on the pipeline
clock. In short, timing is totally screwed and setting sync=false on the
sinks makes them play the data at the rate at which they receive it. The
skipping and wrong framerate you see is because the sinks try to
synchronize the (wrong) buffer timestamps against the clock, this will
either result in a dropped frame (when it's too late) or in the display
of an emergency frame (when no frame has been played for 1 second, it
displays whatever is gets regardless of timestamps so that the user at
least sees something).

Hope that helps,


> Regards,
> Deeptendu 
> On 8/25/06, Deeptendu Bikash <dbikash at gmail.com> wrote: 
>         The same problem is happening even with mpeg4 video (MP4V-ES).
>         If the clock rate is different from 90000 it does not play
>         correctly. Any help out there?
>         On 8/23/06, Deeptendu Bikash <dbikash at gmail.com > wrote: 
>                 Hello,
>                 I am trying to stream H.263 video whose clock rate is
>                 different from 90000. In such a case gst-launch
>                 rtspsrc location=<RTSP URL> ! rtph263pdepay !
>                 ffdec_h263 ! ximagesink does not work, with the
>                 warning: "pad rtpdec0:sinkrtp returned caps that are
>                 not a real subset of its template caps". 
>                 However, if I go and change the clock rate from 90000
>                 to the range [1, 2147483647] in
>                 gst_rtp_h263p_depay_sink_template
>                 (gstrtph263pdepay.c), and rebuild and reinstall the
>                 gst-plugins-good-0.10.3, the video plays, but not at
>                 the correct rate. Where is the correct place in the
>                 code to set the clock rate from the SDP? (I can see
>                 that gst_rtp_h263p_depay_setcaps() can actually set
>                 the caps, and gst_rtspsrc_media_to_caps() can convert
>                 the SDP to caps, but how should I link all these to
>                 make the thing work, either by changing existing
>                 plugin code, or in the gst-launch command line?) 
>                 Thanks,
>                 Deeptendu
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________ gstreamer-devel mailing list gstreamer-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Wim Taymans <wim at fluendo.com>

More information about the gstreamer-devel mailing list