go-ffmpreg
embeddable ffmpeg,ffprobe WASM binaries with a small Go library wrapper
no, the library name is not a typo
yes, you will have to publicly acknowledge the fact you used ffmpreg
as this is GPL
this is a WIP
ffmpeg is built with:
- libx264
- libwebp
- libpng
- giflib
- libjpeg-turbo
- zlib
the resulting binaries are passed through many wasm-opt
optimization passes focusing on speed, and size, such that the resulting embedding binaries are each ~11MB
usage
see cmd/{ffmpeg,ffprobe}
for examples
note since wazero runtime is not aware of a "working directory", all paths passed must be absolute relative to filesystem mount
build
podman build --file=build/build.dockerfile
alternatively with far more optimization passes
podman build --file=build/build.dockerfile --build-arg RELEASE=yes
then copy /build/{ffmpeg,ffprobe}
from resulting image