Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capture microphone input with ffmpeg on Mac and streaming

I am trying to capture the microphone input on my MacBook (default mic) and streaming this via rtp:// but I'm unable to find anything on how to do this. I tried using VLC but no luck either. I want to do this command line. With the below command the streaming works but I don't know how to adjust this command to specify it needs to use the microphone as input. Anyone can help me?

./ffmpeg -re -f lavfi -i aevalsrc="sin(400*2*PI*t)" -ar 8000 -f mulaw -f rtp rtp://127.0.0.1:1234

like image 969
Fréderic Cox Avatar asked Oct 30 '13 16:10

Fréderic Cox


1 Answers

Here's how to stream OSX microphone to RTP, using ffmpeg directly :

ffmpeg -f avfoundation -i ":1" -acodec libmp3lame -ab 32k -ac 1 -f rtp rtp://0.0.0.0:12345

Then open rtp://127.0.0.1:12345 from VLC or whatever

find the correct mic with this command : ffmpeg -f avfoundation -list_devices true -i ""

like image 178
jujule Avatar answered Oct 02 '22 10:10

jujule