今天对公司线上的几台机器做了下ffmpeg的更新,没有什么技术含量,还是简单记录下,做个流水账~哈哈

软件包获取方式

官方网站:https://ffmpeg.org/download.html
github:https://github.com/FFmpeg/FFmpeg/releases

更新前版本确认

升级前确认版本信息 ==> 2.4

[root@thatsit FFmpeg-n3.1.2]# ffmpeg -version|grep version
ffmpeg version 2.4 Copyright (c) 2000-2014 the FFmpeg developers
[root@thatsit FFmpeg-n3.1.2]#

更新操作

下面以更新到3.1.2为例

1,安装新版本ffmpeg

wget https://github.com/FFmpeg/FFmpeg/archive/n3.1.2.tar.gz
tar xf n3.1.2.tar.gz
cd FFmpeg-n3.1.2
./configure --prefix=/usr/local/ffmpeg_3.1.2/ --enable-gpl --enable-shared --enable-libmp3lame --enable-libvorbis --enable-pthreads --disable-ffserver --enable-nonfree --enable-libx264 --enable-libfdk_aac --enable-decoder=png --enable-encoder=png --enable-libopencv
make
make install

安装之后的目录结构如下:

[root@BJSH-SLATLAS-02.meitu-inc.com ~]# tree -L 1 /usr/local/ffmpeg_3.1.2/
/usr/local/ffmpeg_3.1.2/
├── bin
├── include
├── lib
└── share 4 directories, 0 files
[root@BJSH-SLATLAS-02.meitu-inc.com ~]#

2,调整动态链接库

[root@thatsit ~]# tail -1 /etc/ld.so.conf
/usr/local/ffmpeg_3.1.2/lib
[root@thatsit ~]#

如果程序找不到动态链接库,会报类似下面的错误信息:

[root@thatsit bin]# ffprobe
ffprobe: error while loading shared libraries: libavdevice.so.57: cannot open shared object file: No such file or directory
[root@thatsit bin]#

3,删除之前的软链接并重新创建软链接

[root@thatsit FFmpeg-n3.1.2]# which ffmpeg
/usr/local/bin/ffmpeg
[root@thatsit FFmpeg-n3.1.2]# cd /usr/local/bin/
[root@thatsit bin]# ll|grep ff
lrwxrwxrwx 1 root root 28 Oct 22 2015 ffmpeg -> /usr/local/ffmpeg/bin/ffmpeg
[root@thatsit bin]# rm -f ffmpeg
[root@thatsit bin]# ln -s /usr/local/ffmpeg_3.1.2/bin/ffmpeg .
[root@thatsit bin]# ln -s /usr/local/ffmpeg_3.1.2/bin/ffprobe .
[root@thatsit bin]# ll|grep ff
lrwxrwxrwx 1 root root 34 Mar 1 23:17 ffmpeg -> /usr/local/ffmpeg_3.1.2/bin/ffmpeg
lrwxrwxrwx 1 root root 35 Mar 1 23:17 ffprobe -> /usr/local/ffmpeg_3.1.2/bin/ffprobe
[root@thatsit bin]#

版本验证

[root@thatsit ~]# ffmpeg -version|grep version
ffmpeg version 3.1.2 Copyright (c) 2000-2016 the FFmpeg developers
[root@thatsit ~]#  

ps:需要查看ffmpeg的详细信息可以使用ffmpeg -version或者直接使用ffmpeg命令进行查看

ffmpeg -version

[root@thatsit bin]# ffmpeg -version
ffmpeg version 3.1.2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
configuration: --prefix=/usr/local/ffmpeg_3.1.2/ --enable-gpl --enable-shared --enable-libmp3lame --enable-libvorbis --enable-pthreads --disable-ffserver --enable-nonfree --enable-libx264 --enable-libfdk_aac --enable-decoder=png --enable-encoder=png --enable-libopencv
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
[root@thatsit bin]#

ffmpeg

[root@BJSH-SLATLAS-01.meitu-inc.com bin]# ffmpeg
ffmpeg version 3.1.2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
configuration: --prefix=/usr/local/ffmpeg_3.1.2/ --enable-gpl --enable-shared --enable-libmp3lame --enable-libvorbis --enable-pthreads --disable-ffserver --enable-nonfree --enable-libx264 --enable-libfdk_aac --enable-decoder=png --enable-encoder=png --enable-libopencv
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.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'
[root@BJSH-SLATLAS-01.meitu-inc.com bin]#

  

==== done ====

Good night.

更新ffmpeg的更多相关文章

  1. VC下ffmpeg例程调试报错处理

    tools/options/directories/include files  添加ffmpeg头文件所在路径 tools/options/directories/library files  添加 ...

  2. ffmpeg源码编译安装(Compile ffmpeg with source) Part 2 : 扩展安装

    在Ubuntu,Debian,Mint上编译ffmpeg 本文主要为在Ubuntu,Debian和Mint上编译安装ffmpeg和库文件以及一些扩展的编解码器.当然这与从源中安装无关. 请首先看一下通 ...

  3. 从零开始编译属于你的FFmpeg

    一.前提: 编译FFmpeg可以是初学者,尤其是对C语言项目,Linux编译不熟悉的的初学者的一道门槛. 我曾经找过很多博客,文章,有些能编译成功,有些则不能.编译通过,能够运行也是云里雾里的.其实最 ...

  4. 直接拿来用!最火的Android开源项目(完结篇)

    直接拿来用!最火的Android开源项目(完结篇) 2014-01-06 19:59 4785人阅读 评论(1) 收藏 举报 分类: android 高手进阶教程(100) 摘要:截至目前,在GitH ...

  5. 直接拿来用!最火的Android开源项目(完结篇)(转)

    摘要:截至目前,在GitHub“最受欢迎的开源项目”系列文章中我们已介绍了40个Android开源项目,对于如此众多的项目,你是Mark.和码友分享经验还是慨叹“活到老要学到老”?今天我们将继续介绍另 ...

  6. GitHub 优秀的 Android 开源项目(转)

    今天查找资源时看到的一篇文章,总结了很多实用资源,十分感谢原作者分享. 转自:http://blog.csdn.net/shulianghan/article/details/18046021 主要介 ...

  7. GitHub 优秀的 Android 开源项目

    转自:http://blog.csdn.net/shulianghan/article/details/18046021 主要介绍那些不错个性化的View,包括ListView.ActionBar.M ...

  8. Unity帧序列实时渲染脚本

    该脚本会创建一个新相机进行录制,支持包含所有相机内容,完美解决跳帧问题,可自定义分辨率等参数,脚本会输出品质为100的jpg序列,基本无损. 但缺点是帧率始终是每秒100帧,必须压制时限制帧数. 而用 ...

  9. GitHub上不错的Android开源项目(三)

    收集相关系列资料,自己用作参考,练习和实践.小伙伴们,总有一天,你也能写出 Niubility 的 Android App :-) GitHub上不错的Android开源项目(一):http://ww ...

随机推荐

  1. 第一道防线__SpringMVC配置拦截器

    这几天在公司自己开发一个小系统,但是系统的安全性也得考虑,起初没注意,赶急就光关心业务逻辑和实现效果.最后老大一出手,就把最严重的问题指出来了,他说你这根本没安全性可言,于是我试着将公司使用的spri ...

  2. Windows7共享设置

    问题描述:Win7共享文件夹时提示“您没有权限访问xxxx.请与网络管理员联系请求访问权限”     解决方案: 控制面板→网络和共享中心→更改高级共享设置→选中“启用共享以便可以访问网络的用户可以读 ...

  3. NO17--vue父子组件间单向数据流的解决办法

    在上一篇中讲解了父子组件之间是如何传值的,如果子组件需要改变传过来的数据供自己使用,或者想在子组件中改变传过来的数据并同步到父组件,那么直接改肯定是不行的,如果你这么做了,Vue 会在控制台给出警告. ...

  4. 刨根问底KVO原理

    介绍 KVO( NSKeyValueObserving )是一种监测对象属性值变化的观察者模式机制.其特点是无需事先修改被观察者代码,利用 runtime 实现运行中修改某一实例达到目的,保证了未侵入 ...

  5. String字符串的方法

    String字符串在Java开发中是我们常用的一种数据类型,同时String字符串也为我们提供了大量的方法.通过一些实例的练习,我们可以对String字符串的方法有一个比较清楚的了解. 有一个字符串S ...

  6. Netty源码分析第8章(高性能工具类FastThreadLocal和Recycler)---->第4节: recycler中获取对象

    Netty源码分析第八章: 高性能工具类FastThreadLocal和Recycler 第四节: recycler中获取对象 这一小节剖析如何从对象回收站中获取对象: 我们回顾上一小节demo的ma ...

  7. ats缓存规则

    一. 用户访问过程:1. ats收到一个用户对web对象的请求;2. 使用该地址, ats尝试着在其对象数据库(缓存)中用被请求对象的地址来定位该对象;3. 如果对象在缓存中, ats会检查该对象是否 ...

  8. GlusterFS分布式存储集群-2. 使用

    参考文档: Quick Start Guide:http://gluster.readthedocs.io/en/latest/Quick-Start-Guide/Quickstart/ Instal ...

  9. Hyperledger Fabric 中channel配置相关数据结构

    channel Configuration Transaction Hyperledger Fabric区块链网络中的配置存储在一个configuration-transaction的集合中,每个ch ...

  10. 笨办法学Python - 习题6-7: Strings and Text & More Printing

    目录 1.习题 6: 字符串(string) 和文本 2.加分习题: 3.我的答案 4.习题总结 5.习题 7: 更多打印 6.习题总结 1.习题 6: 字符串(string) 和文本 学习目标:了解 ...