将2个视频与FFmpeg混合(叠加一个视频) [英] Mix 2 videos with FFmpeg (overlay one on top of other)
本文介绍了将2个视频与FFmpeg混合(叠加一个视频)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用ffmpeg
至Android-NDK
.我有两段视频,第一个是我的主视频,第二个是我的效果视频.
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 ?
注意:两个视频均通过MP4格式解码.
Note : Both videos decoding through MP4 format.
推荐答案
我不知道如何将其立即转换为API,但是您尝试执行的命令行版本类似于:
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.
这篇关于将2个视频与FFmpeg混合(叠加一个视频)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文