Open jonathanidealump opened 2 years ago
First I'd figure out a way to do this in ffmpeg.
ffmpeg -ss 6 -i clip.mp4 -ignore_loop 0 -i b.gif -filter_complex "[1:v]hue=s=0[base];[0:v]scale=iw/2:-1[vid];[base][vid]overlay=(W-w)/2:(H-h)/2:shortest=1" -codec:v libx264 -c:a copy out.mp4
Then translate it to fluent:
.complexFilter([
...
// overlay=(W-w)/2:(H-h)/2:shortest=1
{ filter: 'overlay', options: { x: '(W-w)/2', y: '(H-h)/2', shortest: 1 } inputs: ['base', 'vid'] }
...
])
For some filters (like overlay in this case) you might also need to check the ffmpeg docs for what names the named options translate to (x
, y
in this case): https://ffmpeg.org/ffmpeg-filters.html#overlay-1
Hello,
Thank you for your work.
I would like to get this result:
But I cannot found enough documentation about the complexFilter parameters. Add a "background image" is optional, What want to do as a priority is to be able to center a video or add padding or margin or border (I also want to keep the sound).
Can you help me.
Regards