NVIDIA Hardware Accelerated FFmpeg build
100K+
NVENCODE (nvenc) and NVDECODE (formerly CUVID) are packaged in the NVIDIA Video Codec SDK.
List options of an encoder using ffmpeg -h encoder=XXXX
h264_nvenc, nvenc, nvenc_h264nvenc_hevc, hevc_nvencList options of a decoder using ffmpeg -h decoder=XXXX
h264_cuvidhevc_cuvidmjpeg_cuvidmpeg1_cuvidmpeg2_cuvidmpeg4_cuvidvc1_cuvidvp8_cuvidvp9_cuvidList options of a filter using ffmpeg -h filter=XXXX
hwupload_cudascale_cudascale_nppthumnail_cudaRun the container mounting the current directory to /workspace processing
input.mp4 to output.mp4 without any hardware acceleration
$ docker run --rm -it --runtime=nvidia \
--volume $PWD:/workspace \
willprice/nvidia-ffmpeg -i input.mp4 output.avi
$ docker run --rm -it --runtime=nvidia \
--volume $PWD:/workspace \
willprice/nvidia-ffmpeg \
-hwaccel_device 0 \
-hwaccel cuvid \
-c:v h264_cuvid \
-i input.mp4 \
-c:v hevc_nvenc
out.mkv
Get a shell prompt inside the container, useful for debugging:
$ docker run --rm -it --runtime=nvidia \
--volume $PWD:/workspace \
--entrypoint bash
willprice/nvidia-ffmpeg
The docker image is a multistage build. The initial stage, the build stage, builds a statically linked ffmpeg binary that is then copied over into the runtime image. By statically linking we minimize the number of external dependencies and shrink the runtime image.
Content type
Image
Digest
Size
605.7 MB
Last updated
about 6 years ago
docker pull willprice/nvidia-ffmpeg