开发者

FFMPEG find if MOV videos is h.264

开发者 https://www.devze.com 2023-03-10 16:43 出处:网络
How can we find out in PHP if a MOV or MP4 video is encoded with h.264. I have both m开发者_高级运维encoder and FFMPEG installed. <?php

How can we find out in PHP if a MOV or MP4 video is encoded with h.264. I have both m开发者_高级运维encoder and FFMPEG installed.


<?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;
}
?>
0

精彩评论

暂无评论...
验证码 换一张
取 消