wiki:

How to quickly compile FFmpeg with libx264 (x264, H.264)

How to quickly compile FFmpeg with libx264 (x264, H.264)

  1. Compile x264. See How to quickly compile libx264 for instructions.
  1. Compile FFmpeg:
    cd /my/path/where/i/keep/compiled/stuff
    git clone git://source.ffmpeg.org/ffmpeg.git
    cd ffmpeg
    ./configure --enable-gpl --enable-libx264
    make
    # make install
    # ldconfig