VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Hello.

    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 to do or do I have to run ffmpeg twice, using one filter at a time?
    Quote Quote  
  2. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    You have to do it all in one -vf chain but you don't need to run FFmpeg twice.

    If you want to fade-in the overlay it should work this way (separate filter commands with commas)...

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

    If you put it after [in], it probably fade in both (didn't try this one)...

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

    Quote Quote  
  3. Oh, yeah...! commas. I forgot about them.

    I tried both commands. The first one won't apply any effect, the second one will apply fadein only to the video, not to the watermark, which is fine.

    But then I tried this command:

    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

    and it applies fadein to both the video and watermark.

    Thank you very much for your reply.
    Quote Quote  
  4. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by asterixvader View Post
    But then I tried this command:

    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

    and it applies fadein to both the video and watermark.
    Yes very nice! Now I see there's more logic in that position. First the two inputs, then fade.

    Strange that the first example didn't work. Probably because it's a image. I did it where the "movie" command is a video clip so FFmpeg can count the requested number of frames.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!