当前位置:文档之家› ffmpeg完全安装

ffmpeg完全安装

Linux下ffmpeg的完整安装:首先安装各种解码器1.安装MP3音频编码器lamelame-398-1.tar.gzUrl:/project/showfiles.php?group_id=290&package_id=309tar zxvf lame-398-1.tar.gzcd lame-398-1./configure --enable-shared --prefix=/usrmake & make install2.安装汇编优化器yasm,可能安装x264要用到/projects/yasm/releases/tar zxvf yasm-1.3.0.tar.gzcd yasm-1.3.0./configure --enable-shared --prefix=/usrmake & make install3.安装ogg库,liboggUrl:/releases/ogg/libogg-1.3.2.tar.gztar zxvf libogg-1.3.2.tar.gzcd libogg-1.3.2./configure --enable-shared --prefix=/usrmake & make install4.安装vorbis编解码器,libvorbisUrl:/releases/vorbis/libvorbis-1.3.3.tar.gztar zxvf libvorbis-1.3.3.tar.gzcd libvorbis-1.3.3./configure --enable-shared --prefix=/usrmake & make install/*********************************这里是分隔符**************************/出错提示: *** Could not run Ogg test program, checking why... *** The test program compiled, but did not run. This usually means *** that the run-time linker is not finding Ogg or finding the wrong *** version of Ogg. If it is not finding Ogg, you'll need to setyour *** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point *** to the installed location Also, make sure you have run ldconfig if that *** is required on your system *** *** If you have an old version installed, it is best to remove it,although *** you may also be able to get things to work by modifying LD_LIBRARY_PATH configure: error: must have Ogg installed!解决:# vi /etc/ld.so.confinclude /etc/ld.so.conf.d/*.conf/usr/local/lib# ldconfig –v5.安装x264编码器的库,x264-snapshotUrl:/developers/x264.htmlftp:///pub/videolan/x264/snapshots/tar xvf last_x264.tar.bz2cd x264-snapshot-20141218-2245/./configure --enable-shared --prefix=/usrmake & make install6.安装xvid编码器,xvidcoreUrl:/downloads/xvidcore-1.3.2.tar.gztar zxvf xvidcore-1.3.2.tar.gzcd xvidcore/build/generic/./configure --prefix=/usrmake & make install7.安装dts库,libdcaUrl: /developers/libdca.htmltar xvf libdca-0.0.5.tar.bz2cd libdca-0.0.5./configure --enable-shared --prefix=/usrmake & make install8.安装a52,a52dec/downloads.htmltar zxvf a52dec-0.7.4.tar.gzcd a52dec-0.7.4./configure --enable-shared --prefix=/usrmake & make install如果出现---------------------------------------./configuremake/usr/bin/ld: .libs/imdct.o: relocation R_X86_64_32S against `a local symbol’ can not be used when making a shared object; recompile with -fPIC.libs/imdct.o: could not read symbols: Bad valuecollect2: ld returned 1 exit statusmake[1]: *** [] Error 1make[1]: Leaving directory `/home/buynintw/src/a52dec-0.7.4/liba52′make: *** [install-recursive] Error 1This trouble me for a week!!!Finally I resolve it!解决:./configure --enable-shared --prefix=/usr 'CFLAGS=-fPIC'make && make install9.安装faad/downloads.htmltar zxvf faad2-2.7.tar.gz./configure --enable-shared --prefix=/usr --with-mp4v2make && make install10.安装faac编码器/progDownload/FAAC-Download-554.htmltar zxvf faac-1.28.tar.gzcd faac-1.28./configure --enable-shared --prefix=/usr --with-mp4v2make && make install可能会出现如下错误:In file included from mp4common.h:29:0,from 3gp.cpp:28:mpeg4ip.h:126:58: error: new declaration ‘char* strcasestr(const char*, const char*)’ /usr/include/string.h:369:28: error: ambiguates old declaration ‘const char* strcasestr(const char*, const char*)’make[3]: *** [3gp.o] Error 1make[3]: Leaving directory `/usr/local/pc/ffmpeg/faac-1.28/common/mp4v2'make[2]: *** [all-recursive] Error 1make[2]: Leaving directory `/usr/local/pc/ffmpeg/faac-1.28/common'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/usr/local/pc/ffmpeg/faac-1.28'make: *** [all] Error 2解决方法:修改源文件common/mp4v2/mpeg4ip.h文件注释掉://char *strcasestr(const char *haystack, const char *needle);这一行重新编译11.安装3gp的一些编解码文件,amrnb、amrwbhttp://ftp.penguin.cz/pub/users/utx/amr/tar xvf amrnb-11.0.0.0.tar.bz2cd amrnb-11.0.0.0cp ../26104-b00.zip ././configure --enable-shared --prefix=/usrmake & make installtar xvf amrwb-7.0.0.1.tar.bz2cd amrwb-7.0.0.1cp ../26204-700.zip ././configure --enable-shared --prefix=/usrmake & make install可能会出现下面的编译错误:/usr/bin/wget -N /ftp/Specs/archive/26_series/26.104/26104-610.zip--2013-01-31 00:35:45-- /ftp/Specs/archive/26_series/26.104/26104-610.zipResolving ... failed: Name or service not known.wget: unable to resolve host address “”make: *** [26104-610.zip] Error 4解决方法:根据打印信息提示,大概意思是缺少:26104-610.zip这个包,根据提示给出的网址可以下载26104-610.zip,然后把这个包拷贝到当前目录,重新编译。

相关主题