WebAssembly port of FFmpeg

March 25, 2025 ยท View on GitHub

This repository hosts scripts and commands to build WebAssembly port of FFmpeg powering wide.video | Free Online Video Editor and ffmpeg.wide.video | FFmpeg Online.

Build

Default build procedure using docker will produce multiple (gpl, lgpl, simd) artifacts in ./wasm folder:

./scripts/docker-run.sh
	./scripts/docker-init.sh    # execute in container shell
	./scripts/release.sh        # execute in container shell

Alternatively, non-container build can be executed similarly:

sudo -s
./scripts/release.sh

Release script further executes configuration and build of each submodule, which can be called manually as follows:

sudo -s
export FFMPEG_LGPL=true                  # release.sh
export FFMPEG_SKIP_LIBS=false            # release.sh
./scripts/clean.sh                       # release.sh
./scripts/build.sh                       # release.sh
	source scripts/init-emscripten.sh    # build.sh
	./scripts/build-zlib.sh              # build.sh
	./scripts/configure-ffmpeg.sh        # build.sh
	./scripts/build-ffmpeg.sh            # build.sh
	./scripts/customize-ffmpeg.sh        # build.sh

Docker Reattach

Reattach stdin for exited container:

docker ps -q -l              # find container ID (or discover via Docker desktop)
docker start dd3dbe04a7e5    # restart in the background
docker attach dd3dbe04a7e5   # reattach the terminal & stdin

Known Issues