Demonstrate creating an ffmpeg
image with Nix.
📝 TODO:
- mpeg_5 https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/ffmpeg/5.nix
- Reduce image size
# build ffmpeg
docker build -f Dockerfile.builder -t nix-builder .
# create image
docker run -v $(pwd):/build -it nix-builder
# debugging
docker run -v $(pwd):/build -it --entrypoint /bin/sh nix-builder
nix-build ./ffmpeg-full.nix
# load image into local registry
docker load < ffmpeg-image
# should be most recent image
docker images
# show version
docker run -v $(pwd):/output -it ffmpeg ffmpeg
# jump into bash in container
docker run -v $(pwd):/output -it ffmpeg:latest ffmpeg -f lavfi -i testsrc=size=1920x1080 -t 20 -pix_fmt yuv420p -vf "drawtext=fontfile=/windows/fonts/arial.ttf:text='Testcard':fontcolor=white:fontsize=100" /output/testcard_1080p2.mp4
# build ffmpeg
docker build -f Dockerfile.ffmpeg -t nix-ffmpeg .
# debugging
docker run -v $(pwd):/output -it --entrypoint /bin/sh nix-ffmpeg
# show build
docker run -v $(pwd):/output -it nix-ffmpeg
# output a testcard
docker run -v $(pwd):/output -it nix-ffmpeg ffmpeg -f lavfi -i testsrc=size=1920x1080 -t 20 -pix_fmt yuv420p -vf "drawtext=fontfile=/windows/fonts/arial.ttf:text='Testcard':fontcolor=white:fontsize=100" /output/testcard_1080p.mp4
- ffmpeg 5 linux install with the nixpkgs package manager video here
- NapoleonWils0n/cerberus repo here
- nixpkgs/pkgs/development/libraries/ffmpeg-full/default.nix here
- nixpkgs/pkgs/development/libraries/ffmpeg here