"Pause" a video from playing in the middle?

Rory McCann rory at technomancy.org
Thu Apr 9 15:54:03 UTC 2020


Hi all,

I'm new(ish) to gstreamer, so sorry if this has an obvious answer.

I have a video (with no audio) which I can play with gstreamer with this
pipeline: `filesrc location=out.ogv ! decodebin ! videoconvert  ! 
xvimagesink`. It's 20 seconds long. I have a 25
second audio file which I want to play at the same time. From the start,
I want the the audio to play, and the video to play as normal for 10s,
then the video should freeze/pause, for 5s while the audio keeps
playing, then resume playing for the next 10s. This makes a 25s video
with audio where there is always something on the screen. For the 5s
that the video is frozen, the last played frame from the video should be
shown. As if the user pressed pause.

I only need to do this with existing video files, not live from webcams,
or from a network source.

Is this possible with gstreamer? `imagefreeze` will take an still image
and output frames at a framerate. But that just takes a still image.

I'm using gstreamer 1.15.5, and python 3.6.9, not `gst-launch-1.0`.

This is a simplification of the problem, eventually I want to pause the
video, then “zoom in” to a part of the video, play some audio, zoom out,
then unpause. I can do the zoom in with videobox¹, but I don't know how
to “pause” the video

-- 

Rory

I also asked this on Stack-Overflow 
https://stackoverflow.com/questions/61115005/gstreamer-pausing-a-video-while-emitting-still-frames 


[1] I hit this bug 
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/684


More information about the gstreamer-devel mailing list