[FFmpeg-user] how can i capture video and audio simutaneously?

Victor Petrescu victor.petrescu13 at gmail.com
Mon Jul 25 11:50:13 CEST 2011


I solved this by adding a -async 1. So your command should look like:

ffmpeg -f video4linux2 -s 320x240 -i /dev/video0 -f alsa -ac 1 -i hw:1,0
-acodec libmp3lame -ab 96k -async 1 camera.mp4

Can't guarantee it will work... but it did it for me.

2011/7/24 chao sun <bfyviolin at gmail.com>

> i have a webcam with mic, i can successfully capture video or audio
> independently. But when i want to capture and mix video and audio into
> one file, it goes that my video and audio does not synchronizing.
> i use the following cmd line:
>
> ffmpeg -f video4linux2 -s 320x240 -i /dev/video0 -f alsa -ac 1 -i
> hw:1,0 -acodec libmp3lame -ab 96k camera.mp4
>
> The result file, in which the video has very slow start( may be due to
> encoding i guess), and then goes normally, the whole audio goes
> smoothly as normal. So it results in video-audio mis-sync.
> How can i solve this ?
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list