This fork compiles a minimal version of FFmpeg to include in a web browser (wasm). The build now includes a focused audio toolset:
- Common audio decoders (AAC, AC3/E-AC3, MP3/MP2, FLAC, ALAC, DTS, TrueHD, Vorbis, Opus, WavPack, several PCM and ADPCM variants) and MP3 encoding via
libmp3lame. - Container demuxing/muxing, subtitle (subrip/ass/webvtt/movtext/dvbsub/pgssub) encode/decode support remain, while video codecs are still excluded for size.
- Enabled audio filters are:
abuffer,aformat,abuffersink,anull,anullsrc,anullsink,aresample,channelmap,pan,volume,atrim,afade,adelay,amix,amerge,asplit,acrossfade,silencedetect,silenceremove,asetpts,asetrate,aeval,acompressor,alimiter,highpass,lowpass,astats.
The main changes of this fork:
Dockerfiledisable all codecs, unnecessary builders andesmbuild.ffmpeg-wasm.shremove link libraries
Building (using make prd) builds two binaries packages/core/dist/umd/ffmpeg-core.{wasm,js}.
Previously the ultra-minimal (no codecs) build wasm was ~3.8MB; with the added audio decoders and MP3 encoder it is ~ 4.4MB
These binaries can be loaded using the @ffmpeg/ffmpeg package and served by the web server.
This project is looking for maintainers. If you are interested to give it a go, please email me to further discuss maintenance.
ffmpeg.wasm is a pure Webassembly / Javascript port of FFmpeg. It enables video & audio record, convert and stream right inside browsers.
Join us on Discord!
Please sponsor ffmpeg.wasm to make it sustainable. ❤️