Low-level FFmpeg bindings for Bare.
npm i bare-ffmpeg
Complete API documentation for all components is available in the /docs directory:
https://github.com/holepunchto/bare-make is used for compiling the native bindings in binding.cc. Start by installing the tool globally:
npm i -g bare-make
Next, generate the build system for compiling the bindings, optionally setting the --debug flag to enable debug symbols and assertions:
bare-make generate [--debug]
This only has to be run once per repository checkout. When updating bare-make or your compiler toolchain it might also be necessary to regenerate the build system. To do so, run the command again with the --no-cache flag set to disregard the existing build system cache:
bare-make generate [--debug] --no-cache
With a build system generated, the bindings can be compiled:
bare-make build
This will compile the bindings and output the resulting shared library module to the build/ directory. To install it into the prebuilds/ directory where the Bare addon resolution algorithm expects to find it, do:
bare-make install
To make iteration faster during development, the shared library module can also be linked into the prebuilds/ directory rather than copied. To do so, set the --link flag:
bare-make install --link
Prior to publishing the module, make sure that no links exist within the prebuilds/ directory as these will not be included in the resulting package archive.
A few compile options can be configured to customize the addon. Compile options may be set by passing the --define option=value flag to the bare-make generate command when generating the build system.
[!WARNING] The compile options are not covered by semantic versioning and are subject to change without warning.
| Option | Default | Description |
|---|---|---|
BARE_FFMPEG_ENABLE_GPL | OFF | Enable GPL-licensed features (e.g, x264) |
Apache-2.0