Capture microphone input with ffmpeg on Mac and streaming

房东的猫 提交于 2020-05-26 04:52:41

问题


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


回答1:


Here 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 ""



来源:https://stackoverflow.com/questions/19689029/capture-microphone-input-with-ffmpeg-on-mac-and-streaming

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!