Table of contents

ffmpeg-gpu — FFmpeg with GPU encode / decode

A custom FFmpeg build with NVIDIA NVENC, NVDEC, and CUDA filters enabled. Drop-in ffmpeg CLI for hardware-accelerated video work.

Image tag

docker.io/manvarharsh/ffmpeg-gpu:cuda12

What’s in this image

  • Base: nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04
  • FFmpeg built with --enable-nvenc --enable-nvdec --enable-cuda-nvcc
  • nv-codec-headers
  • Python 3.10 with huggingface-hub CLI for fetching assets
  • OpenSSH server

Default ports

PortService
22SSH
8000API / app port (if you wrap FFmpeg behind a service)

Use cases

  • GPU-accelerated video transcoding (H.264, H.265, AV1, VP9)
  • Real-time video pipelines (NVDEC → CUDA filter → NVENC)
  • Batch encoding of large video archives
  • Frame extraction for ML training datasets

Quick test

ffmpeg -hwaccel cuda -i input.mp4 -c:v h264_nvenc -preset p5 output.mp4

Environment variables

VariableDescription
ENABLE_SSHEnable SSH server
SSH_PUBLIC_KEYPublic key for SSH

Persistence

Mount at /data. Input video under /data/input/, output under /data/output/.

See also