随笔 - 203  文章 - 11  评论 - 15  阅读 - 81万
  2017年8月18日

首先要安装各种解码器
1、lame
lame-3.99.5.tar.gz
Url:http://sourceforge.net/project/showfiles.php?group_id=290&package_id=309
wget http://sourceforge.net/projects/lame/files/latest/download?source=files
tar -zxvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure --enable-shared
make
make install
cd ../

2、libogg
libogg-1.3.1.tar.gz
Url:http://www.xiph.org/downloads/
wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz
tar -zxvf libogg-1.3.2.tar.gz
cd libogg-1.3.2
./configure
make
make install
cd ../

3、libvorbis
libvorbis-1.3.4.tar.gz
Url:http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz
(libvorbis依赖于libogg, 所以libogg必须先于libvorbis安装)

wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz
tar -zxvf libvorbis-1.3.4.tar.gz
cd libvorbis-1.3.4
./configure
make
make install
cd ../

4、xvid
xvidcore-1.3.2.tar.gz
Url:http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz
wget http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz
tar -zxvf xvidcore-1.3.2.tar.gz
cd xvidcore
cd build/generic/
./configure
make
make install
cd ../../../

5、x264
latest_x264.tar.bz2 (其中包含的目录是 x264-snapshot-20141218-2245)
Url:http://www.videolan.org/developers/x264.html

wget ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
tar -jxvf last_x264.tar.bz2
cd x264-snapshot-20141218-2245/
./configure
出现如下的报错,
Found no assembler
Minimum version is yasm-1.2.0
If you really want to compile without asm, configure with --disable-asm.
这个时候需要先安装yasm
cd ../
wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar -zxvf yasm-1.2.0.tar.gz
cd yasm-1.2.0
./configure
make
make install
cd ../
cd x264-snapshot-20141218-2245/
./configure
make
make install
cd ../

6、libdts
libdca-0.0.5.tar.bz2
Url: http://www.videolan.org/developers/libdca.html

wget http://download.videolan.org/pub/videolan/libdca/0.0.5/libdca-0.0.5.tar.bz2
tar -jxvf libdca-0.0.5.tar.bz2
cd libdca-0.0.5
./configure
make
make install
cd ../

7、a52
a52dec-0.7.4.tar.gz (这个库从2002年就没有更新过了)
http://liba52.sourceforge.net/downloads.html

wget http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz (这个需要FQ才能下载)
现在的做法是,通过chrome浏览器下载后,再rz到服务上:
浏览器下载的地址为:http://liba52.sourceforge.net/downloads.html
tar -zxvf a52dec-0.7.4.tar.gz
cd a52dec-0.7.4
./configure
make
make install
cd ../

8、faad2
faad2-2.7.tar.gz (要选择这个扩展名的文件)
http://www.audiocoding.com/downloads.html

wget http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz
tar -zxvf faad2-2.7.tar.gz
cd faad2-2.7
autoreconf -vif
出现这样的错误
[root@Csss faad2-2.7]# autoreconf -vif
autoreconf: Entering directory `.'
autoreconf: configure.in: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.in: tracing
autoreconf: configure.in: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.in:14: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
出现这样的错误,解决办法:
yum install libtool
继续安装:
autoreconf -vif
./configure --with-mp4v2 --enable-shared
出现了如下的错误:
configure: WARNING: unrecognized options: --with-mp4v2
解决办法,通过./configure --help 查看并没有--with-mp4v2 这个编译参数,找到一个类似的--with-mpeg4ip;
./configure --with-mpeg4ip --enable-shared (编译成功)
make
make install
cd ../

9、faac
faac-1.28.tar.gz (要选择这个扩展名的文件)
http://www.audiocoding.com/downloads.html

wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz

tar zxvf faac-1.28.tar.gz  

cd faac-1.28
./bootstrap
./configure
make
make install
安装出现如下的错误:
make[2]: Leaving directory /software/faac-1.28/libfaac' Making all in common make[2]: Entering directory /software/faac-1.28/common'
Making all in mp4v2
make[3]: Entering directory /software/faac-1.28/common/mp4v2' g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -Wall -g -O2 -MT 3gp.o -MD -MP -MF .deps/3gp.Tpo -c -o 3gp.o 3gp.cpp In file included from mp4common.h:29, from 3gp.cpp:28: mpeg4ip.h:126: error: new declaration ‘char* strcasestr(const char*, const char*)’ /usr/include/string.h:369: error: ambiguates old declaration ‘const char* strcasestr(const char*, const char*)’ make[3]: *** [3gp.o] Error 1 make[3]: Leaving directory /software/faac-1.28/common/mp4v2'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory /software/faac-1.28/common' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory /software/faac-1.28'
make: *** [all] Error 2
根据提示信息,解决办法是:
vim /software/faac-1.28/common/mp4v2/mpeg4ip.h 126删除掉
然后再执行如下的命令:
make clean
make
make install
cd ../

10、amr-nb
amrnb-10.0.0.0.tar.bz2
http://ftp.penguin.cz/pub/users/utx/amr/ ( 该链接已经forbidden 了 )
重新找了一个连接,需要FQ才可以下载;
https://code.google.com/p/ostube/downloads/detail?name=amrnb-10.0.0.0.tar.bz2&can=2&q=amrnb
我是通过浏览器下载,然后再传到服务器上;
tar -jxvf amrnb-10.0.0.0.tar.bz2
cd amrnb-10.0.0.0
./configure
make
出现报错,连接服务器进行下载26104-a00.zip;显示连接不上服务器,还是需要用浏览器下载,然后传到服务器上;
26104-a00.zip
下载地址为 https://code.google.com/p/ostube/downloads/detail?name=26104-a00.zip&can=2&q=26104-a00.zip
下载完成之后,将此压缩包放到跟make同一级的目录中
继续安装:
make
make install
cd ../

11、amr-wb
https://code.google.com/p/ostube/downloads/detail?name=amrwb-10.0.0.0.tar.bz2&can=2&q=amrwb (该地址可以下载)

tar -jxvf amrwb-10.0.0.0.tar.bz2
cd amrwb-10.0.0.0
./configure
make
make出现如下的报错:
make ./26204-a00_ANSI-C_source_code.zip
make[1]: Entering directory `/software/amrwb-10.0.0.0'
cd . && /usr/bin/wget -N http://ostube.googlecode.com/files/26204-a00.zip
--2015-02-08 20:44:09-- http://ostube.googlecode.com/files/26204-a00.zip
Resolving ostube.googlecode.com... 74.125.203.82, 2404:6800:4008:c07::52
Connecting to ostube.googlecode.com|74.125.203.82|:80... ^Cmake[1]: *** [26204-a00.zip] Interrupt
make: *** [readme.txt] Interrupt
根据报错信息,解决办法:
https://code.google.com/p/ostube/downloads/detail?name=26204-a00.zip&can=2&q=26204-a00.zip 通过这个地址下载26204-a00.zip压缩包传到跟make同一级目录;
继续安装
make
make install
cd ../

12、最后一步,安装ffmpeg
wget http://www.ffmpeg.org/releases/ffmpeg-2.5.3.tar.gz

./configure --enable-shared --prefix=/usr/local/ffmpeg2 --enable-libmp3lame --enable-libvorbis --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libxvid --enable-postproc --enable-ffserver --enable-ffplay

编译这条语句出错,去掉三个参数,可以成功编译;

./configure --enable-shared --prefix=/usr/local/ffmpeg2 --enable-libmp3lame --enable-libvorbis --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-ffserver --enable-ffplay
才可以编译通过
make
make install

测试报错:
[root@C21318 ffmpeg-2.5.3]# /usr/local/ffmpeg2/bin/ffmpeg --help
/usr/local/ffmpeg2/bin/ffmpeg: error while loading shared libraries: libavdevice.so.56: cannot open shared object file: No such file or directory

好的参考文章
http://www.fanjun.me/?tag=centos

posted @ 2017-08-18 13:58 mingaixin 阅读(3884) 评论(0) 推荐(0) 编辑
  2017年5月22日
摘要: 四种拼接方案: 1,直接用 += 操作符, 直接将多个字符串拼接. 最直观的方法, 不过当数据量非常大时用这种拼接访求是非常低效的。 2,直接用 + 操作符,这个和+=其实一个意思了。 3,用字符串切片([]string)装载所有要拼接的字符串,最后使用strings.Join() 函数一次性将所有 阅读全文
posted @ 2017-05-22 17:03 mingaixin 阅读(1733) 评论(0) 推荐(0) 编辑
摘要: 本文转载自: http://www.cnblogs.com/mengxiaotian/p/6037594.html 如何严格限制session在30分钟后过期! 1.设置客户端cookie的lifetime为30分钟; 2.设置session的最大存活周期也为30分钟; 3.为每个session值加 阅读全文
posted @ 2017-05-22 14:56 mingaixin 阅读(370) 评论(0) 推荐(0) 编辑
  2017年5月15日
摘要: 本文转载自: http://www.cnblogs.com/xiaowant/articles/1992923.html,这个小技巧非常好,一定学会 删除列 1.光标定位到要操作的地方。 2.CTRL+v 进入“可视 块”模式,选取这一列操作多少行。 3.d 删除。 插入列 插入操作的话知识稍有区别 阅读全文
posted @ 2017-05-15 09:35 mingaixin 阅读(245) 评论(0) 推荐(0) 编辑
  2017年5月3日
摘要: lua有一个工具lua releng( https://github.com/openresty/openresty devel utils/blob/master/lua releng) 用来检测代码中的所有全局变量。在macos系统,通过brew install lua 命令安装的lua, lu 阅读全文
posted @ 2017-05-03 09:20 mingaixin 阅读(1144) 评论(0) 推荐(0) 编辑
  2017年4月26日
摘要: 转载声明:http://blog.csdn.net/fdipzone/article/details/51945892 php在cli模式下接收参数有两种方法 1.使用argv数组 2.使用getopt方法 getopt() 函数的用法,详细见php官方手册 阅读全文
posted @ 2017-04-26 17:17 mingaixin 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 转载声明: http://blog.chinaunix.net/uid 7210505 id 329700.html 在Flex中,UrlRequest中的contentType默认值为 application/x www form urlencoded。 而对于 FileReference.upl 阅读全文
posted @ 2017-04-26 17:13 mingaixin 阅读(593) 评论(0) 推荐(0) 编辑
  2017年4月25日
摘要: 声明: 转载自: http://blog.csdn.net/lgm252008/article/details/8253519 在Mac系统中并没有Home、End等键,所以在使用时并不是特别的顺手,但是有几个键位组合可以使Terminal的操作更加灵活方便。 1、将光标移动到行首:ctrl + a 阅读全文
posted @ 2017-04-25 13:44 mingaixin 阅读(992) 评论(0) 推荐(0) 编辑
  2017年4月21日
摘要: 安装 brew install httpie 使用 模拟提交表单 http f POST yhz.me username=nate 显示详细的请求 http v yhz.me 只显示Header http h yhz.me 只显示Body http b yhz.me 下载文件 http d yhz. 阅读全文
posted @ 2017-04-21 16:55 mingaixin 阅读(532) 评论(0) 推荐(0) 编辑
摘要: 一. 概述 Nginx是一个高性能,支持高并发的,轻量级的web服务器。目前,Apache依然web服务器中的老大,但是在全球前1000大的web服务器中,Nginx的份额为22.4%。Nginx采用模块化的架构,官方版本的Nginx中大部分功能都是通过模块方式提供的,比如Http模块、Mail模块 阅读全文
posted @ 2017-04-21 16:29 mingaixin 阅读(2509) 评论(0) 推荐(0) 编辑
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示