Cannot load

I want accelerated ffmpeg encoding with “h264_nvenc” codec.

ffmpeg -i video.mp4 -vcodec h264_nvenc -crf 25 -acodec copy Output.mp4

The above code works fine in “”,
but in “” it gives the following error message.
If i change h264_nvenc to default encoder the code works fine.

Cannot load
[h264_nvenc @ 0x55c3a426b1c0] The minimum required Nvidia driver for nvenc is 378.13 or newer

Why is this error occurring?
Please tell me how to fix the error!

Reproduce the problem situation

nvidia-docker run --gpus all -it --net=host -v /home/ubuntu/workspace/:/workspace -e DISPLAY=unix$DISPLAY

apt-get update
apt-get install -y ffmpeg libsm6 libxext6 libxrender-dev

ffmpeg -i video.mp4 -vcodec h264_nvenc -crf 25 -acodec copy Output.mp4

This is my nvidia-smi result.

root@ip-172-31-28-221:/workspace# nvidia-smi
Mon Mar 30 08:20:28 2020
| NVIDIA-SMI 418.87.01    Driver Version: 418.87.01    CUDA Version: 10.1     |
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|   0  Tesla T4            On   | 00000000:00:1E.0 Off |                    0 |
| N/A   31C    P8     9W /  70W |      0MiB / 15079MiB |      0%      Default |

| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|  No running processes found                                                 |

It looks like ffmpeg used is built with higher version of NVIDIA Video Codec SDK, but the driver you using is an older version.
This error message comes from ffmpeg code nvenc_print_driver_requirement():libavcodec/nvenc.c
You can refer to Using_FFmpeg_with_NVIDIA_GPU_Hardware_Acceleration.pdf from latest 9.1 SDK to know more about how to compile and use ffmpeg or you can switch to an older version of ffmpeg.