ArticleDirectory
- FFMPEG-PHP installation instructions
FFMPEG-PHP installation instructions
I. Software Packages
A) ffmpeg-0.5.1.tar.gz Co http://www.ffmpeg.org/
B) ffmpeg-php-0.6.0.tbz2 http://ffmpeg-php.sourceforge.net/
Ii. Installation Steps
A) tar zxvf ffmpeg-0.5.1.tar.gz
B) CD ffmpeg-0.5.1
C)./configure-enable-shared-Prefix =/usr/local/
D) Make make install
E) tar jxvf ffmpeg-php-0.6.0.tbz2
F) mV ffmpeg-php-0.6.0/var/local/software/php-5.2.9/EXT/FFMPEG
G) CD/var/local/software/php-5.2.9/EXT/FFMPEG
H) phpize
I) CD/var/local/software/php-5.2.9
J) Rm configure
K)./buildconf-Force
L)./configure \
M) -- prefix =/usr/local/PHP \
N) -- with-apxs2 =/usr/local/Apache/bin/apxs \
O) -- enable-safe-mode \
P) -- enable-mbstring \
Q) -- With-mysql =/usr/local/MySQL \
R) -- With-PDO-mysql =/usr/local/MySQL /\
S) -- With-zlib \
T) -- With-Gd \
U) -- With-JPEG-Dir =/usr \
V) -- With-PNG-Dir =/usr \
W) -- without-pear \
X) -- enable-FTP \
Y) -- enable-zip \
Z) -- With-FFMPEG =/usr/local/FFMPEG
L) Make make install
M) testCode
<? PHP
2 $ moviepath = "gjgdjyfzxzyqs2.wmv ";
3 // $ moviepath = "000.asf ";
4 // $ moviepath = "http: // 192.168.0.1/Shipin/gjhgfzxingshi/2010/SEASON2/5 jcxxxygzxxysh/jcxxxygzxxysh1.wmv ";
5 $ movie = new ffmpeg_movie ($ moviepath, false );
6 echo $ movie-> getduration ();
7?>
$ Movie-> getduration (); gets the video duration in seconds.