FFMPEG发现MOV视频是否为h.264

时间:2011-06-07 01:15:07

标签: php ffmpeg codec encoder mencoder

如果使用h.264编码MOV或MP4视频,我们如何在PHP中找到答案。我安装了mencoder和FFMPEG。

1 个答案:

答案 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;
}
?>