我们如何在 PHP 中找出 MOV 或 MP4 视频是否使用 h.264 编码。我安装了 mencoder 和 FFMPEG。
问问题
793 次
1 回答
2
<?php
exec( "ffmpeg -i {$strFilePath}", $return, $status );
if( $status == 0 ) {
// I do ot have ffmpeg installed on this machine so I can't write your check
// But a simple str_pos() will tell you if the h264 codec string is there.
$isH264 = str_pos($return, /*the codec string here*/ ) !== false;
}
?>
于 2011-06-07T01:20:01.753 回答