<liunx学习>在liunx 安装ffmpeg

657 查看

  1. wget http://ffmpeg.org/releases/ffmpeg-2.4.tar.bz2 #先把安装包下载到liunx

  2. tar -xjf ffmpeg-2.4.tar.bz2 #解压

  3. cd ffmpeg-2.4 #进到当前目录
  4. ./configure --disable-yasm --prefix=/usr/local/ffmpeg
  5. make
  6. make install
  7. vi /etc/ld.so.conf
    在最后加入:/usr/local/ffmpeg/lib
    idconfig
  8. vi /etc/profile
    在最后加入:
    export FFMPEG_HOME=/usr/local/ffmpeg
    export PATH=$FFMPEG_HOME/bin:$PATH
  9. source /etc/profile #使修改生效
  10. ffmpeg -version
    如果出现
    ffmpeg version 2.4 Copyright (c) 2000-2014 the FFmpeg developers
    built on Sep 16 2014 09:45:41 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
    configuration: --disable-yasm --prefix=/usr/local/ffmpeg
    libavutil 54. 7.100 / 54. 7.100
    libavcodec 56. 1.100 / 56. 1.100
    libavformat 56. 4.101 / 56. 4.101
    libavdevice 56. 0.100 / 56. 0.100
    libavfilter 5. 1.100 / 5. 1.100
    libswscale 3. 0.100 / 3. 0.100
    libswresample 1. 1.100 / 1. 1.100

就表示安装成功了