Redhat PHP获取视频信息

FFMPEG-PHP安装说明

一、软件包

a) ffmpeg-0.5.1.tar.gz http://www.ffmpeg.org/

b) ffmpeg-php-0.6.0.tbz2 http://ffmpeg-php.sourceforge.net/

二、安装步骤

a) tar zxvf ffmpeg-0.5.1.tar.gz

b) cd ffmpeg-0.5.1

c) ./configure �Cenable-shared �Cprefix=/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 �Cforce

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) 测试代码

<?php

2 $moviepath="gjgdjyfzxzyqs2.wmv";

3 //$moviepath="000.asf";

4 //$moviepath="http://192.168.0.1/ShiPin/GJHGFZxingshi/2010/season2/5jcxxxygzxxysh/jcxxxygzxxysh1.wmv";

5 $movie = new ffmpeg_movie($moviepath,false);

6 echo $movie->getDuration();

7 ?&gt;

$movie-&gt;getDuration();获取视频的时长秒数。

你可能感兴趣的:(PHP,redhat,视频,获取,休闲)