I am trying to record my game screen on Win11 using ffmpeg using the following:
ffmpeg -f gdigrab -framerate 20 -c:v libx264rgb -crf 0 -preset ultrafast -color_range 2 -offset_x 0 -offset_y 0 -video_size 1920x1080 -i desktop -show_region 1 C:Action!Videooutput.mkv
I get an error message after the ffmpeg info that says:
Unknown decoder ‘libx264rgb’
Error opening input file desktop.
Error opening input files: Decoder not found
In the info it looks like ffmpeg has been compiled with libx264rgb support:
ffmpeg version N-118007-g2f95bc3cb3-20241204 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 14.2.0 (crosstool-NG 1.26.0.120_4d36f27)
configuration: –prefix=/ffbuild/prefix –pkg-config-flags=–static –pkg-config=pkg-config –cross-prefix=x86_64-w64-mingw32- –arch=x86_64 –target-os=mingw32 –enable-gpl –enable-version3 –disable-debug –disable-w32threads –enable-pthreads –enable-iconv –enable-zlib –enable-libfreetype –enable-libfribidi –enable-gmp –enable-libxml2 –enable-lzma –enable-fontconfig –enable-libharfbuzz –enable-libvorbis –enable-opencl –disable-libpulse –enable-libvmaf –disable-libxcb –disable-xlib –enable-amf –enable-libaom –enable-libaribb24 –enable-avisynth –enable-chromaprint –enable-libdav1d –enable-libdavs2 –enable-libdvdread –enable-libdvdnav –disable-libfdk-aac –enable-ffnvcodec –enable-cuda-llvm –enable-frei0r –enable-libgme –enable-libkvazaar –enable-libaribcaption –enable-libass –enable-libbluray –enable-libjxl –enable-libmp3lame –enable-libopus –enable-librist –enable-libssh –enable-libtheora –enable-libvpx –enable-libwebp –enable-libzmq –enable-lv2 –enable-libvpl –enable-openal –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libopenh264 –enable-libopenjpeg –enable-libopenmpt –enable-librav1e –enable-librubberband –enable-schannel –enable-sdl2 –enable-libsoxr –enable-libsrt –enable-libsvtav1 –enable-libtwolame –enable-libuavs3d –disable-libdrm –enable-vaapi –enable-libvidstab –enable-vulkan –enable-libshaderc –enable-libplacebo –enable-libvvenc –enable-libx264 –enable-libx265 –enable-libxavs2 –enable-libxvid –enable-libzimg –enable-libzvbi –extra-cflags=-DLIBTWOLAME_STATIC –extra-cxxflags= –extra-libs=-lgomp –extra-ldflags=-pthread –extra-ldexeflags= –cc=x86_64-w64-mingw32-gcc –cxx=x86_64-w64-mingw32-g++ –ar=x86_64-w64-mingw32-gcc-ar –ranlib=x86_64-w64-mingw32-gcc-ranlib –nm=x86_64-w64-mingw32-gcc-nm –extra-version=20241204
libavutil 59. 47.101 / 59. 47.101
libavcodec 61. 26.100 / 61. 26.100
libavformat 61. 9.100 / 61. 9.100
libavdevice 61. 4.100 / 61. 4.100
libavfilter 10. 6.101 / 10. 6.101
libswscale 8. 12.100 / 8. 12.100
libswresample 5. 4.100 / 5. 4.100
libpostproc 58. 4.100 / 58. 4.100
After running “ffmpeg -codecs” then I do see the following line:
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
(decoders: h264 h264_qsv libopenh264 h264_cuvid)
(encoders: libx264 libx264rgb libopenh264 h264_amf h264_mf h264_nvenc h264_qsv h264_vaapi h264_vulkan)
If I use the following ffmpeg -f gdigrab -framerate 20 -i desktop C:Action!Videooutput.mkv it works fine, however while watching the frame rate, it is not quite hitting 20fps, so I wanted to user a faster/more efficient encoding option to reduce the overhead…
I am testing this on my laptop with an Intel HD Graphics 620 card, before moving over to a desktop with an Nvidia card.
Many thanks in advance
Glyn