如果使用h.264编码MOV或MP4视频,我们如何在PHP中找到答案。我安装了mencoder和FFMPEG。
答案 0 :(得分:1)
<?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;
}
?>