Enable and Disable audio, video or subtitle dynamically

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

Enable and Disable audio, video or subtitle dynamically

DeepakRohan
Hi,
    I want to enable and disable audio, video and subtitle in an mkv file using gstreamer pipeline.
My application creates pipeline in the below form.

gst-launch-1.0 subtitleoverlay name=overlay ! autovideosink filesrc location=Lucy.mkv ! matroskademux name=d d.video_0 ! queue ! decodebin !  overlay.video_sink d.audio_0 ! queue ! decodebin ! alsasink d.subtitle_0 ! queue ! overlay.subtitle_sink.
Having the above pipeline, I want to perform disable and enable of the elementary streams present in the input.

Please let me know how to do this.

Thank You in Advance.
Reply | Threaded
Open this post in threaded view
|

Re: Enable and Disable audio, video or subtitle dynamically

Sebastian Dröge-3
On Sa, 2016-07-09 at 03:09 -0700, DeepakRohan wrote:

> Hi,
>     I want to enable and disable audio, video and subtitle in an mkv file
> using gstreamer pipeline.
> My application creates pipeline in the below form.
>
> gst-launch-1.0 subtitleoverlay name=overlay ! autovideosink filesrc
> location=Lucy.mkv ! matroskademux name=d d.video_0 ! queue ! decodebin ! 
> overlay.video_sink d.audio_0 ! queue ! decodebin ! alsasink d.subtitle_0 !
> queue ! overlay.subtitle_sink.
> Having the above pipeline, I want to perform disable and enable of the
> elementary streams present in the input.
>
> Please let me know how to do this.
You will have to dynamically relink the pipeline then, that is use pad
probes to know when this can be safely done and then change the
pipeline topology. For the generic ideas behind this see:
https://coaxion.net/blog/2014/01/gstreamer-dynamic-pipelines/


Is there any reason why you don't want to use playbin? On playbin you
can enable/disable audio, video or subtitles by just setting the flags
property on it accordingly. Inside playbin/playsink you can also find
an implementation that you can use to understand what you need to do if
you want to implement this yourself.

--

Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment