49 lines
1.3 KiB
Markdown
49 lines
1.3 KiB
Markdown
|
# docker-gpu-ffmpeg
|
||
|
|
||
|
Use `ffmpeg` with `docker` and `nvidia` powers to transcode in Debian 11 Bullseye, based on [this nice docker project](https://git.archive.org/www/ffmpeg-gpu)
|
||
|
|
||
|
(__)
|
||
|
(oo)
|
||
|
/------\/
|
||
|
/ | ||
|
||
|
* /\---/\
|
||
|
~~ ~~
|
||
|
..."Have you mooed today?"...
|
||
|
|
||
|
## Requisites
|
||
|
|
||
|
### This project needs docker and docker-compose working with [nvidia runtime](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html)
|
||
|
|
||
|
## Build
|
||
|
|
||
|
$ git clone https://git.manalejandro.com/ale/docker-ffmpeg-gpu
|
||
|
$ cd docker-ffmpeg-gpu && docker-compose build --force-rm
|
||
|
|
||
|
## Usage
|
||
|
|
||
|
### You can use "/ffmpeg" or "/ffmpeg-pascal" for architecture version
|
||
|
|
||
|
$ docker-compose up -d
|
||
|
$ docker-compose run --rm --entrypoint /ffmpeg nvidia-ffmpeg -hwaccels -v 0
|
||
|
|
||
|
Hardware acceleration methods:
|
||
|
vdpau
|
||
|
cuda
|
||
|
vaapi
|
||
|
|
||
|
## Sample decode using CUDA:
|
||
|
|
||
|
$ docker-compose run --rm --entrypoint /ffmpeg nvidia-ffmpeg -hwaccel cuda -i /folder/input /folder/output
|
||
|
|
||
|
## Full hardware transcode with NVDEC and NVENC:
|
||
|
|
||
|
$ docker-compose run --rm --entrypoint /ffmpeg nvidia-ffmpeg -hwaccel cuda -hwaccel_output_format nvdec -i /folder/input -c:v h264_nvenc /folder/output
|
||
|
|
||
|
## Shutdown
|
||
|
|
||
|
$ docker-compose down
|
||
|
|
||
|
## License
|
||
|
|
||
|
MIT
|