Pausing/resuming a video recording

Lee Matthews lma at spaceapplications.com
Thu Jul 3 02:42:18 PDT 2014


Hi,

I'm streaming video using the vp8 codec in a webm container. I can record the video also by using a tee and piping the video to a filesink.

To start/stop recording, I dynamically add/remove a group of elements to a tee in the pipeline.

I also wish to be able to pause/resume the recording. I do this using output-selector to select between filesink and fakesink, the pipeline remaining in the PLAYING state. So when recording normally the video goes to filesink, during a pause it goes to fakesink, and on resume it goes back to filesink.

My pipeline looks like the following :


v4l2sec -- caps filter -- videoconvert -- vp8enc -- webmmux -- tee -- queue -- multisocketsink
                                                                |
                                                                |-----queue -- output-selector -- filesink
                                                                                       |
                                                                                       |--------- fakesink


If I record a video and say pause the video at 10 seconds, resume the video at 20 seconds and stop the video at 30 seconds. When playing back all is ok until 10 seconds, then the frame freezes until 20 seconds, at which point the video continues ok to 30 seconds. 

Does anyone know how to resolve this ? 

Thanks
Lee


More information about the gstreamer-devel mailing list