R: how to kindly stop a pipeline?

info at mbsoft.biz info at mbsoft.biz
Sat Dec 24 11:22:06 UTC 2022

I solved my problem using -e option

-----Messaggio originale-----
Da: gstreamer-devel <gstreamer-devel-bounces at lists.freedesktop.org> Per conto di Maurizio via gstreamer-devel
Inviato: giovedì 22 dicembre 2022 20:07
A: 'Discussion of the development of and with GStreamer' <gstreamer-devel at lists.freedesktop.org>
Cc: info at mbsoft.biz
Oggetto: how to kindly stop a pipeline?

Hi all, i have this pipeline to capture a live video source and a live audio source in an mkv file

gst-launch-1.0.exe -v videotestsrc ! queue ! videoconvert ! mfh264enc bitrate=1024 ! h264parse ! mux. wasapisrc ! queue ! audioconvert ! opusenc ! opusparse ! matroskamux name=mux ! filesink location="E:\test.mkv"

when I press CTRL+C on the console to stop the pipeline I get a corrupted mkv file. Some players do not open it at all, while VLC open it but it's not seekable. Audio and video are ok but probably the matroskamux is not finalizing the file.

How I can exit gst-launch in a kindly way, I mean I want the muxer to complete the file index and exit.

Thank you

More information about the gstreamer-devel mailing list