#10914: ddagrab filter is not working in ffmpeg 6.1.1 cross-compiled for Windows
x86_32
----------------------------------------+----------------------------------
             Reporter:  Vadim Guchenko  |                     Type:  defect
               Status:  new             |                 Priority:  normal
            Component:  undetermined    |                  Version:  6.1
             Keywords:  ddagrab x86     |               Blocked By:
             Blocking:                  |  Reproduced by developer:  0
Analyzed by developer:  0               |
----------------------------------------+----------------------------------
 Summary of the bug:

 I'm trying to record a video from Windows desktop using Device Duplication
 API (ddagrab filter). I cross-compiled ffmpeg 6.1.1 release for two
 Windows architectures - x86_64 and x86_32. All configuration options are
 same except the architecture. ddagrab filter works fine and records the
 video in ffmpeg compiled for x86_64, but it does not work in ffmpeg
 compiled for x86_32. No files are created. No errors are printed.

 How to reproduce:
 {{{
 % ffmpeg -v 9 -loglevel 99 -filter_complex ddagrab,hwdownload,format=bgra
 -c:v libx264 output.mp4

 ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
   built with gcc 10-win32 (GCC) 20220113
   configuration: --prefix=/ffmpeg --arch=x86_32 --target-os=mingw32
 --cross-prefix=i686-w64-mingw32- --x86asmexe=yasm --extra-ldflags
 ='-static-libgcc -static -lwinpthread -dynamic' --enable-pic --disable-
 static --enable-shared --disable-debug --disable-doc --enable-gpl
 --enable-libx264 --disable-bzlib --disable-iconv --disable-lzma --disable-
 sdl2 --disable-securetransport --disable-xlib --disable-zlib
   libavutil      58. 29.100 / 58. 29.100
   libavcodec     60. 31.102 / 60. 31.102
   libavformat    60. 16.100 / 60. 16.100
   libavdevice    60.  3.100 / 60.  3.100
   libavfilter     9. 12.100 /  9. 12.100
   libswscale      7.  5.100 /  7.  5.100
   libswresample   4. 12.100 /  4. 12.100
   libpostproc    57.  3.100 / 57.  3.100
 Splitting the commandline.
 Reading option '-v' ... matched as option 'v' (set logging level) with
 argument '9'.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument '99'.
 Reading option '-filter_complex' ... matched as option 'filter_complex'
 (create a complex filtergraph) with argument
 'ddagrab,hwdownload,format=bgra'.
 Reading option '-c:v' ... matched as option 'c' (codec name) with argument
 'libx264'.
 Reading option 'output.mp4' ... matched as output url.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option v (set logging level) with argument 9.
 Applying option filter_complex (create a complex filtergraph) with
 argument ddagrab,hwdownload,format=bgra.
 [AVFilterGraph @ 011263c0] Setting 'pix_fmts' to value 'bgra'
 Successfully parsed a group of options.
 Parsing a group of options: output url output.mp4.
 Applying option c:v (codec name) with argument libx264.
 Successfully parsed a group of options.
 Opening an output file: output.mp4.
 [out#0/mp4 @ 011204c0] Creating output stream from unlabeled output of
 complex filtergraph 0. This overrides automatic video mapping.
 [vost#0:0/libx264 @ 01123800] Created video stream from complex
 filtergraph 0:[format:default]
 [vost#0:0/libx264 @ 01123800]
 [AVFilterGraph @ 0112a800] Setting 'pix_fmts' to value 'bgra'
 detected 20 logical cores
 [format @ 0112dbc0] Setting 'pix_fmts' to value
 
'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21|yuv420p10le|yuv422p10le|yuv444p10le|nv20le|gray|gray10le'
 [auto_scale_0 @ 0112e240] w:iw h:ih flags:'' interl:0
 [format @ 0112dbc0] auto-inserting filter 'auto_scale_0' between the
 filter 'Parsed_format_2' and the filter 'format'
 [AVFilterGraph @ 0112a800] query_formats: 5 queried, 3 merged, 1 already
 done, 0 delayed
 [auto_scale_0 @ 0112e240] picking yuv444p out of 14 ref:bgra alpha:1
 [Parsed_ddagrab_0 @ 0112af80] Created internal hw_device_ctx
 }}}

 This is all output.

 Same command works in ffmpeg compiled for Windows x86_64:
 {{{
 % ffmpeg -v 9 -loglevel 99 -filter_complex ddagrab,hwdownload,format=bgra
 -c:v libx264 output.mp4

 ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
   built with gcc 10-win32 (GCC) 20220113
   configuration: --prefix=/ffmpeg --arch=x86_64 --target-os=mingw64
 --cross-prefix=x86_64-w64-mingw32- --x86asmexe=yasm --extra-ldflags
 ='-static-libgcc -static -lwinpthread -dynamic' --enable-pic --disable-
 static --enable-shared --disable-debug --disable-doc --enable-gpl
 --enable-libx264 --disable-bzlib --disable-iconv --disable-lzma --disable-
 sdl2 --disable-securetransport --disable-xlib --disable-zlib
   libavutil      58. 29.100 / 58. 29.100
   libavcodec     60. 31.102 / 60. 31.102
   libavformat    60. 16.100 / 60. 16.100
   libavdevice    60.  3.100 / 60.  3.100
   libavfilter     9. 12.100 /  9. 12.100
   libswscale      7.  5.100 /  7.  5.100
   libswresample   4. 12.100 /  4. 12.100
   libpostproc    57.  3.100 / 57.  3.100
 Splitting the commandline.
 Reading option '-v' ... matched as option 'v' (set logging level) with
 argument '9'.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument '99'.
 Reading option '-filter_complex' ... matched as option 'filter_complex'
 (create a complex filtergraph) with argument
 'ddagrab,hwdownload,format=bgra'.
 Reading option '-c:v' ... matched as option 'c' (codec name) with argument
 'libx264'.
 Reading option 'output.mp4' ... matched as output url.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option v (set logging level) with argument 9.
 Applying option filter_complex (create a complex filtergraph) with
 argument ddagrab,hwdownload,format=bgra.
 [AVFilterGraph @ 0000023372409f00] Setting 'pix_fmts' to value 'bgra'
 Successfully parsed a group of options.
 Parsing a group of options: output url output.mp4.
 Applying option c:v (codec name) with argument libx264.
 Successfully parsed a group of options.
 Opening an output file: output.mp4.
 [out#0/mp4 @ 0000023372407ac0] Creating output stream from unlabeled
 output of complex filtergraph 0. This overrides automatic video mapping.
 [vost#0:0/libx264 @ 0000023372407000] Created video stream from complex
 filtergraph 0:[format:default]
 [vost#0:0/libx264 @ 0000023372407000]
 [AVFilterGraph @ 00000233724075c0] Setting 'pix_fmts' to value 'bgra'
 detected 20 logical cores
 [format @ 0000023373d21cc0] Setting 'pix_fmts' to value
 
'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21|yuv420p10le|yuv422p10le|yuv444p10le|nv20le|gray|gray10le'
 [auto_scale_0 @ 0000023373d22980] w:iw h:ih flags:'' interl:0
 [format @ 0000023373d21cc0] auto-inserting filter 'auto_scale_0' between
 the filter 'Parsed_format_2' and the filter 'format'
 [AVFilterGraph @ 00000233724075c0] query_formats: 5 queried, 3 merged, 1
 already done, 0 delayed
 [auto_scale_0 @ 0000023373d22980] picking yuv444p out of 14 ref:bgra
 alpha:1
 [Parsed_ddagrab_0 @ 000002337240ed40] Created internal hw_device_ctx
 [Parsed_ddagrab_0 @ 000002337240ed40] Using IDXGIOutput5 interface
 [Parsed_ddagrab_0 @ 000002337240ed40] Opened dxgi output 0 with dimensions
 1920x1080
 [Parsed_ddagrab_0 @ 000002337240ed40] Updated pointer shape texture
 [Parsed_ddagrab_0 @ 000002337240ed40] Probed 8 bit RGB frame format
 [auto_scale_0 @ 0000023373d22980] w:1920 h:1080 fmt:bgra sar:1/1 -> w:1920
 h:1080 fmt:yuv444p sar:1/1 flags:0x00000004
 [out#0/mp4 @ 0000023372407ac0] No explicit maps, mapping streams
 automatically...
 [file @ 0000023300b2b8c0] Setting default whitelist 'file,crypto,data'
 Successfully opened the file.
 Stream mapping:
   format:default -> Stream #0:0 (libx264)
 Press [q] to stop, [?] for help
 [auto_scale_0 @ 0000023373d22980] w:1920 h:1080 fmt:bgra sar:1/1 -> w:1920
 h:1080 fmt:yuv444p sar:1/1 flags:0x00000004
     Last message repeated 2 times
 [libx264 @ 000002337240abc0] using mv_range_thread = 24
 [libx264 @ 000002337240abc0] using SAR=1/1
 [libx264 @ 000002337240abc0] using cpu capabilities: MMX2 SSE2Fast SSSE3
 SSE4.2 AVX FMA3 BMI2 AVX2
 [libx264 @ 000002337240abc0] profile High 4:4:4 Predictive, level 4.0,
 4:4:4, 8-bit
 [libx264 @ 000002337240abc0] 264 - core 161 - H.264/MPEG-4 AVC codec -
 Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1
 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 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=4 threads=30
 lookahead_threads=5 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=2 keyint=250 keyint_min=25
 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
 Output #0, mp4, to 'output.mp4':
   Metadata:
     encoder         : Lavf60.16.100
   Stream #0:0, 0, 1/15360: Video: h264, 1 reference frame (avc1 /
 0x31637661), yuv444p(tv, unknown/bt709/iec61966-2-1, progressive),
 1920x1080 (0x0) [SAR 1:1 DAR 16:9], 0/1, q=2-31, 30 fps, 15360 tbn
     Metadata:
       encoder         : Lavc60.31.102 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 frame=    0 fps=0.0 q=0.0 size=       0kB time=N/A bitrate=N/A speed=N/A
 [Parsed_ddagrab_0 @ 000002337240ed40] Duplicated output frame
 [vost#0:0/libx264 @ 0000023372407000] Clipping frame in rate conversion by
 0.130669
 [Parsed_ddagrab_0 @ 000002337240ed40] Duplicated output frame
     Last message repeated 4 times
 ...
 }}}

 I execute both commands in Windows 11 x64.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10914>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to