0

I am trying to record my Windows 10 desktop with ffmpeg, but I'm getting an issue where the output looks extremely compressed to the point of being corrupted. It's as if only p-frames are getting recorded. example The bitrate is around 2000kbps which seems like it should output something of a reasonable quality. I am recording this on an HDD so I can't use a much higher bitrate. What is causing this issue?

Here's the output:

>ffmpeg -f gdigrab -framerate 30 -i desktop output.mp4
ffmpeg version git-2020-04-15-51db0a4 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200328
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 42.102 / 56. 42.102
  libavcodec     58. 78.102 / 58. 78.102
  libavformat    58. 42.100 / 58. 42.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 77.101 /  7. 77.101
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[gdigrab @ 000001f9f1b2b800] Capturing whole desktop as 1920x1080x32 at (0,0)
[gdigrab @ 000001f9f1b2b800] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, gdigrab, from 'desktop':
  Duration: N/A, start: 1587096782.607949, bitrate: 1990668 kb/s
    Stream #0:0: Video: bmp, bgra, 1920x1080, 1990668 kb/s, 30 fps, 1000k tbr, 1000k tbn, 1000k tbc
File 'output.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (bmp (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 000001f9f1b2fb40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 000001f9f1b2fb40] profile High 4:4:4 Predictive, level 4.0, 4:4:4, 8-bit
[libx264 @ 000001f9f1b2fb40] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - 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=6 lookahead_threads=1 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         : Lavf58.42.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 1920x1080, q=-1--1, 30 fps, 15360 tbn, 30 tbc
    Metadata:
      encoder         : Lavc58.78.102 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame=  373 fps= 33 q=-1.0 Lsize=    3240kB time=00:00:12.33 bitrate=2151.7kbits/s dup=163 drop=0 speed=1.09x
video:3234kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.159573%
[libx264 @ 000001f9f1b2fb40] frame I:3     Avg QP:18.96  size:243024
[libx264 @ 000001f9f1b2fb40] frame P:105   Avg QP:21.24  size: 19988
[libx264 @ 000001f9f1b2fb40] frame B:265   Avg QP:30.07  size:  1825
[libx264 @ 000001f9f1b2fb40] consecutive B-frames:  2.9%  4.8%  6.4% 85.8%
[libx264 @ 000001f9f1b2fb40] mb I  I16..4: 37.5% 27.8% 34.7%
[libx264 @ 000001f9f1b2fb40] mb P  I16..4:  1.6%  1.7%  2.8%  P16..4:  1.8%  0.5%  0.3%  0.0%  0.0%    skip:91.4%
[libx264 @ 000001f9f1b2fb40] mb B  I16..4:  0.2%  0.2%  0.2%  B16..8:  2.3%  0.1%  0.0%  direct: 0.0%  skip:97.0%  L0:47.9% L1:51.3% BI: 0.8%
[libx264 @ 000001f9f1b2fb40] 8x8 transform intra:28.6% inter:37.2%
[libx264 @ 000001f9f1b2fb40] coded y,u,v intra: 36.6% 21.2% 21.4% inter: 0.3% 0.1% 0.1%
[libx264 @ 000001f9f1b2fb40] i16 v,h,dc,p: 40% 59%  1%  1%
[libx264 @ 000001f9f1b2fb40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 16% 39%  1%  1%  1%  1%  1%  3%
[libx264 @ 000001f9f1b2fb40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 33% 14%  3%  4%  4%  5%  3%  5%
[libx264 @ 000001f9f1b2fb40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001f9f1b2fb40] ref P L0: 55.8%  8.5% 25.1% 10.6%
[libx264 @ 000001f9f1b2fb40] ref B L0: 73.1% 24.0%  2.9%
[libx264 @ 000001f9f1b2fb40] ref B L1: 95.7%  4.3%
[libx264 @ 000001f9f1b2fb40] kb/s:2130.59

2
  • How are you playing the capture?
    – Gyan
    Apr 17 '20 at 6:50
  • I'm playing it with MPC-HC. I think I have the correct codecs installed Apr 17 '20 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.