我正在合并视频,但没有合并我的视频。这是代码
exec(cat file1.flv file2.flv > trailer/output.flv);
exec("ffmpeg -i trailer/output.flv -sameq trailer/output.flv);
但是,如果文件1的大小是1MB,文件2的大小是2MB,则输出为3MB。但它只是在播放文件1。
以下内容:
ffmpeg -i input1.flv -i input2.flv {other parameters if needed} ouput.flv
将为您加入两个文件。
您不能简单地使用cat合并FLV文件,因为在输出文件的开头会有来自第一个文件的头。
这篇文章可能会有所帮助:
http://albanianwizard.org/splitting-and-joining-flv-files-under-linux-with-ffmpeg-and-avidemux.albanianwizard
我知道mencoder可能是这样的:
mencoder -ovc lavc file1.flv file2.flv -o complete.avi