pulseaudio-tcp-stream
  1. #!/bin/bash
  2. ## simple start|stop script for streaming audio output from pulseaudio
  3. ## for receiving stream on android device use this app: https://play.google.com/store/apps/details?id=com.kaytat.simpleprotocolplayer&hl=en
  4.  
  5. case "$1" in
  6.  start)
  7. $0 stop
  8. pactl load-module module-simple-protocol-tcp rate=48000 format=s16le channels=2 source=NAME record=true port=8010
  9. ## to get NAME of your output execute "pactl list | grep Name" and copy name with .monitor in the end
  10.   ;;
  11.  stop)
  12. pactl unload-module `pactl list | grep tcp -B1 | grep M | sed 's/[^0-9]//g'`
  13.   ;;
  14.  *)
  15. echo "Usage: $0 start|stop"
  16.   ;;
  17. esac
Parsed in 0.007 seconds