R: gst-launch: 2 sources and auto EOS when first source finish

info at mbsoft.biz info at mbsoft.biz
Mon Jan 23 13:36:48 UTC 2023


Unfortunately I still don't have the skill to make my own app using gstreamer. I will put a feature request if someone can add "-shortest" option to gst-launch-1.0.exe  like ffmpeg does

> I'm pretty sure you can do that if you create a small app.

>There you can listen to the EOS signals and stop the pipeline when you get the first one.

> Best Regards

> Marianna

On 19.01.2023 06.11, gstreamer-devel-request at lists.freedesktop.org wrote:
> Is it possible to have an automatic pipeline shutdown when 1 of the sources end?
>
> I have this pipeline 1 source video + 1 source audio:
>
> gst-launch-1.0.exe -e videotestsrc is-live=true ! x264enc tune=zerolatency option-string=nal-hrd=cbr:force-cfr=1:keyint=250 bitrate=1024 ! matroskamux name=mux ! filesink location=e:\test.mkv filesrc location="z:\\canzoni\\canzoni\\elisa - luce.mp3" ! decodebin ! audioresample ! audioconvert ! mux.
>
> I want the pipeline to automatically shutdown when the filesrc has finished to read the file.
>
> In ffmpeg there is the option -shortest that finish encoding when the shortest output stream ends.
>
> How I can achieve the same?
>
> Note that in this example I used the filesrc but in my real usage I get audio samples with fdsrc like this:
>
> gst-launch-1.0.exe -e videotestsrc is-live=true ! x264enc 
> tune=zerolatency option-string=nal-hrd=cbr:force-cfr=1:keyint=250 
> bitrate=1024 ! matroskamux name=mux ! filesink location=e:\test.mkv 
> fdsrc ! rawaudioparse format=pcm pcm-format=s16le sample-rate=44100 
> num-channels=2 ! audioresample ! audioconvert ! opusenc bitrate=128000 
> ! opusparse ! queue ! mux
>
> when the stdin source has been closed the pipeline continue to run 
> unfortunately
>
> Thank you

--
Best regards / Med venlig hilsen
“Marianna Smidth Buschle”



More information about the gstreamer-devel mailing list