Skip to content

Instantly share code, notes, and snippets.

@aweijnitz
Last active June 27, 2023 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aweijnitz/149426492a0e8ef2c307c5ccd129ec04 to your computer and use it in GitHub Desktop.
Save aweijnitz/149426492a0e8ef2c307c5ccd129ec04 to your computer and use it in GitHub Desktop.
Useful one-libers for working with USB audio on Rasberry Pi
# Setup an RTMP streaming server running in Docker
docker run -d -p 1935:1935 --name nginx-rtmp tiangolo/nginx-rtmp
# Alsa tools needed for convenient sound interfacing
sudo apt-get -y install alsa-tools
sudo apt-get -y install alsa-utils
sudo apt install ffmpeg
# Start an RTMP stream to a remote streaming server
ffmpeg -f alsa -ac 1 -i plughw:1,0 -ar 44100 -b:a 256k -f flv rtmp://<IP_OF_STREAMING_SERVER>/live/rp2
# DEBUG VERSION (log evel) Start an RTMP stream to a remote streaming server
ffmpeg -loglevel verbose -f alsa -ac 1 -i plughw:1,0 -ar 44100 -b:a 256k -f flv rtmp://<IP_OF_STREAMING_SERVER>/live/rp2
# List USB capture devices (needed for the plughw)
arecord --list-devices
# Adjust input gain/levels
alsamixer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment