linux安装x264 ffmpeg

1. 安装yasm

2. 安装x264

3. 安装ffmpeg

安装网上很多例子,以下是我主要参考的两篇博客:

http://www.cnblogs.com/lidabo/p/3987378.html

http://blog.csdn.net/zmlcool/article/details/8141097

主要说以下安装遇到的问题:

libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/usr/local/ffmpeg-2.5/libavcodex/libx264.c:688: undefined reference to `x264_encoder_open_142'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1

解决方案:
   ffmpeg和x264编码库源码安装都得加:CFLAGS="-fPIC"
   即:CFLAGS="-fPIC" ./configure ......
 
原文地址:https://www.cnblogs.com/frank-quan/p/4289973.html