ffmpeg and the message “Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)” ALSA buffer xrun.


i wa trying to do a fucking screencast with this code

ffmpeg -f alsa -ac 1 -ar 48000 -i hw:1,0 -s 1920×1080 -f x11grab -i :0 -r 30 -vcodec libx264 $file

AND I GOT :

[alsa @ 0x22d9660] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[alsa @ 0x22d9660]

ok …. tried to play the file and -,- weirdo audio

solution THE NEW FUCKING PARAMETER

-thread_queue_size 512

ffmpeg -thread_queue_size 512 -f alsa -ac 1 -ar 48000 -i hw:1,0 -s 1920×1080 -f x11grab -i :0 -r 30 -vcodec libx264 $file

AND it works now

4 Responses to ffmpeg and the message “Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)” ALSA buffer xrun.

  1. rocknroll113 says:

    Thanks for the “-thread_queue_size 512” tip! Helped with my webcam recording – I had to do it for the video too e.g. I ended up with something like

    ffmpeg -thread_queue_size 512 -f alsa -i default -f v4l2 -s 320×240 -thread_queue_size 512 -i /dev/video0 output.mpg

  2. Rajib Aditya says:

    Would you know what this means? I got this while adding a silent wav to a mov. TIA

  3. samir says:

    Thanks for sharing, keep it up

  4. Dirk Krause says:

    Thx! I ended up with this one:
    avconv -async 1 -f video4linux2 -r 25 -i /dev/video0 -thread_queue_size 1024 -f alsa -i plughw:U0x46d0x9a6,0 -ar 22050 -ab 64k -threads auto -strict experimental -acodec aac -qscale 1 -vcodec mpeg4 -y webcam.mp4

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: