关于ffmpeg的安装具体步骤和说明

摘要:
1、 Windows安装:直接下载地址:https://ffmpeg.zeranoe.com/builds/https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20160316-git-d0a9114-英寸64-静态。7z解压缩后,您可以使用:ffmpeg iC:ffmmpegest.avi-b:v640kc:ffmpeoutput.ts

一、windows安装:

直接下载地址:

https://ffmpeg.zeranoe.com/builds/

https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20160316-git-d0a9114-win64-static.7z

解压后就可以使用:


ffmpeg -i C:ffmpeg est.avi -b:v 640k c:ffmpegoutput.ts



二、linux源代码安装:

例如以下:

下载 源代码包:ffmpeg-2.8.6.tar.bz2

1.从网络上下载到的源代码包,然后解压到指文件夹


  如果下载文件夹 /opt/soft

  cd /opt/soft

  解压包:

  tar -jxvf ffmpeg-2.8.6.tar.bz2

   进入解压后文件夹

  cd ffmpeg-2.8.6

 运行

./configure --enable-shared --prefix=/usr/local/ffmpeg

提示出错:

yasm/nasm not found or too old. Use --disable-yasm for a crippled build.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.


依照提示须要安装yasm

使用例如以下
yum install yasm


安装完毕后,继续运行

./configure --enable-shared --prefix=/usr/local/ffmpeg


时间比較长,须要等待几分钟

然后运行以下

make

make install

时间比較长,须要等待几分钟

运行过程没有报错,则安装成功

检查是否安装成功:


/usr/local/ffmpeg/bin/ffmpeg --version

报错例如以下:

/usr/local/ffmpeg/bin/ffmpeg: error while loading shared libraries: libavdevice.so.56: cannot open shared object file: No such file or directory


提示库文件找不到。



改动文件/etc/ld.so.conf 内容添加/usr/local/ffmpeg/lib/

vim /etc/ld.so.conf



include ld.so.conf.d/*.conf
/usr/local/ffmpeg/lib/


使改动生效

ldconfig


运行 /usr/local/ffmpeg/bin/ffmpeg --version

则返回



配置环境变量 path

export PATH=/usr/local/ffmpeg/bin/:$PATH

env

则在不论什么文件夹都能够运行 ffmpeg --version


測试运行转码:

ffmpeg -i test.avi -b:v 640k output.ts

免责声明:文章转载自《关于ffmpeg的安装具体步骤和说明》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇WPF 饼状图,柱形图,折线图 (1 柱形图)android之APN下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

FFmpeg-filter

概述 FFmpeg一共包含8个库: avcodec:编解码(最重要的库)。 avformat:封装格式处理。 avfilter:滤镜特效处理。 avdevice:各种设备的输入输出。 avutil:工具库(大部分库都需要这个库的支持)。 postproc:后加工。 swresample:音频采样数据格式转换。 swscale:视频像素数据格式转换。 F...

ffmpeg文档17-视频编码器

17 视频编码器 介绍一些当前有效的视频编码器 libtheora libtheora的封装 编译需要头和库文件,还需要利用--enable-libtheora在配置中允许 更多信息参考http://www.theora.org/ libtheora选项 下面是映射给libtheora的全局选项,它们对品质和码率产生影响。 b 对CBR(固定码率编码...

FFmpeg笔记--vcodec和-c:v,-acodec和-c:a的区别?

在看ffmpeg命令的时候经常会看到有些地方使用--vcodec指定视频解码器,而有些地方使用-c:v指定视频解码器,那这两个有没有区别呢? ffmpeg的官方文档: -vcodec codec (output) Set the video codec. This is an alias for -codec:v. 也就是说-vcodec和-code...

推流和拉流的概念以及RTMP和HLS协议

https://www.bbsmax.com/A/x9J2wZM56o/ 推流为将直播内容推送至服务器的过程;拉流为服务器已有直播内容,用指定地址进行拉取的过程。 rtmp rtmp是Real Time Messaging Protocol(实时消息传输协议)的首字母缩写。该协议基于TCP,是一个协议族,包括RTMP基本协议及RTMPT/RTMPS/RTM...

GStreamer Plugin: Embedded video playback halted; module decodebin20 reported: Your GStreamer installation is missing a plug-in.

标题是在Linux下使用系统yum install 的opencv库来获取视频帧的时候抛出来的错误消息。opencv调用了Gstream的API来处理了视频。错误抛出的代码如下图: http://ubuntuforums.org/archive/index.php/t-1730395.html http://stackoverflow.com/quest...

FFMPEG 中的avio

1.avio接口 const char *avio_find_protocol_name(const char *url); int avio_check(const char *url, intflags); int avpriv_io_move(const char *url_src, const char *url_dst); int avpriv_...