【发布时间】:2015-04-29 09:50:26
【问题描述】:
我有两个 mp4 文件,我想合并它们。
$media1 = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/dir/media1.mp4');
$media2 = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/dir/media2.mp4');
file_put_contents($_SERVER['DOCUMENT_ROOT'].'/dir/combined.mp4', $media1.$media2);
media1.mp4:1 兆字节,10 秒
media2.mp4:2 兆字节,20 秒
combined.mp4 : 3 MB 但 10 秒(只有 media1.mp4)
如何合并这两个文件?
【问题讨论】:
-
你试过
php-ffmpeg吗?