-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Complex Filter Graphs #5
Comments
Filter escaping is currently broken in the library |
This is such a great library. Thanks for putting it out there! Is there are workaround to support -filter_complex right now? I'm trying to overlay an image over a video. |
@jallen You can still add custom arguments to the output like so const cmd = ffmpeg();
cmd.input('video.mkv');
cmd.input('image.png');
// you can add extra options to the overlay filter, check ffmpeg's docs ;)
cmd.output('out.mkv').args('-filter_complex', 'overlay');
const proc = await cmd.spawn();
await proc.complete(); Currently, the library doesn't expose any fancy helpers for working with complex filters. The syntax that FFmpeg uses for complex filters can't be easily and meaningfully be represented by JavaScript values. Or at least, it's more difficult than with simple filters. The bare minimum would be exposing some escape functions to work with complex filters. I've even considered using template literals, but it would be a bit more complicated to implement and still not very easy to use. I'm taking a long time because I want to get it right. If you have any idea or advice I'll appreciate it. Have a nice day. |
The args on the output worked! Thanks again. |
I quite like fluent-ffmpeg's approach: https://github.com/fluent-ffmpeg/node-fluent-ffmpeg#complexfilterfilters-map-set-complex-filtergraph |
Description
Simplify the use of the
-filter_complex
option.Related Issues
#4
The text was updated successfully, but these errors were encountered: