working-udp-audio.sh 1.1 KB

123456789101112131415161718
  1. #!/bin/bash
  2. SOURCE="audiotestsrc is-live=true"
  3. SOURCE='udpsrc port=5001 do-timestamp=true caps="application/x-rtp" ! queue ! rtppcmadepay ! alawdec'
  4. SOURCE='udpsrc port=5001 do-timestamp=true caps="application/x-rtp" ! queue ! rtppcmudepay ! mulawdec'
  5. SOURCE='udpsrc multicast-group=224.1.1.1 auto-multicast=true port=5001 do-timestamp=true caps="application/x-rtp" ! queue ! rtppcmudepay ! mulawdec'
  6. SOURCE='udpsrc multicast-group=192.168.2.255 auto-multicast=true port=5001 do-timestamp=true caps="application/x-rtp" ! queue ! rtppcmudepay ! mulawdec'
  7. SOURCE='udpsrc port=5001 do-timestamp=true caps="application/x-rtp" ! queue ! rtppcmudepay ! mulawdec'
  8. BANDPASS="audiochebband mode=band-pass lower-frequency=50 upper-frequency=4000 ! audioconvert "
  9. OUTPUT_FORMAT="audio/x-raw,format=S16LE,layout=interleaved, rate=44100, channels=2"
  10. # gst-launch-1.0 -q $SOURCE ! audioconvert ! audioresample ! $BANDPASS ! audioconvert ! $OUTPUT_FORMAT ! fdsink fd=1 sync=true
  11. (
  12. echo 'audio feed ctr isaudio 1';
  13. gst-launch-1.0 -q $SOURCE ! audioconvert ! audioresample ! $OUTPUT_FORMAT ! fdsink fd=1 sync=true
  14. ) | nc 127.0.0.1 9999