开发者

Video conversion through PHP any format to mp4? [duplicate]

This question already has answers here: 开发者_如何学Go Closed 11 years ago.

Possible Duplicate:

How can i convert a file from avi to flv with php?

Hello guys , Can u help me to convert a video from any format to wmv format through PHP


If you have the right version installed (find a statically linked binary):

exec("ffmpeg -i input.flv output.wmv");

You might need some extra parameters (audio bitrate etc.). But you can use WinFF to find out (shows the exact command IIRC).


Call mencoder from PHP. There are lots of docs out there on the appropriate command line flags to mencoder in order to get it to output your desired format.

$output = exec('mencoder -of lavf -o file.mp4 --lots-of-other-options');

If you are using PHP variables from user input in your command line string, be sure to call escapeshellarg() on them first.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜