我正在合併視頻,但沒有合併我的視頻。下面是代碼FFMPEG視頻木匠
exec(cat file1.flv file2.flv > trailer/output.flv);
exec("ffmpeg -i trailer/output.flv -sameq trailer/output.flv);
但是,如果文件1的大小爲1MB和file2是2MB和輸出來爲3MB。但它只播放文件1。
我正在合併視頻,但沒有合併我的視頻。下面是代碼FFMPEG視頻木匠
exec(cat file1.flv file2.flv > trailer/output.flv);
exec("ffmpeg -i trailer/output.flv -sameq trailer/output.flv);
但是,如果文件1的大小爲1MB和file2是2MB和輸出來爲3MB。但它只播放文件1。
以下:
ffmpeg -i input1.flv -i input2.flv {other parameters if needed} ouput.flv
將加盟兩個文件給你。
您不能簡單地使用cat合併FLV文件,因爲在輸出文件的開頭會有第一個文件的標題。
這篇文章可能會有所幫助:
我知道這也許可以用mencoder的這樣的:
mencoder -ovc lavc file1.flv file2.flv -o complete.avi
它只會輸出第一個flv視頻作爲輸出,而不是與其他視頻連接。 – 2012-08-16 08:30:17