Opened 5 years ago
Last modified 12 months ago
#9473 new defect
gdigrab screen captures are interrupted by secure desktop pop-ups
| Reported by: | leopold84 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | ffmpeg |
| Version: | git-master | Keywords: | gdigrab |
| Cc: | leopold84 | Blocked By: | |
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description (last modified by )
Summary of the bug:
If you start screen capture with gdigrab and any secure desktop pop-up will appear (UAC or anything else), capture immediately stops.
How to reproduce:
- Start screen capture using gdigrab device as input
ffmpeg -f gdigrab -framerate 30 -i desktop output.mkv
- Launch any program as administrator or make a secure desktop to appear any other way
- Once returned to the normal desktop, you will see that capture has stopped with the error similar to this one
Failed to capture image (error 5)trate= 2.2kbits/s speed=0.54x desktop: I/O error
Expect result:
If it's not possible to capture secure desktop with gdigrab, it at least shouldn't interrupt the recording (i.e. back screen can be captured while secure desktop is present).
Attachments (1)
Change History (7)
by , 5 years ago
| Attachment: | ffmpeg-20211024-181600.log added |
|---|
comment:1 by , 5 years ago
| Description: | modified (diff) |
|---|
follow-up: 4 comment:3 by , 5 years ago
| Priority: | important → normal |
|---|
This is not a regression, so decreasing priority.
Have you tried running ffmpeg with elevated privileges?
This looks like an enhancement request for an option which enables capturing black frames when BitBlt fails. BitBlt can fail also for locked screen, no display, etc.
comment:4 by , 5 years ago
Replying to Marton Balint:
This is not a regression, so decreasing priority.
Have you tried running ffmpeg with elevated privileges?
This looks like an enhancement request for an option which enables capturing black frames when BitBlt fails. BitBlt can fail also for locked screen, no display, etc.
Running ffmpeg from elevated Command Prompt was the first thing I tried, this doesn't help.
However, I think you might be right regarding the cause of this problem because capture fails with the same error after UAC pop-up and after screen lock.
comment:5 by , 2 years ago
+1, would be great to have the option to continue capture with a blank screen when this happens
comment:6 by , 12 months ago
The issue still exists for both gdigrab and ddagrab.
gdigrab silently stops recording.
ddagrab stops with an error.
E:\FFmpeg\ffmpeg-2025-06-11-git-f019dd69f0-essentials_build\bin\ffmpeg.exe
-hide_banner -thread_queue_size 1024 -rtbufsize 256M -filter_complex ddagrab=video_size=842x606:offset_x=1270:offset_y=480:framerate=30:draw_mouse=1:output_idx=0,hwdownload,format=bgra -vcodec libx264 -b:v 3400k -r 30 -pix_fmt yuv420p -preset fast -movflags +faststart -c:a aac -b:a 192k "C:\Users\user\Videos\Записи IU\capture 2025-06-15 13-16-33_part00.mp4"
[out#0/mp4 @ 000001d3c564ad00] Codec AVOption b:a (set bitrate (in bits/s)) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some decoder which was not actually used for any stream.
Stream mapping:
format:default -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[libx264 @ 000001d3c564ce00] using SAR=1/1
[libx264 @ 000001d3c564ce00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001d3c564ce00] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 000001d3c564ce00] 264 - core 165 r3221 291476d - H.264/MPEG-4 AVC codec - Copyleft 2003-2025 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=abr mbtree=1 bitrate=3400 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'C:\Users\user\Videos\Записи IU\capture 2025-06-15 13-16-33_part00.mp4':
Metadata:
encoder : Lavf62.1.100
Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(tv, unknown/bt709/iec61966-2-1, progressive), 842x606 [SAR 1:1 DAR 421:303], q=2-31, 3400 kb/s, 30 fps, 15360 tbn
Metadata:
encoder : Lavc62.3.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/3400000 buffer size: 0 vbv_delay: N/A
frame= 0 fps=0.0 q=0.0 size= 0KiB time=N/A bitrate=N/A speed=N/A elapsed=0:00:00.50
frame= 0 fps=0.0 q=0.0 size= 0KiB time=N/A bitrate=N/A speed=N/A elapsed=0:00:01.01
frame= 0 fps=0.0 q=0.0 size= 0KiB time=N/A bitrate=N/A speed=N/A elapsed=0:00:01.53
frame= 0 fps=0.0 q=0.0 size= 0KiB time=N/A bitrate=N/A dup=1 drop=0 speed=N/A elapsed=0:00:02.04
frame= 16 fps=6.3 q=2.0 size= 0KiB time=00:00:00.46 bitrate= 0.8kbits/s dup=1 drop=0 speed=0.182x elapsed=0:00:02.55
[Parsed_ddagrab_0 @ 000001d3c5693840] AcquireNextFrame failed: 887a0026
[Parsed_ddagrab_0 @ 000001d3c5693840] EOF timestamp not reliable
[fc#0 @ 000001d3c5645380] Error requesting a frame from the filtergraph: Generic error in an external library
[fc#0 @ 000001d3c5645380] Error sending frames to consumers: Generic error in an external library
[fc#0 @ 000001d3c5645380] Task finished with error code: -542398533 (Generic error in an external library)
[fc#0 @ 000001d3c5645380] Terminating thread with return code -542398533 (Generic error in an external library)
[mp4 @ 000001d3c564ae00] Starting second pass: moving the moov atom to the beginning of the file
[out#0/mp4 @ 000001d3c564ad00] video:24KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 7.596493%
frame= 82 fps= 26 q=-1.0 Lsize= 26KiB time=00:00:02.66 bitrate= 78.8kbits/s dup=1 drop=0 speed=0.841x elapsed=0:00:03.17
[libx264 @ 000001d3c564ce00] frame I:1 Avg QP: 5.90 size: 8788
[libx264 @ 000001d3c564ce00] frame P:21 Avg QP: 3.84 size: 547
[libx264 @ 000001d3c564ce00] frame B:60 Avg QP: 7.16 size: 57
[libx264 @ 000001d3c564ce00] consecutive B-frames: 1.2% 2.4% 3.7% 92.7%
[libx264 @ 000001d3c564ce00] mb I I16..4: 55.3% 40.9% 3.8%
[libx264 @ 000001d3c564ce00] mb P I16..4: 0.3% 0.0% 0.1% P16..4: 0.7% 0.1% 0.0% 0.0% 0.0% skip:98.8%
[libx264 @ 000001d3c564ce00] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.1% 0.0% 0.0% direct: 0.0% skip:99.9% L0:50.0% L1:50.0% BI: 0.0%
[libx264 @ 000001d3c564ce00] final ratefactor: -15.97
[libx264 @ 000001d3c564ce00] 8x8 transform intra:37.3% inter:30.3%
[libx264 @ 000001d3c564ce00] coded y,uvDC,uvAC intra: 3.6% 4.9% 4.6% inter: 0.1% 0.1% 0.1%
[libx264 @ 000001d3c564ce00] i16 v,h,dc,p: 72% 28% 0% 0%
[libx264 @ 000001d3c564ce00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 61% 8% 31% 0% 0% 0% 0% 0% 0%
[libx264 @ 000001d3c564ce00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 30% 25% 2% 3% 2% 3% 4% 3%
[libx264 @ 000001d3c564ce00] i8c dc,h,v,p: 83% 12% 5% 0%
[libx264 @ 000001d3c564ce00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001d3c564ce00] ref P L0: 92.7% 7.3%
[libx264 @ 000001d3c564ce00] ref B L0: 98.2% 1.8%
[libx264 @ 000001d3c564ce00] ref B L1: 96.3% 3.7%
[libx264 @ 000001d3c564ce00] kb/s:69.37
Conversion failed!



Report