Kagami / ffmpeg.js

Port of FFmpeg with Emscripten
Other
3.29k stars 335 forks source link

Cannot define complex filter in quotes #72

Closed BerndHuber closed 4 years ago

BerndHuber commented 5 years ago

Is there any way to define a complex filter that requires quotes?

When I am running this command: arguments: "-i video.mp4 -i image.jpg -filter_complex '[1][0]scale2ref[i][v];[v][i]overlay=10:10' -c:a copy output.mp4".split(' ') I am getting the following error:

[AVFilterGraph @ 0xdf4c30] No such filter: '[1][0]scale2ref[i][v];[v][i]overlay=10:10'

With double quotes, I am getting:

[AVFilterGraph @ 0xdf4c30] No such filter: '"'

However a simpler version of the overlay filter that doesn't require quotes is working: arguments: "-i video.mp4 -i image.jpg -filter_complex overlay=10:10 -c:a copy output.mp4".split(' ')

bnwlkr commented 5 years ago

Also having this issue with the volume filter, did you find a solution?

Kagami commented 4 years ago

scale2ref filter isn't included. I suggest to rebuild with:

diff --git a/Makefile b/Makefile
index ec713ed..30200f2 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ PRE_JS = build/pre.js
 POST_JS_SYNC = build/post-sync.js
 POST_JS_WORKER = build/post-worker.js

-COMMON_FILTERS = aresample scale crop overlay hstack vstack
+COMMON_FILTERS = aresample scale crop overlay hstack vstack scale2ref
 COMMON_DEMUXERS = matroska ogg mov mp3 wav concat
 COMMON_DECODERS = vp8 h264 vorbis opus mp3 aac pcm_s16le