[FFmpeg-user] Question regarding "Thread message queue blocking"
imalkevich at gmail.com
imalkevich at gmail.com
Wed Mar 10 08:01:16 EET 2021
Hi Team,
I have a question about the following log entry appearing when running FFmpeg – “Thread message queue blocking; consider raising the thread_queue_size option (current value: %d)”:
I’m asking because in my Team we are trying to use FFmpeg for video processing purposes and one of my colleagues can easily reproduce this issue by spinning up another instance of FFmpeg process using the following command: `ffmpeg -f lavfi -i testsrc2=s=1920x1080:r=30 -f lavfi -i sine -c:a aac -ar 48000 -b:a 64k -c:v libx264 -crf 10 -preset slow -pix_fmt yuv420p -f mpegts - > NUL`.
And then he easily gets the mentioned warning and experiences frames dropping and overall degradation of performance.
In attempt to understand what is going on there, I added the following logs into “\FFmpeg\libavutil\threadmessage.c”:
And not surprisingly when the second FFmpeg process is started on my colleague’s machine, then av_fifo_space goes from 2300 to 0 within a minute…. (and he sees frames dropping)
On my machine I’m having a different situation – my main process stays steady with av_fifo_space at 2300 even if the second process is started, but the second process itself after ~5 seconds of running hits into av_fifo_space to 0 – here are the log entries added by me collected on my machine for the second process:
I spent decent amount of time trying to understand what is going on and what might be causing issues, thought of adding more logs… but unfortunately I wasn’t able to come up with some other idea… ☹
Based on what I’m seeing from code is something like this (and for sure sorry in case I’m missing something….) – and my main question why I’m having issues with the space taking into account that my machine doesn’t seem overloaded at all at the moment I’m seeing the warning…:
I would really appreciate any help in form of clarification/question/suggestion, anything…
Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 50585 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210310/eaf7661c/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 54063 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210310/eaf7661c/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.jpg
Type: image/jpeg
Size: 47555 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210310/eaf7661c/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 43860 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210310/eaf7661c/attachment-0001.png>
More information about the ffmpeg-user
mailing list