Home  >  Article  >  php教程  >  php使用memcoder将视频转成mp4格式的方法

php使用memcoder将视频转成mp4格式的方法

PHP中文网
PHP中文网Original
2017-03-24 09:55:463565browse

本文实例讲述了php使用memcoder将视频转成mp4格式的方法。分享给大家供大家参考。具体实现方法如下:

<?php
convertTo( "some-input-video.avi", "output.mp4" );
function convertTo( $input, $output ) {
echo "Converting $input to $output<br />";
$command = "mencoder $input -o $output -af volume=10 -aspect 16:9 -of avi -noodml -ovc x264 -x264encopts bitrate=500:level_idc=41:bframes=3:frameref=2: nopsnr: nossim: pass=1: threads=auto -oac mp3lame";
echo "$command<br />";
shell_exec( $command );
echo "Converted<br />";
}
?>

希望本文所述对大家的php程序设计有所帮助。

相关文章:

PHP实现将视频转成MP4并获取视频预览图的方法

PHP+FFMPEG实现将视频自动转码成H264标准Mp4文件

php下载flv文件或者mp4文件无法播放

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn