jrottenberg / ffmpeg

Docker build for FFmpeg on Ubuntu / Alpine / Centos / Scratch / nvidia / vaapi
https://hub.docker.com/r/jrottenberg/ffmpeg/
Apache License 2.0
1.37k stars 450 forks source link

CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE #395

Open fc6666666 opened 3 weeks ago

fc6666666 commented 3 weeks ago

Hi Team,

thx for this great effort. We are using following cmd to try encoding with nvidia hw support.

docker run --gpus all --runtime=nvidia --rm -v $(pwd):$(pwd) -w $(pwd) jrottenberg/ffmpeg:7.0.1-nvidia2204 -i $(pwd)/t.mkv -c:v h264_nvenc -r 23.976 -g 48 -keyint_min 48 -crf 26 -c:a aac -ac 2 -ar 44100 -b:a 64k -bsf:v h264_mp4toannexb -f hls -hls_time 3 -hls_segment_size 4000000 -hls_playlist_type vod -hls_flags independent_segments $(pwd)/t.m3u8

and it always got terminated with following error:

CleanShot 2024-06-09 at 05 47 03@2x

[h264_nvenc @ 0x563d07d84580] dl_fn->cuda_dl->cuInit(0) failed -> CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE: forward compatibility was attempted on non supported HW [vost#0:0/h264_nvenc @ 0x563d07d81600] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height. [vf#0:0 @ 0x563d07d855c0] Error sending frames to consumers: Unknown error occurred [vf#0:0 @ 0x563d07d855c0] Task finished with error code: -1313558101 (Unknown error occurred) [vf#0:0 @ 0x563d07d855c0] Terminating thread with return code -1313558101 (Unknown error occurred) [vost#0:0/h264_nvenc @ 0x563d07d81600] Could not open encoder before EOF [vost#0:0/h264_nvenc @ 0x563d07d81600] Task finished with error code: -22 (Invalid argument) [vost#0:0/h264_nvenc @ 0x563d07d81600] Terminating thread with return code -22 (Invalid argument) [out#0/hls @ 0x563d07dd90c0] 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 [aac @ 0x563d08c6f540] Qavg: 183.388 Conversion failed!

the system got alreadyt nvidia-docker and driver installed

CleanShot 2024-06-09 at 05 47 56@2x

any ideas why?

templarfelix commented 3 weeks ago

see your scale output, nvidia only allow more than 256pixels outputs.