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

bring nvidia2004 up2date with nvidia-headers and cuda containers #315

Closed csreynolds closed 2 years ago

csreynolds commented 2 years ago

Will fix #314

verified on: host machine: fedora34 docker-ce-20.10.8-3.fc34.x86_64 nvidia-docker2-2.5.0-3.noarch nvidia-driver-470.63.01-2.fc34.x86_64 cuda-11.4.0-1.fc34.x86_64 VGA compatible controller: NVIDIA Corporation GP106GL [Quadro P2000] (rev a1)

INPUT="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
OUTPUT="output.mkv"
docker build . -t nvidia-ffmpeg-2004
docker run --privileged --gpus all -v $(pwd):$(pwd) -w $(pwd) nvidia-ffmpeg-2004 -hwaccel cuvid -c:v h264_cuvid -i ${INPUT} -vf scale_npp=1280:-1 -c:v h264_nvenc -b:v 2048k  -y ${OUTPUT}
vade commented 2 years ago

Thanks for this!

jrottenberg commented 2 years ago

Oh that's great, thank you , definitely a worthy change, can you make it to https://github.com/jrottenberg/ffmpeg/blob/master/templates/Dockerfile-template.nvidia2004#L9 so other ffmpeg versions can benefit of it.

See https://github.com/jrottenberg/ffmpeg/blob/master/README.md#contribute

csreynolds commented 2 years ago

Oh that's great, thank you , definitely a worthy change, can you make it to https://github.com/jrottenberg/ffmpeg/blob/master/templates/Dockerfile-template.nvidia2004#L9 so other ffmpeg versions can benefit of it.

See https://github.com/jrottenberg/ffmpeg/blob/master/README.md#contribute

Done. Wasn't sure if older versions of ffmpeg would build correctly with the new cuda and headers. We'll see soon!

jrottenberg commented 2 years ago

Almost, can you run ./update.py to regenerate all the dockerfiles ?

csreynolds commented 2 years ago

Almost, can you run ./update.py to regenerate all the dockerfiles ?

My bad. I incorrectly assumed running the update script happened during builds.

jrottenberg commented 2 years ago

All good and thank you !