[FFmpeg-trac] #11539(ffmpeg:new): ffmpeg hangs when using gdigrab with show_region on Windows
FFmpeg
trac at avcodec.org
Mon Apr 7 15:51:17 EEST 2025
#11539: ffmpeg hangs when using gdigrab with show_region on Windows
-------------------------------------+-------------------------------------
Reporter: elem | Type: defect
Status: new | Priority: minor
Component: ffmpeg | Version: 7.1
Keywords: gdigrab | Blocked By:
show_region hang |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
How to reproduce:
{{{
% ffmpeg -y -f gdigrab -show_region 1 -offset_x 20 -offset_y 20
-video_size 400x80 -i desktop -vcodec libx264 -preset ultrafast -pix_fmt
yuv420p "C:\temp\test.mp4"
ffmpeg version 7.1.1-full_build-www.gyan.dev
built with gcc 14.2.0 (Rev1, Built by MSYS2 project)
}}}
Then if you move your cursor on the border of the show_region window,
Windows will show a "working in background" cursor. If you click it
multiple times, Windows will show an "app not responding" window.
ffmpeg doesn't hang on versions 5.x so I did a bisect and the issue
appeared with commit d8bf53710f. I guess the big CLI multithreading
refactoring done in 6.x and ffmpeg having to draw UI for show_region don't
work well together.
Using ffmpeg built with commit d8bf53710f, I have this warning: "Thread
message queue blocking; consider raising the thread_queue_size option".
With the latest non hanging commit cc2b7f4625, no warning, because
thread_queue_size was 0, but if I understand correctly since the CLI
multithreading refactoring, thread_queue_size is always at least 1.
I'm not sure if this is reproducible on Linux. Let me know if I can help
in any way.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11539>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list