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

一个人想着一个人 提交于 2019-12-25 01:06:14

问题


I using ffmpeg through Android-NDK. 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.


回答1:


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.



来源:https://stackoverflow.com/questions/9573452/mix-2-videos-with-ffmpeg-overlay-one-on-top-of-other

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!