fluent-ffmpeg-simplified: A much simpler implementation of fluent-ffmpeg
This is a reimplementation of fluent-ffmpeg, aimed to be much simpler in code, and free from tech debt and old development practices. Due to that, there are several differences that one should be aware of.
This will not work
import { FFmpegCommand } from "fluent-ffmpeg-simplified";
const command = FFmpegCommand(...) // !!!Please add new before FFmpegCommand
All methods that are listed as aliases in fluent-ffmpeg's README aren't implemented. Please use the main function names.
This package integrates ffmpeg-multistream, allowing you to specify multiple output files/streams and have separate options for them.
Due to this greater flexibility, an output must be specified using the output method before running the command. Methods like save() and stream() don't exist. If you want to get an output stream, pass a PassThrough stream to output.
Because each output can have its own options, an output must be specified before any output option methods are called.
const command = new FFmpegCommand();
command.audioFrequency(...).output(...); // This does not work
command.output(...).audioFrequency(...); // Do this insteadThose seems to be rare use cases, and thus are not included here.
Due to explicit output requirement, event handlers receiving stdout will always get an empty string.
Please use the standard AbortController mechanism.
Instead of a custom-made process handler, this package uses the battle-tested execa package, which should be more robust and handles more edge cases.
No npm packages are published for this yet. For now, use the pkg.pr.new install links.