iSun iSun - 9 months ago 117
Android Question

Mix 2 videos with FFmpeg (overlay one on top of other)

I using

. I've 2 pieces of the videos , The first one is my main video and the second one is my effect video.

Now I wanna mix this 2 videos together, Is it possible ?

Note : Both videos decoding through MP4 format.


I don't know how to translate this into the API offhand, but the command-line version of what you're trying to do is something like:

ffmpeg -i main.mp4 -vf 'movie=effect.mp4 [f];[in][f] overlay=0:0 [out]' out.mp4

See the docs on movie and overlay for more information.