Last active
November 4, 2024 15:56
-
-
Save fiddyschmitt/4e49019c8f10b267fb7f3284689f88c4 to your computer and use it in GitHub Desktop.
ffmpeg - send and receive G.711 RTP audio
This file contains 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
--list input devices | |
ffmpeg -list_devices true -f dshow -i dummy | |
--to record microphone to mp3 | |
ffmpeg -f dshow -i audio="Microphone (Logitech USB Headset H340)" -c:a libmp3lame -ar 44100 -b:a 320k -ac 1 output1.mp3 | |
--send mic to rtp multicast g.711 | |
ffmpeg -f dshow -i audio="Microphone (Logitech USB Headset H340)" -ac 1 -ar 8000 -ab 64 -acodec pcm_mulaw -f rtp rtp://239.0.0.1:5656 | |
--play received audio | |
ffplay rtp://239.0.0.1:5656 | |
--receive rtp multicast g.711 and save to mp3 | |
ffmpeg -i rtp://239.0.0.1:5656 -filter:a "asetrate=8000" -acodec libmp3lame -ar 44100 output2.mp3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment