Injecting audio through GStreamer error!

Hey,

I’m attempting to stream video/audio through gstreamer to mediasoup and I tried replicating the code used in this example https://github.com/versatica/mediasoup-demo/blob/v3/broadcasters/gstreamer.sh however, I seem to be getting an error with this command.

gst-launch-1.0 -v pulsesrc ! queue ! audioconvert ! decodebin ! audioresample ! audioconvert ! audio/x-raw,channels=2,rate=24000 ! opusenc ! rtpopuspay pt=101 ssrc=11111111 ! rtpbin.send_rtp_sink_1  rtpbin.send_rtp_src_1 ! udpsink host=rtc-eu-2.giggl.app port=40606 rtpbin.send_rtcp_src_1 ! udpsink host=rtc-eu-2.giggl.app port=43353 sync=false async=false

I seem to be getting

WARNING: erroneous pipeline: No sink-element named "(null)" - omitting link

I’ve boiled this down to the exact line ! rtpbin.send_rtp_sink_1 I believe this is the crux of the problem but I’m unsure why? Any help is greatly appreciated <3

Looks like you forget to declare the rtpbin itself:

gst-launch-1.0 -v rtpbin name="rtpbin" pulsesrc ! queue ! audioconvert ! decodebin ! audioresample ! audioconvert ! audio/x-raw,channels=2,rate=24000 ! opusenc ! rtpopuspay pt=101 ssrc=11111111 ! rtpbin.send_rtp_sink_1 rtpbin.send_rtp_src_1 ! udpsink host=rtc-eu-2.giggl.app port=40606 rtpbin.send_rtcp_src_1 ! udpsink host=rtc-eu-2.giggl.app port=43353 sync=false async=false

See also examples in the official GStreamer documentation for rtpbin: https://gstreamer.freedesktop.org/documentation/rtpmanager/rtpbin.html