This ought to be in the wiki
The command line is :
gst-launch-1.0 udpsrc address=224.0.0.56 port=46194 caps="application/x-rtp, media=audio, payload=10, clock-rate=44100" ! .recv_rtp_sink_0 rtpbin ! rtpL16depay ! audioconvert ! audioresample ! alsasink device=hw:0,0
gst-launch-1.0 udpsrc address=224.0.0.56 port=45678 caps="application/x-rtp, media=audio, payload=10, clock-rate=44100" ! .recv_rtp_sink_0 rtpbin ! rtpL16depay ! audioconvert ! audioresample ! alsasink device=hw:1,0
Of course, you adjust the sink how you want and update the port number according to the method given on the above page of the wiki (tcpdump -n net 224.0.0.0/8 -c 10
).
Now, how does this pipeline works:
- udpsrc will listen to the multicast address on the given UDP port (that you have to configure)
- You have to tell what kind of stream it is (the
caps
). I found playing the stream using VLC that it was PCM 16bits stereo audio. Looking up RTP constants on the IANA website I found that this corresponded to the stream type 10 (The L16 codec of RFC 3551). - rtpbin will manage the rtp session and output a rtp stream
- rtpL16depay will decode PCM audio and output an audio stream
- you can do what you want from this point on
References:
- rtp plugin documentation
- rtpbin element documentation, contains an example that was the base of the above pipeline
- gst-plugins-good/gst/rtp/README
- RTP prameters, mentioned at the end of the README
- RFC 3551 section 4.5.11