How to record audio stream using ffmpeg?

青春壹個敷衍的年華 提交于 2019-12-11 05:48:32

问题


I have a problem using ffmpeg: when i trying to record video+audio from my webcam in result i got only video stream, wthout audio at all. I have tried different codecs and nothing.. Maybe, someone can give me advice?

ffmpeg -f dshow -i video="Logitech HD Webcam C270" -r 25 -s 800x600 -acodec libmp3lame -vcodec mpeg4 -b 3000k -f avi D:\1.avi

Btw: virtualdub grabs both well. Thanks.


回答1:


Assuming that you have installed the driver and codecs, use something like:

ffmpeg -f dshow -i video="Logitech HD Webcam C270" [path]out.mp4

A short explanation is given in capture a webcam input. For using DirectShow you have this examples.



来源:https://stackoverflow.com/questions/14487393/how-to-record-audio-stream-using-ffmpeg

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