[FFmpeg-user] [HELP]how to avoid "ALSA buffer xrun."

Soho Soho123 soho123.2012 at gmail.com
Mon Aug 5 19:13:49 CEST 2013

Hi All,

When I use ffmpeg to capture video and sound (USB device), I can see the
message from alsa-audio-common.c "ALSA buffer xrun."

the command line I use :

ffmpeg -loglevel debug -f video4linux2 -r 30 -s 640x480 -input_format h264
-i /dev/video1 -f alsa -ar 48000 -ac 2 -i hw:0 -vcodec copy -acodec copy

In record case, it seems ffmpeg get audio slower than usb device capture
the sound, such that the buffer overflow, right?
Does anyone have idea how to avoid the issue about "ALSA buffer xrun" when
ffmpeg capture sound from usb sound card?


More information about the ffmpeg-user mailing list