Applying multiple filters at once with FFMPEG

FilterFfmpeg

Filter Problem Overview


I have the need to apply fadein and overlay filters to a video. Is it possible to apply 2 filters at once?

I got:

ffmpeg -i input.mpg -vf "movie=watermark.png [logo]; [in][logo] overlay=W-w-10:H-h-10 [out]" output.mpg

I'm trying to add fade=in:0:20, but if I add a new -vf parameter, it will overwrite the preceding one, and if I add:

-vf "fade=in:0:20; movie=......"

it won't work.

Is this possible or do I have to run FFmpeg twice?

Filter Solutions


Solution 1 - Filter

Okay, someone helped me somewhere.

I had to separate filters with commas:

ffmpeg -i input.mpg -vf "movie=watermark.png [logo]; [in][logo] overlay=W-w-10:H-h-10, fade=in:0:20 [out]" output.mpg

This will apply fadein to both the watermark and the video.

Solution 2 - Filter

Yes it is possible .

ffmpeg.exe -i yourvideo.avi -vf "[in] scale=iw/2:ih/2, pad=iw+40:ih+40:10:10 [top]; movie=yourLogoOrVideo.pngOraviEtc, scale=iw/2:ih/2 , fade=out:400:40:alpha=1 [bottom]; [top][bottom] overlay=PaddingFromTop:PaddingFromLeft [out]" -f flv ff.flv

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionParziphalView Question on Stackoverflow
Solution 1 - FilterParziphalView Answer on Stackoverflow
Solution 2 - FilterEmre KarataşoğluView Answer on Stackoverflow