How can I convert an AVI file to FLV format with PHP?

笑着哭i 提交于 2019-11-30 20:19:51

问题


Is it possible to convert an AVI file to FLV format with PHP? If so, how? I don't need a complete solution, just a hint on how to do it.


回答1:


ffmpeg is a great library for this sort of thing. Here's a walkthrough of the process:

http://vexxhost.com/blog/2007/05/20/how-to-convertencode-files-to-flv-using-ffmpeg-php/




回答2:


It would be simpler to convert the video into Flash video and just use one of the many Flash video players out there. There is also an ffmpeg api for PHP, this would be a good place to start.




回答3:


Assuming you have ffmpeg installed, you can do this:

<?php
   define('FFMPEG_LIBRARY', '/usr/local/bin/ffmpeg ');
   $exec_string = FFMPEG_LIBRARY.' -i inputfile.avi outputfile.flv';
   exec($exec_string);
?>



回答4:


Call a command line transcoder like Mencoder or vlc. Alternatively, look for a PHP library which allows you to access a library like ffmpeg.




回答5:


Try FFmpeg. Check the link



来源:https://stackoverflow.com/questions/1571134/how-can-i-convert-an-avi-file-to-flv-format-with-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!