Concat多个视频和音频文件与ffmpeg [英] Concat multiple video and audio files with ffmpeg

查看:443
本文介绍了Concat多个视频和音频文件与ffmpeg的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一组音频和视频剪辑,每个音频剪辑与其视频剪辑具有1:1的相关性。每个视频和每个音频剪辑的编码是相同的。如何连接所有的音频剪辑和所有视频剪辑,然后将它们合并在一起以输出视频。到目前为止,我只想出如何将1个音频剪辑与1个视频剪辑进行合并:

  $ ffmpeg -i video_1.webm  - i audio_1.wav -acodec copy -vcodec copy output.mkv 

更新
我刚刚遇到了 mkvmerge 这可能是一个更好的选择吗?

解决方案

您可以在这个旧问题中找到您的答案:


使用ffmpeg连接两个mp4文件


这个答案不限于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:

Concatenate two mp4 files using ffmpeg

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆