Skip to content

Master Sample Encoder nvenc don't support 10 bit source video #1

Description

@YCbCr444

When Master Sample Encoder is selected as nvenc, it will have convert failure due to using h264_nvenc while encoding a 10 bit source video.

I think the possible solutions is to switch to hevc_nvenc, or use cpu to encode the video when detected a 10 bit source video.

Creating master sample from 5 segments...
FATAL error in CQ search: RuntimeError: Master sample creation failed: ffmpeg version 2025-10-01-git-1a02412170-full_build-www.gyan.dev Copyright (c) 2000-2025 the FFmpeg developers

  built with gcc 15.2.0 (Rev8, Built by MSYS2 project)

  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-lcms2 --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-liboapv --enable-libqrencode --enable-librav1e --enable-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-openal --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-liblc3 --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint --enable-whisper

  libavutil      60. 13.100 / 60. 13.100

  libavcodec     62. 16.100 / 62. 16.100

  libavformat    62.  6.100 / 62.  6.100

  libavdevice    62.  2.100 / 62.  2.100

  libavfilter    11.  9.100 / 11.  9.100

  libswscale      9.  3.100 /  9.  3.100

  libswresample   6.  2.100 /  6.  2.100

Input #0, matroska,webm, from 'D:/Documents/VHS_Simulation/out_ntsc1.mkv':

  Metadata:

    creation_time   : 2025-10-20T01:35:36.978378Z

    ENCODER         : Lavf62.6.100

  Duration: 00:02:43.17, start: 0.000000, bitrate: 274174 kb/s

  Stream #0:0: Video: ffv1, yuv444p10le(tv, smpte170m/bt709/smpte170m, progressive), 1920x486, SAR 27:80 DAR 4:3, 29.97 fps, 29.97 tbr, 1k tbn (default)

    Metadata:

      TITLE           : Video

  Stream #0:1(eng): Audio: flac, 192000 Hz, stereo, s32 (24 bit), start 0.007000 (default)

    Metadata:

      TITLE           : Audio

Incompatible pixel format 'yuv444p10le' for codec 'h264_nvenc', auto-selecting format 'yuv444p10msble'

Stream mapping:

  Stream #0:0 (ffv1) -> trim:default

  Stream #0:0 (ffv1) -> trim:default

  Stream #0:0 (ffv1) -> trim:default

  Stream #0:0 (ffv1) -> trim:default

  Stream #0:0 (ffv1) -> trim:default

  concat:out:v0 -> Stream #0:0 (h264_nvenc)

Press [q] to stop, [?] for help

[h264_nvenc @ 00000168f2dd00c0] The selected preset is deprecated. Use p1 to p7 + -tune or fast/medium/slow.

[h264_nvenc @ 00000168f2dd00c0] 10 bit encode not supported

[h264_nvenc @ 00000168f2dd00c0] No capable devices found

[vost#0:0/h264_nvenc @ 00000168f2a0b440] [enc:h264_nvenc @ 00000168f29cdbc0] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.

[fc#0 @ 00000168f29f5c40] Error sending frames to consumers: Generic error in an external library

[fc#0 @ 00000168f29f5c40] Task finished with error code: -542398533 (Generic error in an external library)

[fc#0 @ 00000168f29f5c40] Terminating thread with return code -542398533 (Generic error in an external library)

[vost#0:0/h264_nvenc @ 00000168f2a0b440] [enc:h264_nvenc @ 00000168f29cdbc0] Could not open encoder before EOF

[vost#0:0/h264_nvenc @ 00000168f2a0b440] Task finished with error code: -22 (Invalid argument)

[vost#0:0/h264_nvenc @ 00000168f2a0b440] Terminating thread with return code -22 (Invalid argument)

[out#0/matroska @ 00000168f2a0bac0] Nothing was written into output file, because at least one of its streams received no packets.

frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A elapsed=0:00:00.47    

Conversion failed!


Traceback (most recent call last):
  File "Auto Target Encoder.pyw", line 2585, in find_best_cq_optimized
    master_sample_data, timings['sample_creation_time'] = create_master_sample_in_memory(
  File "Auto Target Encoder.pyw", line 2376, in create_master_sample_in_memory
    raise RuntimeError (f"Master sample creation failed: {result .stderr .decode ('utf-8',errors ='ignore')}")
RuntimeError: Master sample creation failed: ffmpeg version 2025-10-01-git-1a02412170-full_build-www.gyan.dev Copyright (c) 2000-2025 the FFmpeg developers

  built with gcc 15.2.0 (Rev8, Built by MSYS2 project)

  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-lcms2 --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-liboapv --enable-libqrencode --enable-librav1e --enable-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-openal --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-liblc3 --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint --enable-whisper

  libavutil      60. 13.100 / 60. 13.100

  libavcodec     62. 16.100 / 62. 16.100

  libavformat    62.  6.100 / 62.  6.100

  libavdevice    62.  2.100 / 62.  2.100

  libavfilter    11.  9.100 / 11.  9.100

  libswscale      9.  3.100 /  9.  3.100

  libswresample   6.  2.100 /  6.  2.100

Input #0, matroska,webm, from 'D:/Documents/VHS_Simulation/out_ntsc1.mkv':

  Metadata:

    creation_time   : 2025-10-20T01:35:36.978378Z

    ENCODER         : Lavf62.6.100

  Duration: 00:02:43.17, start: 0.000000, bitrate: 274174 kb/s

  Stream #0:0: Video: ffv1, yuv444p10le(tv, smpte170m/bt709/smpte170m, progressive), 1920x486, SAR 27:80 DAR 4:3, 29.97 fps, 29.97 tbr, 1k tbn (default)

    Metadata:

      TITLE           : Video

  Stream #0:1(eng): Audio: flac, 192000 Hz, stereo, s32 (24 bit), start 0.007000 (default)

    Metadata:

      TITLE           : Audio

Incompatible pixel format 'yuv444p10le' for codec 'h264_nvenc', auto-selecting format 'yuv444p10msble'

Stream mapping:

  Stream #0:0 (ffv1) -> trim:default

  Stream #0:0 (ffv1) -> trim:default

  Stream #0:0 (ffv1) -> trim:default

  Stream #0:0 (ffv1) -> trim:default

  Stream #0:0 (ffv1) -> trim:default

  concat:out:v0 -> Stream #0:0 (h264_nvenc)

Press [q] to stop, [?] for help

[h264_nvenc @ 00000168f2dd00c0] The selected preset is deprecated. Use p1 to p7 + -tune or fast/medium/slow.

[h264_nvenc @ 00000168f2dd00c0] 10 bit encode not supported

[h264_nvenc @ 00000168f2dd00c0] No capable devices found

[vost#0:0/h264_nvenc @ 00000168f2a0b440] [enc:h264_nvenc @ 00000168f29cdbc0] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.

[fc#0 @ 00000168f29f5c40] Error sending frames to consumers: Generic error in an external library

[fc#0 @ 00000168f29f5c40] Task finished with error code: -542398533 (Generic error in an external library)

[fc#0 @ 00000168f29f5c40] Terminating thread with return code -542398533 (Generic error in an external library)

[vost#0:0/h264_nvenc @ 00000168f2a0b440] [enc:h264_nvenc @ 00000168f29cdbc0] Could not open encoder before EOF

[vost#0:0/h264_nvenc @ 00000168f2a0b440] Task finished with error code: -22 (Invalid argument)

[vost#0:0/h264_nvenc @ 00000168f2a0b440] Terminating thread with return code -22 (Invalid argument)

[out#0/matroska @ 00000168f2a0bac0] Nothing was written into output file, because at least one of its streams received no packets.

frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A elapsed=0:00:00.47    

Conversion failed!

ML predicts encoding will take ~1m 17s (low confidence)
 🚀 Starting final encode with SVT_AV1 (CQ/CRF: 0)...
Reached 100%, waiting for finalization...
Waiting for FFmpeg to exit...
Verifying output file...
 ✅ Source kept, saved 98.1%

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions