php - FFMPEG 查找 MOV 视频是否为 h.264

标签 php ffmpeg codec encoder mencoder

我们如何在 PHP 中找出 MOV 或 MP4 视频是否使用 h.264 编码。我安装了 mencoder 和 FFMPEG。

最佳答案

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

关于php - FFMPEG 查找 MOV 视频是否为 h.264,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6259735/

相关文章:

php - mysql更新查询根据是否存在字段自定义

带有 ffmpeg 的 svg 幻灯片

ffmpeg - 如何通过ffmpeg在源代码中将HLS流保存到本地磁盘?

python - 只能使用 import gtk 读取 csv 文件 - Python - DictReader

javascript - Bootstrap + 弹出窗口 - skype href 链接不起作用

php - 添加在 ajax 搜索字段 wordpress 中搜索类别名称的功能

linux - 编写 Linux 脚本以一次安装多个程序

c++ - QuickTime - AVID、ITU-R 601 (16-235) 选项

php - UTF-8贯穿始终

android - 如何使用cygwin和android ndk r5在windows上编译ffmpeg-0.10.3