tried the below but cant hear audio
gst-launch-1.0 udpsrc port=6000 ! "application/x-srtp,media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L16, channels=(int)2, payload=(int)96, srtp-key=(buffer)012345678901234567890123456789012345678901234567890123456789, srtp-cipher=(string)aes-128-icm, srtp-auth=(string)hmac-sha1-80, srtcp-cipher=(string)aes-128-icm, srtcp-auth=(string)hmac-sha1-80, roc=(uint)0" ! srtpdec ! rtpL16depay ! audioconvert ! alsasink
gst-launch-1.0 -v alsasrc ! audioconvert ! audio/x-raw,channels=2,depth=16,width=16,rate=44100 ! rtpL16pay ! srtpenc key="012345678901234567890123456789012345678901234567890123456789" ! udpsink host=3.204.26.22 port=6000
That is because you havent set ssrc, try the following pipelines
Sender pipeline as:
gst-launch-1.0 -v alsasrc ! audioconvert ! audio/x-raw,channels=2,depth=16,width=16,rate=44100 ! rtpL16pay ! 'application/x-rtp, ssrc=(uint)3412089386' ! srtpenc key="012345678901234567890123456789012345678901234567890123456789" ! udpsink host=3.204.26.22 port=6000
Receiver pipeline as:
gst-launch-1.0 udpsrc port=6000 ! "application/x-srtp,media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L16, channels=(int)2, payload=(int)96,ssrc=(uint)3412089386, srtp-key=(buffer)012345678901234567890123456789012345678901234567890123456789, srtp-cipher=(string)aes-128-icm, srtp-auth=(string)hmac-sha1-80, srtcp-cipher=(string)aes-128-icm, srtcp-auth=(string)hmac-sha1-80, roc=(uint)0" ! srtpdec ! rtpL16depay ! audioconvert ! alsasink
Related
Below is my actual pipeline for sender and reciever. I would like to stream over all subnets (from 192.168.1.1 to 192.168.1.255. I would like that the receiver can decode the stream whatever is ip is : 192.168.1.10 or 192.168.1.235 or...
How do I have to use multiudpsink to do that?
SENDER
appsrc ! video/x-raw, format=BGR ! queue ! videoconvert ! video/x-raw, format=BGRx ! nvvidconv ! omxh264enc ! video/x-h264, stream-format=byte-stream ! h264parse ! rtph264pay pt=96 config-interval=1 ! udpsink host=192.168.1.2 port=5200 sync=false
RECIEVER
udpsrc ! rtpjitterbuffer mode=0 ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert !d3dvideosink sync=false
I've have a gstreamer pipeline that is playing back RTP stream received from udpsrc:
udpsrc port=6000 caps=\"application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265, payload=(int)96, seqnum-offset=(uint)5331, timestamp-offset=(uint)2500093283, ssrc=(uint)2046637718, a-framerate=(string)1\" ! rtph265depay ! avdec_h265 ! videoconvert ! autovideosink sync=false
That works fine, however if I replace udpsrc with appsrc, it stops working. The only error I'm seeing is:
... Segment with non-TIME format not supported
non-working pipeline with appsrc:
appsrc name=appsrc caps=\"application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265, payload=(int)96, seqnum-offset=(uint)5331, timestamp-offset=(uint)2500093283, ssrc=(uint)2046637718, a-framerate=(string)1\" ! rtph265depay ! avdec_h265 ! videoconvert ! autovideosink sync=false
Turns out that appsrc needs to have its format property set to time.
Here is the fixed pipeline:
appsrc name=appsrc format=time caps=\"application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265, payload=(int)96, seqnum-offset=(uint)5331, timestamp-offset=(uint)2500093283, ssrc=(uint)2046637718, a-framerate=(string)1\" ! rtph265depay ! avdec_h265 ! videoconvert ! autovideosink sync=false
i try to execute
gst-launch-1.0 -em rtpbin name=rtpbin latency=5 udpsrc port=5102 caps="application/x-rtp,media=(string)audio,clock-rate=(int)48000,encoding-name=(string)OPUS" ! rtpbin.recv_rtp_sink_0 rtpbin. ! queue ! rtpopusdepay ! opusdec ! audioconvert ! audioresample ! voaacenc ! mux. udpsrc port=5104 caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264" ! rtpbin.recv_rtp_sink_1 rtpbin. ! queue ! rtph264depay ! h264parse ! mux. flvmux name=mux streamable=true ! rtmpsink sync=false location="rtmp://127.0.0.1:1935/show/stream live=1"
Unfortunately it raise an error: WARNING: erroneous pipeline: no element "voaacenc"
Did you try running gst-inspect voaacenc?
Try installing gst-plugins-bad, should solve it.
Can someone paste a working pair of gst-launch pipelines that use rtpvrawpay and rtpvrawdepay?
Here's my first stab at it:
gst-launch-1.0 videotestsrc ! videoconvert ! video/x-raw,width=128,height=128,format=BGR ! rtpvrawpay ! application/x-rtp,payload=96 ! udpsink host=... port=...
gst-launch-1.0 udpsrc port=9999 ! application/x-rtp,media=video,payload=96,clock-rate=90000,encoding-name=RAW,sampling=BGR,depth=16 ! rtpvrawdepay ! video/x-raw,width=128,height=128,format=BGR,framerate=30/1 ! videoconvert ! ximagesink
Pay: gst-launch-1.0 -v videotestsrc ! rtpvrawpay ! udpsink host="127.0.0.1" port="5000"
Depay: gst-launch-1.0 udpsrc port="5000" caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW, sampling=(string)YCbCr-4:2:0, depth=(string)8, width=(string)320, height=(string)240, colorimetry=(string)BT601-5, payload=(int)96, ssrc=(uint)1103043224, timestamp-offset=(uint)1948293153, seqnum-offset=(uint)27904" ! rtpvrawdepay ! videoconvert ! queue ! xvimagesink sync=false
Check the caps on your pipeline again.
I’m trying to interleave 4 channels of audio into one audio file
I have managed to successfully save them into wav with wavenc
gst-launch-1.0 interleave name=i filesrc location=FourMICS_RR_long.wav !
decodebin ! audioconvert ! audio/x-raw,format=(string)F32LE ! queue ! i.sink_0
filesrc location=FourMICS_CR_long.wav ! decodebin ! audioconvert !
audio/x-raw,format=(string)F32LE ! queue ! i.sink_1
filesrc location=FourMICS_CL_long.wav ! decodebin ! audioconvert ! audio/x-raw,format=(string)F32LE ! queue ! i.sink_2
filesrc location=FourMICS_LL_long.wav ! decodebin ! audioconvert ! audio/x-raw,format=(string)F32LE ! queue ! i.sink_3
i.src ! queue ! audio/x-raw,rate=48000,channels=4,format=F32LE,layout=interleaved ! queue !
wavenc ! queue ! filesink location=out2.wav
but when I save it as vorbisenc oggmux
gst-launch-1.0 interleave name=i filesrc location=FourMICS_RR_long.wav ! decodebin ! audioconvert ! audio/x-raw,format=(string)F32LE ! queue ! i.sink_0
filesrc location=FourMICS_CR_long.wav ! decodebin ! audioconvert ! audio/x-raw,format=(string)F32LE ! queue ! i.sink_1
filesrc location=FourMICS_CL_long.wav ! decodebin ! audioconvert ! audio/x-raw,format=(string)F32LE ! queue ! i.sink_2
filesrc location=FourMICS_LL_long.wav ! decodebin ! audioconvert ! audio/x-raw,format=(string)F32LE ! queue ! i.sink_3
i.src ! queue ! audio/x-raw,rate=48000,channels=4,format=F32LE,layout=interleaved ! queue !
wavenc ! queue ! wavparse ! audioconvert ! audio/x-raw,rate=48000,channels=4,format=F32LE,layout=interleaved !
vorbisenc ! oggmux ! filesink location=out2.ogg
the channels get completely messed up when I play the file, or look at it in audacity.
I have also tried using
channel-positions=GST_AUDIO_CHANNEL_POSITION_REAR_LEFT
channel-mask=(bitmask)0x4
for each channel like this>
gst-launch-1.0 interleave name=i filesrc location=FourMICS_RR_long.wav ! decodebin ! audioconvert ! audio/x-raw,format=(string)F32LE,channel-position=GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,channel-mask=(bitmask)0x1 ! queue ! i.
filesrc location=FourMICS_CR_long.wav ! decodebin ! audioconvert ! audio/x-raw,format=(string)F32LE,channels=(int)1,channel-position=GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,channel-mask=(bitmask)0x2 ! queue ! i.
filesrc location=FourMICS_CL_long.wav ! decodebin ! audioconvert ! audio/x-raw,format=(string)F32LE,channels=(int)1,channel-position=GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,channel-mask=(bitmask)0x3 ! queue ! i.
filesrc location=FourMICS_LL_long.wav ! decodebin ! audioconvert ! audio/x-raw,format=(string)F32LE,channels=(int)1,channel-position=GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,channel-mask=(bitmask)0x4 ! queue ! i.
i.src ! queue ! audio/x-raw,rate=48000,channels=4,format=F32LE,layout=interleaved ! queue !
wavenc ! queue ! wavparse ! audioconvert ! audio/x-raw,rate=48000,channels=4,format=F32LE,layout=interleaved !
vorbisenc ! oggmux ! filesink location=out2.ogg
Same problem
Any suggestion as of how to solve this?
I am not restricted only to vorbis, in fact I have similar issues also with opusenc.
Thanks.
Mar
So. I got it working,
gst-launch-1.0 interleave name=i filesrc location=FourMICS_RR_long.wav ! decodebin ! audioconvert ! audioresample ! audio/x-raw,rate=24000,format=F32LE ! queue ! i.sink_0
filesrc location=FourMICS_CR_long.wav ! decodebin ! audioconvert ! audioresample ! audio/x-raw,channels=(int)1,rate=24000,format=F32LE ! queue ! i.sink_1
filesrc location=FourMICS_CL_long.wav ! decodebin ! audioconvert ! audioresample ! audio/x-raw,channels=(int)1,rate=24000,format=F32LE ! queue ! i.sink_2
filesrc location=FourMICS_LL_long.wav ! decodebin ! audioconvert ! audioresample ! audio/x-raw,channels=(int)1,rate=24000,format=F32LE ! queue ! i.sink_3
i.src ! capssetter caps=audio/x-raw,channels=4,channel-mask=(bitmask)0x33 ! audioconvert ! audioresample ! vorbisenc ! oggmux ! filesink location=out2.ogg
There were two issues
1. that the caps need to be set to the interleave
2. vorbisenc bitrate could not bare with 4 channels at 48khz