1

Below is my code that works perfectly fine but starts the slide transition immediately when the background video starts.

ffmpeg -i background.avi -i IMG005.png -filter_complex
"[1:v]sscale=530x680,setsar=1/1[v1];[0:v][v1]overlay=x='if(lte(-w+(t)*100,20),-w+(t)*100,20)':y=20"
-c:v libx264 output.avi

I want the slide transition to start at a certain time and not immediately.
i.e at 6 seconds. I have tried to set setpts=PTS+6/TB and also tried the enable='between(t,6,10)' but the image appears at 6 seconds and never makes any sliding movement.

1 Answer 1

0

The overlay expressions have to be adjusted for the start time.

ffmpeg -i background.avi -i IMG005.png
  -filter_complex
     "[1:v]scale=530x680,setsar=1,setpts=PTS+6/TB[v1];
      [0:v][v1]overlay=x='min(-w+(t-6)*100,20)':y=20"
  -c:v libx264 output.avi

(I've simplified the x expression).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .