sync=false and rate

Nicolas Dufresne nicolas at ndufresne.ca
Mon Apr 12 17:10:45 UTC 2021


Le lundi 12 avril 2021 à 08:25 -0500, eyalhir74 a écrit :
> Hi,
>   I would appreciate if someone could explain why this:
> gst-launch-1.0 videotestsrc !  video/x-raw,framerate=10/1 ! fpsdisplaysink
> video-sink=xvimagesink
> 
>   Displays the video in 10fps
>   And the one below, ignores the 10fps limit:
> gst-launch-1.0 videotestsrc !  video/x-raw,framerate=10/1 ! fpsdisplaysink
> video-sink=xvimagesink sync=false
> 
>  Obviously the difference is the "sync=false" element. But why?

In GStreamer, specially for non-live playback like this, it's the sink elements
(leaf of the graph) that are responsible for time synchronisation. Sink will
translate the timestamp and segments to the pipeline clock and wait for the
right moment to present the media. The "sync" property allow users to disable
the synchronisation, which cause the content to be presented immediately.

> 
>  Also, what can I do if I want to add a videotestsrc that will output 10fps
> images to a bin which ends with 
> a xvimagesink with sync=false, and I can't drop the sync=false code?

That's an unfortunate problem, though specifically you can turn the pipeline
into live. "videotestsrc is-live=1". The data will be produced (let go) at 10fps
at the source, which will accidently make the display present at about 10pfs.
When you deal with elements that don't natively support being live, you can
alway use "identity sync=1" to simulate live pipeline from a non-live source. Be
careful, the data need to have time information, so place this element after any
demuxer or parser.

> 
> thanks
> Eyal
> 
> 
> 
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list