Last active
June 27, 2023 20:25
-
-
Save aweijnitz/149426492a0e8ef2c307c5ccd129ec04 to your computer and use it in GitHub Desktop.
Useful one-libers for working with USB audio on Rasberry Pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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