How to start playing from the middle of a movie

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

How to start playing from the middle of a movie

watanabe
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?

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
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to start playing from the middle of a movie

Nicolas Dufresne-5
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
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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

signature.asc (201 bytes) Download Attachment