Playback from within a file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Playback from within a file

IgalKroyter
Hi,

is there a way to start playback a pipeline from the middle of a file?
*gst_element_seek* requires a running pipeline, which displays the first few
frames, a situation I try to avoid.

Thanks.




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Playback from within a file

Tim Müller
On Wed, 2020-09-09 at 11:58 -0500, IgalKroyter wrote:

Hi,

> is there a way to start playback a pipeline from the middle of a
> file?
> gst_element_seek() requires a running pipeline, which displays the
> first few frames, a situation I try to avoid.

You can set the pipeline to PAUSED state, then it will only show the
first frame.

Wait for the ASYNC_DONE message on the bus, then do a flushing seek to
your new position.

Most video sinks have a "show-preroll-frame" property which you can set
to FALSE, then it will not render the initial frame in PAUSED state
either, but only render frames when you go into PLAYING state.

If you have some other type of sink in the pipeline, we'd need to know
more details to see how to best handle that.

Cheers
 Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Playback from within a file

Nicolas Dufresne-5
In reply to this post by IgalKroyter
Le mercredi 09 septembre 2020 à 11:58 -0500, IgalKroyter a écrit :
> Hi,
>
> is there a way to start playback a pipeline from the middle of a file?
> *gst_element_seek* requires a running pipeline, which displays the first few
> frames, a situation I try to avoid.

You can add a blocking probe, to pre-roll without displaying, then
operate a flushing seek, and unblock.

Or you can look into gst-editing-services API, which will let you do
much more in term of editing function, with a lot less effort.

>
> Thanks.
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel