[color=red]ffmpeg[/color]是开源的转码库,功能十分强大。由于需要将amr和MP3互转。需要在linux上部署ffmpeg,碰到了许多问题,在此记录一下。
[size=large][b]一、安装lame-3.99.5.tar.gz[/b][/size]
1. 下载地址:[url]http://downloads.sourceforge.net/lame/lame-3.99.5.tar.gz[/url]
2. tar -zxvf lame-3.99.5.tar.gz
3. ./configure --enable-shared --prefix=/usr/
4. make && make install
[size=large][b]二、安装opencore-amr-0.1.3.tar.gz[/b][/size]
1. 下载地址:[url]http://sourceforge.net/projects/opencore-amr/[/url]
2. tar -zxvf opencore-amr-0.1.3.tar.gz
3. ./configure
4. make && make install
[size=large][b]二、安装ffmpeg[/b][/size]
1. 下载地址:[url]http://www.ffmpeg.org/releases/ffmpeg-0.5.13.tar.gz[/url]
2. tar -zxvf ffmpeg-0.5.13.tar.gz
3. ./configure --enable-libopencore-amrnb --enable-version3 --enable-libmp3lame --enable-gpl --enable-pthreads --disable-yasm --enable-nonfree
4. make clean
5. 修改/usr/include/linux/videodev.h 将ulong rangelow, rangehigh;修改为unsigned long rangelow, rangehigh; [b][color=red](这个很重要,否则make报错)[/color][/b]
6. make && make install
7. sudo cp /usr/lib/libmp3lame.so.0 /lib64/
8. sudo cp /usr/local/lib/libopencore-amrnb.so.0 /lib64/
[size=large][b]一、安装lame-3.99.5.tar.gz[/b][/size]
1. 下载地址:[url]http://downloads.sourceforge.net/lame/lame-3.99.5.tar.gz[/url]
2. tar -zxvf lame-3.99.5.tar.gz
3. ./configure --enable-shared --prefix=/usr/
4. make && make install
[size=large][b]二、安装opencore-amr-0.1.3.tar.gz[/b][/size]
1. 下载地址:[url]http://sourceforge.net/projects/opencore-amr/[/url]
2. tar -zxvf opencore-amr-0.1.3.tar.gz
3. ./configure
4. make && make install
[size=large][b]二、安装ffmpeg[/b][/size]
1. 下载地址:[url]http://www.ffmpeg.org/releases/ffmpeg-0.5.13.tar.gz[/url]
2. tar -zxvf ffmpeg-0.5.13.tar.gz
3. ./configure --enable-libopencore-amrnb --enable-version3 --enable-libmp3lame --enable-gpl --enable-pthreads --disable-yasm --enable-nonfree
4. make clean
5. 修改/usr/include/linux/videodev.h 将ulong rangelow, rangehigh;修改为unsigned long rangelow, rangehigh; [b][color=red](这个很重要,否则make报错)[/color][/b]
6. make && make install
7. sudo cp /usr/lib/libmp3lame.so.0 /lib64/
8. sudo cp /usr/local/lib/libopencore-amrnb.so.0 /lib64/