php ffmpeg nohup,基于linux平台的FFmpeg安装部署

安装所需包或插件

(1)faac-1.28.tar.gz

下载地址:http://downloads.sourceforge.net/faac/faac-1.28.tar.gz

tar -zxvf faac-1.28.tar.gz

cd faac-1.28

./configure

make && make install

将 faac-1.28/common/mp4v2/mpeg4ip.h 第 123行~129行,进行如下修改:

修改前:

#ifdef __cplusplus

extern "C" {

#endif

char *strcasestr(const char *haystack, const char *needle);

#ifdef __cplusplus

}

#endif

修改后:

#ifdef __cplusplus

extern "C++" {

#endif

const char *strcasestr(const char *haystack, const char *needle);

#ifdef __cplusplus

}

#endif

如不安装会出现下面的报错信息:

make[3]: 正在进入目录 `/home/tarena/project/jpg to mp4/faac-1.28/common/mp4v2'

if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -Wall -g -O2 -MT 3gp.o -MD -MP -MF ".deps/3gp.Tpo" -c -o 3gp.o 3gp.cpp; \

then mv -f ".deps/3gp.Tpo" ".deps/3gp.Po"; else rm -f ".deps/3gp.Tpo"; exit 1; fi

In file included from mp4common.h:29:0,

from 3gp.cpp:28:

mpeg4ip.h:126:58: 错误: 对‘char* strcasestr(const char*, const char*)’的新声明

/usr/include/string.h:369:28: 错误: 使旧的声明‘const char* strcasestr(const char*, const char*)’出现歧义

make[3]: *** [3gp.o] 错误 1

make[3]:正在离开目录 `/home/tarena/project/jpg to mp4/faac-1.28/common/mp4v2'

make[2]: *** [all-recursive] 错误 1

make[2]:正在离开目录 `/home/tarena/project/jpg to mp4/faac-1.28/common'

make[1]: *** [all-recursive] 错误 1

make[1]:正在离开目录 `/home/tarena/project/jpg to mp4/faac-1.28'

make: *** [all] 错误 2

(2)lame-3.97.tar.gz

下载地址:http://downloads.sourceforge.net/lame/lame-3.97.tar.gz

tar -zxvf lame-3.97.tar.gz

cd lame-3.98.4

./configure

make && make install

如不安装会出现下面的报错信息:

ERROR: libmp3lame >= 3.98.3 not found

(3)opencore-amr-0.1.2.tar.gz

下载地址:http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz

tar -zxvf opencore-amr-0.1.2.tar.gz

cd opencore-amr-0.1.2

./configure

make && make install

如不安装会出现下面的报错信息:

ERROR: libopencore_amrnb not found

(4)libogg-1.3.3.tar.xz

下载地址:wget https://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.xz

tar -xf libogg-1.3.3.tar.xz

./configure --prefix=/usr \

--disable-static \

--docdir=/usr/share/doc/libogg-1.3.3

make && make install

如不安装会出现下面报错信息:

*** Could not run Ogg test program, checking why...

*** The test program failed to compile or link. See the file config.log for the

*** exact error that occured. This usually means Ogg was incorrectly installed

*** or that you have moved Ogg since it was installed.

configure: error: must have Ogg installed!

(5)libvorbis-1.3.5.tar.gz

下载地址:https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.xz

tar -xf libvorbis-1.3.5.tar.xz

cd libvorbis-1.3.5

./configure

make && make install

如不安装会出现下面报错信息:

ERROR: libvorbis not found

(6)x264

下载地址:wget http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20170213-2245-stable.tar.bz2

tar -jxf x264-snapshot-20170213-2245-stable.tar.bz2

cd x264-snapshot-20170213-2245-stable/

./configure --disable-asm --enable-static --enable-shared

make && make install

如不安装会出现下面报错信息:

ERROR: libx264 not found

ERROR: libx264 must be installed and version must be >= 0.118.

重新编译安装libx264时,一定需要把电脑里面之前的版本给删除掉,在/usr 或者/usr/local下,在编译x264的时候加--enable-static --enable-shared,如果不加参数,只能编译出x264的执行文件出来,install到/usr/bin目录下面。

按如下方法寻找:

whereis libx264

cd /usr/local/lib

rm -rf libx264.*

(7)xvidcore-1.2.2.tar.gz

下载地址:http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.gz

tar -xf xvidcore-1.2.2.tar.gz

cd xvidcore/build/generic

./configure

make && make install

如不安装会出现下面报错信息:

ERROR: libxvid not found

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值