1
votes

I'm using ffmpeg library to develop android mobile application that can overlay images, draw texts and merge audio to video file then display it

I'm using this command to overlay two images into .avi video

   ffmpeg -i inputvid  -i photoOne.png  -i photoTwo.png  -filter_complex [1:v]scale=320:320[ovrl],[0:v][ovrl] overlay=25:25:enable='between(t,0,10)' 
,overlay=25:25:enable='between(t,0,10)'" outvid  

This command Scale the first images only to 320:320, but i want to scale the second image to 400:400 and i don't know how to specify a scale for the second photo.

1
Stack Overflow is for the development of software. For issues using software like ffmpeg, try Super User.Cornstalks
Thanks bro, but i'm using ffmpeg to make android app that can overlay images into video i'm sorry i forget to mention that i edit the question is that ok?BOB
Eh, not really. The intended use of the resulting image isn't really relevant. I might work as a stock broker saving money to build a house, but I wouldn't go to a construction company to ask about stock investment strategies.Cornstalks
OH i got it, sorry for wrong usage ThanksBOB

1 Answers

2
votes

Use this

ffmpeg -i inputvid  -i photoOne.png  -i photoTwo.png  -filter_complex \
        "[1:v]scale=320:320[ovr1]; [2:v]scale=400:400[ovr2]; \
         [0:v][ovr1]overlay=25:25:enable='between(t,0,10)'[int]; \
         [int]ovr2]overlay=25:25:enable='between(t,0,10)'[out]" \
       -map "[out]" outvid

Noe that since your ovelay co-ordinates are the same. The 2nd image will cover up the first image in the result.