Installing ffmpeg from command line with h264 (AVC) and mp3

简介:

http://hi.baidu.com/liberum/blog/item/4c2f4793aa8df17d55fb96ef.html

不少资料和编译版本都比较旧,这个还算比较靠谱的

=====================

Installing ffmpeg from command line with h264 (AVC) and mp3

2010-11-23 17:09

Posted on September 23, 2010 by Breedt Didier

Step by step guide on installing the following ffmpeg installation:

 

configuration: –enable-libmp3lame

–enable-libvorbis –enable-libxvid –enable-gpl –enable-shared –enable-version3 –enable-nonfree –enable-pthreads –enable-libfaac –enable-libfaad –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libtheora –enable-libx264 –enable-libxvid –enable-x11grab

 

I would advise you to fetch all the following files inside a single directory. What I usually do, which has been working for me quite well, is I would start with fetching the ffmpeg installation and immediately start the above configure command, then as it fails due to dependiencies, I just install them one by one. I will now log the entire install here for you to grab a read and perhaps try yourself.

 

export TMPDIR={ffmpeg_install}/tmp

./configure --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-gpl --enable-shared --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab

 

ERROR yasm not found

 

cd ..

wget http://www.tortall.net/projects/yasm/releases/yasm-1.1.0.tar.gz

tar -xf yasm-1.1.0.tar.gz

cd yasm-1.1.0

./configure

make && make install clean

 

cd ..

cd ffmpeg-checkout-2010-09-23

./configure --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-gpl --enable-shared --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab

 

ERROR: libfaac not found

 

cd ..

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

tar -xf faac-1.28.tar.gz

cd faac-1.28

./configure

make && make install cleancd 

 

cd ..

cd ffmpeg-checkout-2010-09-23

./configure --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-gpl --enable-shared --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab

 

ERROR: libmp3lame >= 3.98.3 not found

 

cd ..

wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz?r=http://sourceforge.net/projects/lame/files/lame/&ts=1285256527&use_mirror=ufpr

tar -xf lame-3.98.4.tar

cd lame-3.98.4

./configure

make && make install clean

 

cd ..

cd ffmpeg-checkout-2010-09-23

./configure --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-gpl --enable-shared --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab

 

ERROR: libopencore_amrnb not found

 

cd ..

wget http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz?r=http://sourceforge.net/projects/opencore-amr/&ts=1285256783&use_mirror=ufpr

tar -xf opencore-amr-0.1.2.tar.gz

cd opencore-amr-0.1.2

./configure

make && make install clean

 

cd ..

cd ffmpeg-checkout-2010-09-23

./configure --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-gpl --enable-shared --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab

 

ERROR: libtheora not found

 

cd ..

wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2

tar -xf libtheora-1.1.1.tar.bz2

cd libtheora-1.1.1

./configure

make && make install clean

 

cd ..

cd ffmpeg-checkout-2010-09-23

./configure --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-gpl --enable-shared --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab

 

ERROR: libx264 not found

 

cd ..

wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20100922-2245.tar.bz2

tar -xf x264-snapshot-20100922-2245.tar.bz2

cd x264-snapshot-20100922-2245

./configure

make && make install clean

 

cd ..

cd ffmpeg-checkout-2010-09-23

./configure --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-gpl --enable-shared --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab

 

ERROR: libxvid not found

 

cd ..

wget 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 clean

 

cd ..

cd ffmpeg-checkout-2010-09-23

./configure --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-gpl --enable-shared --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab

 

Depending on your system, you may need to update your GNU make as well if you get this error:

common.mak:28: *** unterminated call to function `foreach': missing `)'.  Stop.

 

cd ..

wget http://ftp.gnu.org/gnu/make/make-3.82.tar.gz

tar -xf make-3.82.tar.gz

cd make-3.82.tar

./configure

make && make install clean

bash -l

cd ..

cd ffmpeg-checkout-2010-09-23

make && make install clean

ldconfig

bash -l





本文转自 vfast_chenxy 51CTO博客,原文链接:http://blog.51cto.com/chenxy/733809,如需转载请自行联系原作者
目录
相关文章
|
1月前
|
存储
使用lame转wav为mp3
使用lame转wav为mp3
|
30天前
|
编解码 开发工具 git
解决Ubuntu16.04视频编码出现Unknown encoder 'libx264'问题
解决Ubuntu16.04视频编码出现Unknown encoder 'libx264'问题
52 0
|
3月前
【已解决】ffmpy3.FFExecutableNotFoundError: Executable ‘ffmpeg‘ not found
【已解决】ffmpy3.FFExecutableNotFoundError: Executable ‘ffmpeg‘ not found
75 1
|
安全 Python
python库ffmpeg的错误解决方法:“Couldn‘t find ffmpeg or avconv - defaulting to ffmpeg, but may not work“
简介:python库ffmpeg的错误解决方法:“Couldn‘t find ffmpeg or avconv - defaulting to ffmpeg, but may not work“
python库ffmpeg的错误解决方法:“Couldn‘t find ffmpeg or avconv - defaulting to ffmpeg, but may not work“
|
4月前
|
编解码 应用服务中间件 nginx
DemuxException: type = CodecUnsupported, info = Flv: Unsupported codec in video frame: 2
DemuxException: type = CodecUnsupported, info = Flv: Unsupported codec in video frame: 2
349 0
ffmpeg编码报错:more samples than frame size (avcodec_encode_audio2)
ffmpeg编码报错:more samples than frame size (avcodec_encode_audio2)
91 0
ffmpeg编码报错:more samples than frame size (avcodec_encode_audio2)
|
编解码 API
ffmpeg capture decklink
ffmpeg capture decklink
90 0
configure:13747: error: You requested FFmpeg (h264, h263, theora, mp4v-es) but not found...die
configure:13747: error: You requested FFmpeg (h264, h263, theora, mp4v-es) but not found...die
94 0
msys2编译ffmpeg:ERROR: libx264 not found
msys2编译ffmpeg:ERROR: libx264 not found
119 0
|
计算机视觉
catkin_make:Project ‘cv_bridge‘ specifies ‘/usr/include/opencv‘ as an include dir, which is not fo
catkin_make:Project ‘cv_bridge‘ specifies ‘/usr/include/opencv‘ as an include dir, which is not fo
232 0