[FFmpeg-devel] [PATCH v3 1/1] avdevice/gdigrab: Add use_captureblt option for disable or use CAPTUREBLT flag, when useing the bitblt function with CAPTUREBLT it caused the mouse cursor flicker. most time we don't need this flag to capture window
fgodt
fgodtdev at hotmail.com
Tue Dec 31 04:20:59 EET 2019
On 2019/12/31 上午1:37, Calvin Walton wrote:
> On Mon, 2019-12-30 at 12:31 +0100, Marton Balint wrote:
>> On Mon, 30 Dec 2019, fgodtdev at hotmail.com wrote:
>>
>>> From: FgoDt <fgodtdev at hotmail.com>
>>> + at item use_captureblt
>>> +When use gdigrab to capture window or desktop, the mouse cursor
>>> will flicker.
>> Why? Does this happen with every windows version? This does not seem
>> like
>> the right fix. In fact, I dont't see how this can work, because mouse
>> is
>> drawn upon the captured video "manually" in paint_mouse_pointer.
>> Could you
>> dig deeper what is the main cause of the issue?
> I'm guessing that what happens here is that on some OS versions, with
> some graphics drivers, the cursor on the *real* display might flicker
> while ffmpeg is capturing. I've never actually seen this happen, but if
> you have bad/old drivers and have desktop compositing disabled, maybe?
sorry i'm not describe clear. as you say the capture video mouse is
"manually" paint,
so the flicker is not the video, but windows mouse cursor. the reason is
CAPTUREBLT flag
use to capture layered window, and the animated cursors or software
cursor became know
as layered window in Windows. so when we call bitblt with CAPTUREBLT
windows will hide
cursor do capture , and then reshow the cursor,this will make Windows
mouse cursor flicker.
if user not capture layered window, without CAPTUREBLT flag does not
change anything.
see details
https://docs.microsoft.com/en-us/previous-versions/technet-magazine/dd392008(v=msdn.10)?redirectedfrom=MSDN
>>> +Disable CAPTUREBLT FLAG by set value @code{0} to fix cursor
>>> flickering. Default value is @code{1}
>>> +
>> Doesn't this change what is captured when the user captures a single
>> window and something is dragged on top? That alone might be a useful
>> addition, but the documentation as is would be totally misleading.
> Yes, this definitely needs to be clarified in docs.
>
> Another thing to check: If the cursor is included in the captured image
> when the CAPTUREBLT flag is disabled, then you should make ffmpeg skip
> adding the cursor itself in that case.
>
Thanks ,seem the doc need describe the flicker is windows self mouse not
the capture video
More information about the ffmpeg-devel
mailing list