go-ffmpreg

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2024 License: GPL-3.0

README

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

Directories

Path Synopsis
cmd
embed

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL