我是靠谱客的博主 想人陪蜜蜂,最近开发中收集的这篇文章主要介绍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'

最后

以上就是想人陪蜜蜂为你收集整理的linux下编译ffmpeg的全部内容,希望文章能够帮你解决linux下编译ffmpeg所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(87)

评论列表共有 0 条评论

立即
投稿
返回
顶部