Skip to content

Docker file to enable `nvenc` with the `nvidia-patch` to enable to Nvidia acceleration for ffmpeg to maximise the gpu processing. For ex: use h264 nvenc

Notifications You must be signed in to change notification settings

nguyenv7/ffmpeg-nvidia-docker

 
 

Repository files navigation

NVIDIA accelerated ffmpeg with docker

Build

docker build -t ffnvidia .

Usaging

Only use nvidia encoder

docker run --runtime=nvidia -v host_path:/video  -it ffnvidia ffmpeg -y -i /video/video.mp4  -c:v h264_nvenc output.mp4

Use nvidia decoder and encoder

docker run --runtime=nvidia -v host_path:/video  -it ffnvidia ffmpeg -y -hwaccel_device 0 -hwaccel cuvid -c:v h264_cuvid -i /video/video.mp4 -c:v h264_nvenc output.mp4

Accknowledgement

Usage the patch from https://github.com/keylase/nvidia-patch

NVENC patch removes restriction on maximum number of simultaneous NVENC video encoding sessions imposed by Nvidia to consumer-grade GPUs.

NvFBC patch allows to use NvFBC on consumer-grade GPUs. It should be applied same way as NVENC patch.sh, except you have to use patch-fbc.sh instead.

Main target operating system is GNU/Linux, but for Windows support see win (clickable).

About

Docker file to enable `nvenc` with the `nvidia-patch` to enable to Nvidia acceleration for ffmpeg to maximise the gpu processing. For ex: use h264 nvenc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 55.5%
  • Shell 31.8%
  • C 4.1%
  • C++ 3.9%
  • HTML 2.9%
  • Assembly 0.7%
  • Other 1.1%