Body: <p>I was recording screencasts on Ubuntu 16.04 for youtube with my plantronics headset <em>C520-M</em> which worked just nice. I was using ffmpeg successfully.</p>
  
  <p>Now I wanted to add some "live" video explaining things at a whiteboard, to make the video more attractive.</p>
  
  <p>I was planning to record the live view with <em>Logitech HD Pro Webcam C920</em>, which also has builtin microphones that work not that bad. I can not use the headset for sound, since the whiteboard is too far away from the computer... (plus it might look weird).</p>
  
  <p>I was using this command:</p>
  
  <pre><code>ffmpeg -f v4l2 -framerate 25  -video_size 1280x720 -i /dev/video1 \
         -f alsa -ac 2 -thread_queue_size 1024 -i default \
          output.mkv
  </code></pre>
  
  <p>That always resulted in </p>
  
  <blockquote>
    <p>[alsa @ 0x69d540] Thread message queue blocking; consider raising the thread_queue_size option (current value: 1024)</p>
  </blockquote>
  
  <p>The sound then stops at this point for the rest of the recording.</p>
  
  <p>Thus I have a couple of questions:</p>
  
  <ul>
  <li>Why does it happen that the audio queue blocks?</li>
  <li>How far should I raise the thread_queue_size?</li>
  <li>How can I avoid that the audio queue blocks?</li>
  <li>Which audio input should I use - actually I tried all of them an the sound stops at some point.</li>
  </ul>
  
  <p>Thanks for any hints.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-12T06:47:26.273Z
Comments.Text: Hi, similar problem here, what maximum value for `thread_queue_size` did you found to work for you?
Comments.UserDisplayName: Alf
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-09-05T23:33:11.987Z
Comments.Text: I have the same issue. I was thought thread_queue_size 1024 is a big number, but I still got that error after about 2 hours streaming
Comments.UserDisplayName: boygiandi
Tags: <ffmpeg><youtube>
Title: Recording for Youtube: ffmpeg Thread message queue blocked
UserDisplayName: cornelinux
ThreadText: # Recording for Youtube: ffmpeg Thread message queue blocked
  
  (Asked by: username_0 on 2018-01-25)
  
  I was recording screencasts on Ubuntu 16.04 for youtube with my plantronics headset *C520-M* which worked just nice. I was using ffmpeg successfully.
  
  Now I wanted to add some "live" video explaining things at a whiteboard, to make the video more attractive.
  
  I was planning to record the live view with *Logitech HD Pro Webcam C920*, which also has builtin microphones that work not that bad. I can not use the headset for sound, since the whiteboard is too far away from the computer... (plus it might look weird).
  
  I was using this command:
  
  ```
  ffmpeg -f v4l2 -framerate 25  -video_size 1280x720 -i /dev/video1 \
         -f alsa -ac 2 -thread_queue_size 1024 -i default \
          output.mkv
  
  ```
  
  That always resulted in
  
  > [alsa @ 0x69d540] Thread message queue blocking; consider raising the thread\_queue\_size option (current value: 1024)
  
  The sound then stops at this point for the rest of the recording.
  
  Thus I have a couple of questions:
  
  * Why does it happen that the audio queue blocks?
  * How far should I raise the thread\_queue\_size?
  * How can I avoid that the audio queue blocks?
  * Which audio input should I use - actually I tried all of them an the sound stops at some point.
  
  Thanks for any hints.
  
  **Tags:** ffmpeg, youtube
  
  > **Comments:**
  > **username_1**: Hi, similar problem here, what maximum value for `thread_queue_size` did you found to work for you?  
  > **username_2**: I have the same issue. I was thought thread_queue_size 1024 is a big number, but I still got that error after about 2 hours streaming  
  
  ---
  
  ## 0 answers
  
  