[gst-devel] BaseSink "sync" property

Wim Taymans wim.taymans at gmail.com
Wed Apr 29 11:16:43 CEST 2009


On Wed, 2009-04-29 at 17:02 +0800, Jon Burgess wrote:
> Hi all,
> 
> Perhaps someone can explain to me what might be happening for me.
> I've been successfully using a pipeline, such as the following
> gst-launch equivalent, on my own development machine (32 bit linux,
> ubuntu hardy):
> 
> > gst-launch-0.10 uridecodebin uri=rtsp://some_mp4v_encoded_source !
> queue ! decodebin2 ! xvimagesink
> 
> However, when it came time to deploy my code on to a test machine (64
> bit linux, ubuntu hardy, all relevant packages are the same versions,
> as far as I can tell), it was found that playback was far from good -
> very stuttered, missing/corrupted frames etc.
> 
> I was playing around with a few of the element properties, and
> discovered that setting the "sync" property to false (default is
> "true) fixed my problem - i.e. it resulted in smooth playback.
> 
> Now, the doco from BaseSink says: "sync" - Sync on the clock.
> Well it might be obvious to some, but I'm not sure why the behaviour
> would be different on the two different machines.   Which element
> would be providing the clock in the above pipelines (I think the
> uridecodebin and decodebin2 elements "resolve" to something like
> rtpmp4vdepay ! ffdec_mpeg4)?  
> 
> Does turning sink off just result in the sink rendering it as soon as
> it gets data?

Essentially, yes. Data is played when it arrives when sync=false. When
sync=true, it uses the timestamps on the buffers to wait for right time
for playback. If the playback is stuttering this is usually because of
a) starvation, something is not feeding data fast enough b) bad
timestamps c) not enough CPU power to decode things. a) is unlikely with
a default jitterbuffer of 3secs in rtspsrc c) is also unlikely if it's
smooth with sync=false. So, it's likely b) bad timestamps. Make sure you
have a recent ffmpeg package (reordered buffers had bad timestamps in
earlier versions). The payloader is probably fine, even for slightly
older versions.

Wim

> 
> Cheers,
> Jono
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations 
> Conference from O'Reilly Media. Velocity features a full day of 
> expert-led, hands-on workshops and two days of sessions from industry 
> leaders in dedicated Performance & Operations tracks. Use code vel09scf 
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________ gstreamer-devel mailing list gstreamer-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list