FFMPEG-PHP示例代码 [英] FFMPEG-PHP example code
问题描述
我已经尝试了一些现有的解决方案,但是没有运气。
exec('ffmpeg -i视频/机器人。 avi -ab 96k -b 700k -ar 44100 -s 640x480 -acodec mp3视频/ robot.flv');
这是我的代码
查看这个例子: https://trac.ffmpeg.org/wiki/PHP
你应该让它运行您的CLI在编写PHP脚本之前首先。
看完示例后,您似乎想使用
shell_exec(insert ffmpeg command here);
这是一个ffmpeg php类,可能会有帮助:
https://github.com/olaferlandsen/FFmpeg-PHP-Class
Can any one help me. I looking to convert a video file into flv using php and ffmpeg. I have tried some of the existing solution on stackoverflow but with no luck.
exec('ffmpeg -i Videos/robot.avi -ab 96k -b 700k -ar 44100 -s 640x480 -acodec mp3 Videos/robot.flv');
This is my code nothing happens when I execute this.
Check out this example: https://trac.ffmpeg.org/wiki/PHP
You should get it running in your CLI first before writing a PHP script.
After reading the example it seems like you want to use
shell_exec("insert ffmpeg command here");
Here's an ffmpeg php class that might be helpful:
https://github.com/olaferlandsen/FFmpeg-PHP-Class
这篇关于FFMPEG-PHP示例代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!