Tone Mapping Failure on Blackwell GPU

Environment:

  • OS: Debian/Ubuntu LXC in Proxmox 9.1
  • GPU: NVIDIA RTX 5060 Ti (Blackwell)
  • NVIDIA Driver: 595.58.03
  • CDVR FFmpeg: 6.0.2

Issue:
Standard NVENC hardware transcoding works normally. However, any pipeline requiring hardware tone mapping (e.g., hwupload_cuda -> scale_cuda -> h264_nvenc) fails immediately with NV_ENC_ERR_INVALID_PARAM.

Possible Cause:
The bundled static FFmpeg 6.0.2 appears to be compiled against older nv-codec-headers. It seems the headers fail to properly register the input hardware frame/memory layout required by the newer NVENC v13.0 API on Blackwell GPUs.

Testing:
When executing the same pipeline in the LXC using a current ffmpeg (master-latest-linux64-gpl), the encode succeeds at >160fps.

Failing h264_nvenc+tonemap:

h264_nvenc+tonemap
[Parsed_testsrc_0 @ 0x31cd63c0] size:1280x720 rate:60/1 duration:-1.000000 sar:1/1
[auto_scale_0 @ 0x31cd8d40] w:iw h:ih flags:'' interl:0
[Parsed_format_1 @ 0x31cd6780] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_testsrc_0' and the filter 'Parsed_format_1'
[auto_scale_1 @ 0x31ce6a00] w:iw h:ih flags:'' interl:0
[Parsed_colorspace_2 @ 0x31cd6a00] auto-inserting filter 'auto_scale_1' between the filter 'Parsed_format_1' and the filter 'Parsed_colorspace_2'
[auto_scale_0 @ 0x31cd8d40] w:1280 h:720 fmt:rgb24 sar:1/1 -> w:1280 h:720 fmt:p010le sar:1/1 flags:0x00000004
[auto_scale_1 @ 0x31ce6a00] w:1280 h:720 fmt:p010le sar:1/1 -> w:1280 h:720 fmt:yuv420p10le sar:1/1 flags:0x00000004
    Last message repeated 3 times
Input #0, lavfi, from 'testsrc=size=1280x720:rate=60,format=p010le,colorspace=all=bt2020:iall=bt2020:fast=0':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: wrapped_avframe, 1 reference frame, yuv420p10le(bt2020nc/bt2020/smpte2084), 1280x720 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 60 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (wrapped_avframe (native) -> h264 (h264_nvenc))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0x335ab8c0] w:1280 h:720 pixfmt:yuv420p10le tb:1/60 fr:60/1 sar:1/1
[auto_scale_0 @ 0x335ad240] w:iw h:ih flags:'' interl:0
[trim_in_0_0 @ 0x335abcc0] auto-inserting filter 'auto_scale_0' between the filter 'graph 0 input from stream 0:0' and the filter 'trim_in_0_0'
[auto_scale_0 @ 0x335ad240] w:1280 h:720 fmt:yuv420p10le sar:1/1 -> w:1280 h:720 fmt:p010le sar:1/1 flags:0x00000004
    Last message repeated 3 times
[h264_nvenc @ 0x32685e40] Using input frames context (format cuda) with h264_nvenc encoder.
[h264_nvenc @ 0x32685e40] Loaded Nvenc version 13.0
[h264_nvenc @ 0x32685e40] Nvenc initialized successfully
Output #0, null, to '/dev/null':
  Metadata:
    encoder         : Lavf60.3.100
  Stream #0:0: Video: h264 (High), 1 reference frame, cuda(tv, bt709, progressive), 1280x720 (0x0) [SAR 1:1 DAR 16:9], q=2-31, 4000 kb/s, 60 fps, 60 tbn
    Metadata:
      encoder         : Lavc60.3.100 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 6000000/0/4000000 buffer size: 8000000 vbv_delay: N/A
[h264_nvenc @ 0x32685e40] Error registering an input resource: invalid param (8): 
[h264_nvenc @ 0x32685e40] Could not register an input HW frame
[vost#0:0/h264_nvenc @ 0x32685b40] Error submitting video frame to the encoder
[out#0/null @ 0x32685440] All streams finished
[out#0/null @ 0x32685440] Terminating muxer thread
[h264_nvenc @ 0x32685e40] Nvenc unloaded
Terminating demuxer thread 0
Conversion failed!

Successful Manual Test:

root@channelsdvr:/tmp/ffmpeg-master-latest-linux64-gpl/bin# ./ffmpeg -hide_banner -init_hw_device cuda=cu:0 -filter_hw_device cu -v info -f lavfi -i testsrc -t 1 -f null -
Input #0, lavfi, from 'testsrc':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: wrapped_avframe, rgb24, 320x240 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 25 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (wrapped_avframe (native) -> wrapped_avframe (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf62.13.102
  Stream #0:0: Video: wrapped_avframe, rgb24(pc, gbr/unknown/unknown, progressive), 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn
    Metadata:
      encoder         : Lavc62.29.101 wrapped_avframe
[out#0/null @ 0x5ae355704a80] video:10KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
frame=   25 fps=0.0 q=-0.0 Lsize=N/A time=00:00:01.00 bitrate=N/A speed=47.2x elapsed=0:00:00.02    
root@channelsdvr:/tmp/ffmpeg-master-latest-linux64-gpl/bin# ./ffmpeg -v error -stats \
  -f lavfi -i "testsrc=size=1280x720:rate=60,format=p010le" \
  -vf "hwupload_cuda,scale_cuda=format=yuv420p" \
  -c:v h264_nvenc \
  -f null -
frame=14035 fps=167 q=11.0 Lsize=N/A time=00:03:53.86 bitrate=N/A speed=2.78x elapsed=0:01:24.03     
root@channelsdvr:/tmp/ffmpeg-master-latest-linux64-gpl/bin#

Does an update need to be made on the CDVR ffmpeg or is there anything else I can modify/test to see if I can fix it locally?

Can you try the latest pre-release and let us know if that improves what you're seeing?

Thanks for looking into it. I'm on 2026.04.12.0247 now and still getting the issue. I changed the driver to the 580 branch as well, to get away from CUDA 13.2 and it's still persisting. Here's the logs and nvidia-smi output:

h264_amf
[Parsed_testsrc_0 @ 0x1f348e00] size:1280x720 rate:60/1 duration:-1.000000 sar:1/1
Input #0, lavfi, from 'testsrc=size=1280x720:rate=60':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: wrapped_avframe, 1 reference frame, rgb24, 1280x720 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 60 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (wrapped_avframe (native) -> h264 (h264_amf))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0x1f34fd40] w:1280 h:720 pixfmt:rgb24 tb:1/60 fr:60/1 sar:1/1
[auto_scale_0 @ 0x1f351900] w:iw h:ih flags:'' interl:0
[format @ 0x1f350800] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_null_0' and the filter 'format'
[auto_scale_0 @ 0x1f351900] w:1280 h:720 fmt:rgb24 sar:1/1 -> w:1280 h:720 fmt:yuv420p sar:1/1 flags:0x00000004
[h264_amf @ 0x1f34d000] DLL libamfrt64.so.1 failed to open
[vost#0:0/h264_amf @ 0x1f34c900] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Terminating demuxer thread 0
Conversion failed!
exit status 1
h264_nvenc
[Parsed_testsrc_0 @ 0x16e45e00] size:1280x720 rate:60/1 duration:-1.000000 sar:1/1
Input #0, lavfi, from 'testsrc=size=1280x720:rate=60':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: wrapped_avframe, 1 reference frame, rgb24, 1280x720 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 60 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (wrapped_avframe (native) -> h264 (h264_nvenc))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0x16e67680] w:1280 h:720 pixfmt:rgb24 tb:1/60 fr:60/1 sar:1/1
[auto_scale_0 @ 0x16e69280] w:iw h:ih flags:'' interl:0
[format @ 0x16e680c0] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_null_0' and the filter 'format'
[auto_scale_0 @ 0x16e69280] w:1280 h:720 fmt:rgb24 sar:1/1 -> w:1280 h:720 fmt:gbrp sar:1/1 flags:0x00000004
[h264_nvenc @ 0x16e49c40] Loaded Nvenc version 13.0
[h264_nvenc @ 0x16e49c40] Nvenc initialized successfully
[h264_nvenc @ 0x16e49c40] 1 CUDA capable devices found
[h264_nvenc @ 0x16e49c40] [ GPU #0 - < NVIDIA GeForce RTX 5060 Ti > has Compute SM 12.0 ]
[h264_nvenc @ 0x16e49c40] supports NVENC
Output #0, null, to '/dev/null':
  Metadata:
    encoder         : Lavf60.3.100
  Stream #0:0: Video: h264 (High 4:4:4 Predictive), 1 reference frame, gbrp(pc, gbr/unknown/unknown, progressive), 1280x720 (0x0) [SAR 1:1 DAR 16:9], q=2-31, 4000 kb/s, 60 fps, 60 tbn
    Metadata:
      encoder         : Lavc60.3.100 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 6000000/0/4000000 buffer size: 8000000 vbv_delay: N/A
No more output streams to write to, finishing.
[out#0/null @ 0x16e49200] All streams finished
[out#0/null @ 0x16e49200] Terminating muxer thread
frame=   60 fps=0.0 q=21.0 Lsize=N/A time=00:00:00.93 bitrate=N/A speed=2.08x    
[AVIOContext @ 0x16e43900] Statistics: 398 bytes written, 0 seeks, 2 writeouts
video:235kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (testsrc=size=1280x720:rate=60):
  Input stream #0:0 (video): 61 packets read (29280 bytes); 61 frames decoded; 
  Total: 61 packets (29280 bytes) demuxed
Output file #0 (/dev/null):
  Output stream #0:0 (video): 60 frames encoded; 60 packets muxed (240688 bytes); 
  Total: 60 packets (240688 bytes) muxed
[h264_nvenc @ 0x16e49c40] Nvenc unloaded
Terminating demuxer thread 0
success in 833ms
h264_nvenc+deint
[Parsed_testsrc_0 @ 0xf9aafc0] size:1280x720 rate:60/1 duration:-1.000000 sar:1/1
[auto_scale_0 @ 0xf9ad080] w:iw h:ih flags:'' interl:0
[Parsed_tinterlace_1 @ 0xf9ab400] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_testsrc_0' and the filter 'Parsed_tinterlace_1'
[auto_scale_0 @ 0xf9ad080] w:1280 h:720 fmt:rgb24 sar:1/1 -> w:1280 h:720 fmt:yuv444p sar:1/1 flags:0x00000004
[Parsed_tinterlace_1 @ 0xf9ab400] mode:1 filter:off h:720 -> h:720
Input #0, lavfi, from 'testsrc=size=1280x720:rate=60,tinterlace=mode=1':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: wrapped_avframe, 1 reference frame, yuv444p, 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 30 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (wrapped_avframe (native) -> h264 (h264_nvenc))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0x10dcf0c0] w:1280 h:720 pixfmt:yuv444p tb:1/30 fr:30/1 sar:1/1
[Parsed_scale_cuda_2 @ 0x10dce480] w:1280 h:720 fmt:yuv444p -> w:720 h:1280 fmt:yuv444p
[h264_nvenc @ 0xfe02000] Using input frames context (format cuda) with h264_nvenc encoder.
[h264_nvenc @ 0xfe02000] Loaded Nvenc version 13.0
[h264_nvenc @ 0xfe02000] Nvenc initialized successfully
Output #0, null, to '/dev/null':
  Metadata:
    encoder         : Lavf60.3.100
  Stream #0:0: Video: h264 (High 4:4:4 Predictive), 1 reference frame, cuda(tv, progressive), 720x1280 (0x0) [SAR 256:81 DAR 16:9], q=2-31, 4000 kb/s, 60 fps, 60 tbn
    Metadata:
      encoder         : Lavc60.3.100 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 6000000/0/4000000 buffer size: 8000000 vbv_delay: N/A
[null @ 0xfe01700] pts (2) < dts (3) in stream 0
[null @ 0xfe01700] pts (10) < dts (11) in stream 0
[null @ 0xfe01700] pts (18) < dts (19) in stream 0
No more output streams to write to, finishing.
[null @ 0xfe01700] pts (26) < dts (27) in stream 0
[null @ 0xfe01700] pts (34) < dts (35) in stream 0
[null @ 0xfe01700] pts (42) < dts (43) in stream 0
[null @ 0xfe01700] pts (50) < dts (51) in stream 0
[out#0/null @ 0xfe01600] All streams finished
[out#0/null @ 0xfe01600] Terminating muxer thread
frame=   30 fps=0.0 q=11.0 Lsize=N/A time=00:00:00.91 bitrate=N/A speed= 3.1x    
[AVIOContext @ 0xf9a8900] Statistics: 398 bytes written, 0 seeks, 2 writeouts
video:81kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (testsrc=size=1280x720:rate=60,tinterlace=mode=1):
  Input stream #0:0 (video): 31 packets read (14880 bytes); 31 frames decoded; 
  Total: 31 packets (14880 bytes) demuxed
Output file #0 (/dev/null):
  Output stream #0:0 (video): 30 frames encoded; 30 packets muxed (82824 bytes); 
  Total: 30 packets (82824 bytes) muxed
[h264_nvenc @ 0xfe02000] Nvenc unloaded
Terminating demuxer thread 0
success in 898ms
h264_nvenc+scaler
[Parsed_testsrc_0 @ 0x41e3fe00] size:1280x720 rate:60/1 duration:-1.000000 sar:1/1
Input #0, lavfi, from 'testsrc=size=1280x720:rate=60':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: wrapped_avframe, 1 reference frame, rgb24, 1280x720 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 60 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (wrapped_avframe (native) -> h264 (h264_nvenc))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0x42e19580] w:1280 h:720 pixfmt:rgb24 tb:1/60 fr:60/1 sar:1/1
[auto_scale_0 @ 0x42e1aec0] w:iw h:ih flags:'' interl:0
[trim_in_0_0 @ 0x42e19980] auto-inserting filter 'auto_scale_0' between the filter 'graph 0 input from stream 0:0' and the filter 'trim_in_0_0'
[auto_scale_0 @ 0x42e1aec0] w:1280 h:720 fmt:rgb24 sar:1/1 -> w:1280 h:720 fmt:rgb0 sar:1/1 flags:0x00000004
[Parsed_scale_cuda_1 @ 0x42e18bc0] w:1280 h:720 fmt:rgb0 -> w:720 h:1280 fmt:rgb0
[h264_nvenc @ 0x41e43c00] Using input frames context (format cuda) with h264_nvenc encoder.
[h264_nvenc @ 0x41e43c00] Loaded Nvenc version 13.0
[h264_nvenc @ 0x41e43c00] Nvenc initialized successfully
Output #0, null, to '/dev/null':
  Metadata:
    encoder         : Lavf60.3.100
  Stream #0:0: Video: h264 (High), 1 reference frame, cuda(pc, gbr/unknown/unknown, progressive), 720x1280 (0x0) [SAR 256:81 DAR 16:9], q=2-31, 4000 kb/s, 60 fps, 60 tbn
    Metadata:
      encoder         : Lavc60.3.100 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 6000000/0/4000000 buffer size: 8000000 vbv_delay: N/A
No more output streams to write to, finishing.
[out#0/null @ 0x41e43200] All streams finished
[out#0/null @ 0x41e43200] Terminating muxer thread
frame=   60 fps=0.0 q=12.0 Lsize=N/A time=00:00:00.93 bitrate=N/A speed=4.32x    
[AVIOContext @ 0x41e3d900] Statistics: 398 bytes written, 0 seeks, 2 writeouts
video:87kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (testsrc=size=1280x720:rate=60):
  Input stream #0:0 (video): 61 packets read (29280 bytes); 61 frames decoded; 
  Total: 61 packets (29280 bytes) demuxed
Output file #0 (/dev/null):
  Output stream #0:0 (video): 60 frames encoded; 60 packets muxed (88823 bytes); 
  Total: 60 packets (88823 bytes) muxed
[h264_nvenc @ 0x41e43c00] Nvenc unloaded
Terminating demuxer thread 0
success in 587ms
h264_nvenc+tonemap
[Parsed_testsrc_0 @ 0x41c503c0] size:1280x720 rate:60/1 duration:-1.000000 sar:1/1
[auto_scale_0 @ 0x41c52d40] w:iw h:ih flags:'' interl:0
[Parsed_format_1 @ 0x41c50780] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_testsrc_0' and the filter 'Parsed_format_1'
[auto_scale_1 @ 0x41c60a00] w:iw h:ih flags:'' interl:0
[Parsed_colorspace_2 @ 0x41c50a00] auto-inserting filter 'auto_scale_1' between the filter 'Parsed_format_1' and the filter 'Parsed_colorspace_2'
[auto_scale_0 @ 0x41c52d40] w:1280 h:720 fmt:rgb24 sar:1/1 -> w:1280 h:720 fmt:p010le sar:1/1 flags:0x00000004
[auto_scale_1 @ 0x41c60a00] w:1280 h:720 fmt:p010le sar:1/1 -> w:1280 h:720 fmt:yuv420p10le sar:1/1 flags:0x00000004
    Last message repeated 3 times
Input #0, lavfi, from 'testsrc=size=1280x720:rate=60,format=p010le,colorspace=all=bt2020:iall=bt2020:fast=0':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: wrapped_avframe, 1 reference frame, yuv420p10le(bt2020nc/bt2020/smpte2084), 1280x720 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 60 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (wrapped_avframe (native) -> h264 (h264_nvenc))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0x435be980] w:1280 h:720 pixfmt:yuv420p10le tb:1/60 fr:60/1 sar:1/1
[auto_scale_0 @ 0x435c0300] w:iw h:ih flags:'' interl:0
[trim_in_0_0 @ 0x435bed40] auto-inserting filter 'auto_scale_0' between the filter 'graph 0 input from stream 0:0' and the filter 'trim_in_0_0'
[auto_scale_0 @ 0x435c0300] w:1280 h:720 fmt:yuv420p10le sar:1/1 -> w:1280 h:720 fmt:p010le sar:1/1 flags:0x00000004
    Last message repeated 3 times
[h264_nvenc @ 0x425ffe40] Using input frames context (format cuda) with h264_nvenc encoder.
[h264_nvenc @ 0x425ffe40] Loaded Nvenc version 13.0
[h264_nvenc @ 0x425ffe40] Nvenc initialized successfully
[h264_nvenc @ 0x425ffe40] InitializeEncoder failed: invalid param (8): 10-bit encoding not supported with this profile.
[h264_nvenc @ 0x425ffe40] Nvenc unloaded
[vost#0:0/h264_nvenc @ 0x425ffb40] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Terminating demuxer thread 0
Conversion failed!
exit status 1
h264_vaapi@/dev/dri/card0
no such file or directory
h264_vaapi@/dev/dri/renderD128
[AVHWDeviceContext @ 0x46930c40] libva: VA-API version 1.22.0
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [95]
param: 4, val: 0
i915 does not support EXECBUFER2
DRM_IOCTL_VERSION, unsupported drm device by media driver: nvid
DRM_IOCTL_VERSION, unsupported drm device by media driver: nvid
[AVHWDeviceContext @ 0x46930c40] libva: driver init failed
[AVHWDeviceContext @ 0x46930c40] libva: va_openDriver() returns 18
[AVHWDeviceContext @ 0x46930c40] Failed to initialise VAAPI connection: 18 (invalid parameter).
signal: segmentation fault
h264_vaapi@/dev/dri/renderD129
no such file or directory
h264_vaapi@/dev/renderD128
no such file or directory
root@channelsdvr:~# nvidia-smi
Mon Apr 13 17:10:40 2026       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.142                Driver Version: 580.142        CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 5060 Ti     Off |   00000000:AF:00.0 Off |                  N/A |
|  0%   44C    P1             19W /  180W |    2312MiB /  16311MiB |      1%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+
root@channelsdvr:~# 

It looks like the issue is still in the heading for encoding on Blackwell GPUs:

[h264_nvenc @ 0x425ffe40] InitializeEncoder failed: invalid param (8): 10-bit encoding not supported with this profile.

I did find a permissions issue on the render group in my LXC, but fixing that didn't change anything. Any other logs I can provide to help you guys?

Please submit diagnostics again.

Submitted. The log ends in ae01c6.

Any followup on this issue? I updated to the 2026.04.21.0659 and it's still failing. I've done further digging and think I've further isolated the issue.

I get an immediate Segmentation Fault when attempting to use hardware tonemap_cuda with driver 580.142 in Trixie. NVENC works fine, but any CUDA compute filter (scale_cuda, tonemap_cuda) instantly crashes. Strace confirms a SIGSEGV (SEGV_MAPERR) immediately after the static FFmpeg binary loads the host's dynamic ld-linux-x86-64.so.2 as a dependency of libcuda.so.1. This appears to be a glibc/TLS collision caused by loading the dynamic NVIDIA driver into the statically linked FFmpeg binary.

Here's the strace:

root@channelsdvr:~# strace -f -o /tmp/channels_ffmpeg_crash.log /opt/channels-dvr/latest/ffmpeg -v fatal -hwaccel cuda -hwaccel_output_format cuda -f lavfi -i testsrc=size=1920x1080:duration=1 -vf "hwupload_cuda,scale_cuda=1280:720,hwdownload,format=yuv420p" -c:v h264_nvenc -f null /dev/null
Segmentation fault
root@channelsdvr:~# 

Here's where it fails:

1171  open("/lib/x86_64-linux-gnu/libcuda.so.1", O_RDONLY|O_CLOEXEC) = 3
1171  fstat(3, {st_mode=S_IFREG|0755, st_size=96280424, ...}) = 0
1171  mmap(NULL, 96772160, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x73ee778de000
1171  mprotect(0x73ee77a44000, 93515776, PROT_NONE) = 0
1171  close(3)                          = 0
1171  open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
1171  mmap(NULL, 2047568, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x73ee775fa000
1171  close(3)                          = 0
1171  open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
1171  mmap(NULL, 16400, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x73ee775f0000
1171  close(3)                          = 0
1171  open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
1171  mmap(NULL, 16400, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x73ee775eb000
1171  close(3)                          = 0
1171  open("/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2", O_RDONLY|O_CLOEXEC) = 3
1171  read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\322\1\0\0\0\0\0"..., 832) = 832
1171  fstat(3, {st_mode=S_IFREG|0755, st_size=225672, ...}) = 0
1171  mmap(NULL, 226792, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x73ee775b3000
1171  mmap(0x73ee775b4000, 163840, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x73ee775b4000
1171  mmap(0x73ee775dc000, 45056, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x29000) = 0x73ee775dc000
1171  mmap(0x73ee775e7000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x34000) = 0x73ee775e7000
1171  mmap(0x73ee775ea000, 1512, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x73ee775ea000
1171  close(3)                          = 0
1171  mprotect(0x73ee775e7000, 8192, PROT_READ) = 0
1171  mprotect(0x73ee777db000, 16384, PROT_READ) = 0
1171  mprotect(0x73ee775ee000, 4096, PROT_READ) = 0
1171  mprotect(0x73ee775f3000, 4096, PROT_READ) = 0
1171  mprotect(0x73ee775f8000, 4096, PROT_READ) = 0
1171  mprotect(0x73ee778dc000, 4096, PROT_READ) = 0
1171  mprotect(0x73ee7d373000, 1265664, PROT_READ) = 0
1171  --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x29a20} ---
1186  <... futex resumed>)              = ?
1186  +++ killed by SIGSEGV +++
1185  +++ killed by SIGSEGV +++
1184  +++ killed by SIGSEGV +++
1183  +++ killed by SIGSEGV +++
1182  +++ killed by SIGSEGV +++
1181  +++ killed by SIGSEGV +++
1180  +++ killed by SIGSEGV +++
1179  +++ killed by SIGSEGV +++
1178  +++ killed by SIGSEGV +++
1177  +++ killed by SIGSEGV +++
1176  +++ killed by SIGSEGV +++
1175  +++ killed by SIGSEGV +++
1174  +++ killed by SIGSEGV +++
1173  +++ killed by SIGSEGV +++
1172  +++ killed by SIGSEGV +++
1171  +++ killed by SIGSEGV +++