How to start playing from the middle of a movie

Nicolas Dufresne nicolas at ndufresne.ca
Mon Nov 25 14:04:56 UTC 2019


Le dimanche 24 novembre 2019 à 23:20 -0600, watanabe a écrit :
> Dear all, 
> 
> I want to play a matroska movie file from the middle of the movie on
> Android.
> So I made a pipeline and tried to seek to the position I want to start just
> after the state became GST_STATE_PLAYING.
> But I have a problem that it seems to be shown the frame 0 (the first frame)
> of the movie just before displaying the movie at position I want to start.
> I tried to set show-preroll-frame property of sink to false, but it was not
> worked.
> Are there good ideas to avoid it?

Simple solution would be to set the "show-preroll-frame" to FALSE, set
the pipeline to PAUSED (wait for that state change), set back that
property to TRUE, and do a flushing seek in the middle.

> 
> My pipeline is:
> filesrc ! matroskademux ! avdec_h264 ! tee name=t ! queue ! videoconvert !
> autovideosink t. ! queue ! jpegenc ! appsink
> 
> I used a method below to seek:
> gst_element_seek (pipeline, rate, GST_FORMAT_TIME,
>                   (GstSeekFlags)(GST_SEEK_FLAG_FLUSH |
> GST_SEEK_FLAG_ACCURATE),
>                   GST_SEEK_TYPE_SET, seek_pos, GST_SEEK_TYPE_NONE,
> GST_CLOCK_TIME_NONE);
> 
> Regards,
> 
> 
> 
> 
> --
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191125/1dfbc011/attachment.sig>


More information about the gstreamer-devel mailing list