linux下编译ffmpeg

1)ffmpeg源代码下载:
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg

2)编译:
   a)配置,生成Makefile:   ./configure --enable-shared --disable-yasm --prefix=/usr/local/ffmpeg 如果执行结果不对,可以根据提示信息,并查看帮助,解决问题./configure --help
   b)编译:make
   c)安装:make install

3) 测试:
   a)安装之后在/usr/local/ffmpeg会看到有三个目录
    bin 执行文件目录
    lib 静态,动态链接库目录
    include 编程用到的头文件
   b)设置环境变量:
    export LD_LIBRARY_PATH=/usr/local/ffmpeg/lib$LD_LIBRARY_PATH
   c)执行
    ffmpeg命令输出命令信息:
      ffmpeg version N-82700-gd20c9b4 Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
      configuration: --disable-yasm
      WARNING: library configuration mismatch
      avutil      configuration: --enable-shared --disable-yasm --prefix=/usr/local/ffmpeg
      avcodec     configuration: --enable-shared --disable-yasm --prefix=/usr/local/ffmpeg
      avformat    configuration: --enable-shared --disable-yasm --prefix=/usr/local/ffmpeg
      avdevice    configuration: --enable-shared --disable-yasm --prefix=/usr/local/ffmpeg
      avfilter    configuration: --enable-shared --disable-yasm --prefix=/usr/local/ffmpeg
      swscale     configuration: --enable-shared --disable-yasm --prefix=/usr/local/ffmpeg
      swresample  configuration: --enable-shared --disable-yasm --prefix=/usr/local/ffmpeg
      libavutil      55. 41.101 / 55. 41.101
      libavcodec     57. 66.108 / 57. 66.108
      libavformat    57. 58.101 / 57. 58.101
      libavdevice    57.  2.100 / 57.  2.100
      libavfilter     6. 67.100 /  6. 67.100
      libswscale      4.  3.101 /  4.  3.101
      libswresample   2.  4.100 /  2.  4.100
      Hyper fast Audio and Video encoder
      usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

      Use -h to get full help or, even better, run 'man ffmpeg'
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值