Concat多个视频和音频文件与ffmpeg [英] Concat multiple video and audio files with ffmpeg
问题描述
$ ffmpeg -i video_1.webm - i audio_1.wav -acodec copy -vcodec copy output.mkv
更新
我刚刚遇到了 mkvmerge
这可能是一个更好的选择吗?
您可以在这个旧问题中找到您的答案:
这个答案不限于MP4。但这将取决于您要连接的文件格式!
一旦您有新的VIDEO文件和AUDIO文件,将它们合并在一起:
ffmpeg -i AUDIO -i VIDEO -acodec copy -vcodec copy OUTPUT
I have an array of audio and video clips, where each audio clip has a 1:1 correlation with it's video clip. The encoding of each video and each audio clip are the same. How can I concat all of the audio clips, and all the video clips, then merge them together to output a video. As of now I only figured out how to merge 1 audio clip with 1 video clip:
$ ffmpeg -i video_1.webm -i audio_1.wav -acodec copy -vcodec copy output.mkv
Update
I just came across mkvmerge
would this possibly be a better option?
You can find your answer here in this old question:
This answer is not restricted to MP4. But it will depend on the file format you wanna concatenate!
Once you have your new VIDEO file and AUDIO file, to merge them together:
ffmpeg -i AUDIO -i VIDEO -acodec copy -vcodec copy OUTPUT
这篇关于Concat多个视频和音频文件与ffmpeg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!