Video conversion through PHP any format to mp4? [duplicate]
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.
精彩评论