I need to create a GStreamer pipeline with an input-selector
in it, to switch between multiple input sources, but every time I try to add such a component I get a completely undescript Bus error
- and at this point I'm stuck, there's no useful information for me to follow through, I can monkey around with some trial and error debugging, but to no avail...
Also, the bus error only comes out when I actually try to consume the pipeline (further processed by something else - but that part is debugged), in my case by opening an outputted RTSP feed from later on with a player like IINA or VLC. This doesn't really matter though any other attempt at playback leads to same error...
I guess I'm missing some subtler points about how input-selector
is to be used, so please point me to any relevant examples/documentation - what I need to implement in the end is a python service streaming a RTSP video feed, that on command (HTTP API) switches between various media files to stream.
Example pipeline:
gst-launch-1.0 --gst-debug-level=3 \
input-selector name=iselect \
filesrc location={INPUT_VIDEO_FILE_PATH} \
! qtdemux ! queue ! h264parse ! iselect. \
filesrc location={PLACEHOLDER_FILE_PATH} \
! pngdec ! imagefreeze ! iselect. \
iselect. ! gdppay ! shmsink socket-path=/tmp/shm1
Also constructing the pipeline in Python, either with Gst.parse_launch(...string like above...)
or with manual piece-by-piece pipeline construction in Python.
Also, in Python I explicitly switch the input-selector
to a stream, like this:
input_selector_video_file_sink_pad = input_selector.get_static_pad('sink_1')
input_selector.set_property("active-pad", input_selector_video_file_sink_pad)
For reference, this is a full "manual pipeline construction" sample that fails with non-descript Bus error
: https://gist.github.com/NeuronQ/de24db937a4d5a28eeb46612914b8779 .