1.
安装svn
$sudo apt-get install subversion
2.下载FFMpeg源代码
$svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
//下载ffmpeg源代码 output:Checked out revision 26402.
3.安装yasm
$sudo apt-get install yasm
4.配置FFMpeg的编译环境
$cd ./ffmpeg
ffmpeg$sudo ./configure
5.编译
ffmpeg$sudo make
6.出现错误 libavcodec/x86/h264_qpel_mmx.c:1294: Error: operand type mismatch for `cmp'
- libavcodec/x86/h264_qpel_mmx.c: Assembler messages:
- libavcodec/x86/h264_qpel_mmx.c:1294: Error: operand type mismatch for `cmp'
- libavcodec/x86/h264_qpel_mmx.c:1294: Error: operand type mismatch for `cmp'
- libavcodec/x86/h264_qpel_mmx.c:1298: Error: operand type mismatch for `cmp'
- libavcodec/x86/h264_qpel_mmx.c:1298: Error: operand type mismatch for `cmp'
- libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp'
- libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp'
- libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp'
- make: *** [libavcodec/x86/dsputil_mmx.o] Error 1
把libavcodec/x86/h264_qpel_mmx.c中的"g"替换为“rm”即可解决!可用gedit使用批量替换。用vim,进入命令行模式,输入:%s/"g"/"rm"/g 可全部替换,保存退出。重新开始编译!
6.安装
ffmpeg$sudo make install