FFmpeg介绍-程序员宅基地

技术标签: 音视频--FFMPEG  ffmpeg  

FFmpeg是一个集录制、转换、音/视频编码解码功能为一体的完整的开源解决方案。FFmpeg的开发是基于Linux操作系统,但是可以在大多数操作系统中编译和使用。FFmpeg支持MPEG、DivX、MPEG4、AC3、DV、FLV等40多种编码,AVI、MPEG、OGG、Matroska、ASF等90多种解码.TCPMP, VLC, MPlayer等开源播放器都用到了FFmpeg。


介绍

一、ffmpeg介绍
ffmpeg软件包经编译过后将生成三个可执行文件,ffmpeg,ffserver,ffplay。其中ffmpeg用于对媒体文件进行处理,ffserver是一个http的流媒体服务器,ffplay是一个基于SDL的简单播放器。
ffmpeg中有五个库文件,libavcodec,libavformat,libavutil,libswscale,libpostproc,其中库libavcodec,libavformat用于对媒体文件进行处理,如格式的转换;libavutil是一个通用的小型函数库,该库中实现了CRC校验码的产生,128位整数数学,最大公约数,整数开方,整数取对数,内存分配,大端小端格式的转换等功能;
权威官网document介绍


Libary中的kernel


  • libavutil

The libavutil library is a utility library to aid portable multimedia programming. It contains safe portable string functions, random number generators, data structures, additional mathematics functions, cryptography and multimedia related functionality (like enumerations for pixel and sample formats). It is not a library for code needed by both libavcodec and libavformat.
The goals for this library is to be:
Modular
It should have few interdependencies and the possibility of disabling individual parts during ./configure.
Small
Both sources and objects should be small.
Efficient
It should have low CPU and memory usage.
Useful
It should avoid useless features that almost no one needs.

  • libswscale

    The libswscale library performs highly optimized image scaling and colorspace and pixel format conversion operations.
    Specifically, this library performs the following conversions:
    • Rescaling: is the process of changing the video size. Several rescaling options and algorithms are available. This is usually a lossy process.
    • Pixel format conversion: is the process of converting the image format and colorspace of the image, for example from planar YUV420P to RGB24 packed. It also handles packing conversion, that is converts from packed layout (all pixels belonging to distinct planes interleaved in the same buffer), to planar layout (all samples belonging to the same plane stored in a dedicated buffer or “plane”).
    This is usually a lossy process in case the source and destination colorspaces differ.

  • libswresample

    The libswresample library performs highly optimized audio resampling, rematrixing and sample format conversion operations.
    Specifically, this library performs the following conversions:
    • Resampling: is the process of changing the audio rate, for example from a high sample rate of 44100Hz to 8000Hz. Audio conversion from high to low sample rate is a lossy process. Several resampling options and algorithms are available.
    • Format conversion: is the process of converting the type of samples, for example from 16-bit signed samples to unsigned 8-bit or float samples. It also handles packing conversion, when passing from packed layout (all samples belonging to distinct channels interleaved in the same buffer), to planar layout (all samples belonging to the same channel stored in a dedicated buffer or “plane”).
    • Rematrixing: is the process of changing the channel layout, for example from stereo to mono. When the input channels cannot be mapped to the output streams, the process is lossy, since it involves different gain factors and mixing.
    Various other audio conversions (e.g. stretching and padding) are enabled through dedicated options.

  • libavcodec

    The libavcodec library provides a generic encoding/decoding framework and contains multiple decoders and encoders for audio, video and subtitle streams, and several bitstream filters.
    The shared architecture provides various services ranging from bit stream I/O to DSP optimizations, and makes it suitable for implementing robust and fast codecs as well as for experimentation.

  • libavformat

    The libavformat library provides a generic framework for multiplexing and demultiplexing (muxing and demuxing) audio, video and subtitle streams. It encompasses multiple muxers and demuxers for multimedia container formats.
    It also supports several input and output protocols to access a media resource.

  • libavdevice

    The libavdevice library provides a generic framework for grabbing from and rendering to many common multimedia input/output devices, and supports several input and output devices, including Video4Linux2, VfW, DShow, and ALSA.

  • libavfilter

    The libavfilter library provides a generic audio/video filtering framework containing several filters, sources and sinks.

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qq_15807167/article/details/52235782

智能推荐

关于Linux下root密码的问题-程序员宅基地

文章浏览阅读95次。 这几天看到一个同学进不去他的Linux下的root权限,su root的时候让他敲root的密码他自己都不知道。貌似这个密码是当时装Linux的时候设的,如果自己当时不设一下的话,系统就会自动给随机一个密码给你。据说是为了安全性。那他怎么获得他的root权限呢?sudo固然可以短暂获得,但那终究是扬汤止沸。下面介绍一下做法。sudo passwd root 然后输入自己的密码,...

openstack调整实例大小_openstack 调整实例大小-程序员宅基地

文章浏览阅读1.8k次,点赞2次,收藏11次。新建实例类型2C-4G-20G修改controller和各个computer节点的nova.cnf文件vim /etc/nova/nova.conf[DEFAULT]allow_resize_to_same_host=Truescheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,Serv_openstack 调整实例大小

java笔试面试总结_java 笔试减少去同一地方的次数-程序员宅基地

文章浏览阅读382次。java笔试面试总结java基础基础多线程虚拟机数据库Spring网络dubbojava基础基础Object类常用的方法有哪些?wait:final方法,无法被重写。作用:阻塞当前线程,且当前线程必须拥有此对象的monitor(即锁)notify:final方法,无法被重写。作用:唤醒一个正在等待该对象monitor的线程。如果有多个线程都在等待该对象的monitor,只唤醒一个n..._java 笔试减少去同一地方的次数

STP,RSTP,MSTP学习_mstp 名词定义 bid pid-程序员宅基地

文章浏览阅读666次。转载至华为官方技术文档,只做笔记参考,不作它用。定义以太网交换网络中为了进行链路备份,提高网络可靠性,通常会使用冗余链路。但是使用冗余链路会在交换网络上产生环路,引发广播风暴以及MAC地址表不稳定等故障现象,从而导致用户通信质量较差,甚至通信中断。为解决交换网络中的环路问题,提出生成树协议STP(Spanning Tree Protocol)。与众多协议的发展过程一样,生成树协议也是随着网..._mstp 名词定义 bid pid

Centos7.4网卡配置_centos7.4配置网卡-程序员宅基地

文章浏览阅读1.2k次。Centos7.4网卡配置1、Linux操作系统安装完毕,那接下来如何让Linux操作系统能上外网呢?如下为Linux服务器配置IP的方法。Linux服务器网卡默认配置文件在/etc/sysconfig/network-scripts/下,命名的名称一般为:ifcfg-eth0 ifcfg-eth1 ,eth0表示第一块网卡,eth1表示第二块网卡,依次类推。修改服务器网卡IP地址命令为vi /etc/sysconfig/network-scripts/ifcfg-eth0 (注CentOS7网卡名i_centos7.4配置网卡

windows curl 之 invalid character ‘\‘‘ looking for beginning of value_urllib content:{"describe":"invalid character 'p' -程序员宅基地

文章浏览阅读1.4k次,点赞3次,收藏3次。windows terminal 执行 curl 报 invalid character '\" looking for beginning of value_urllib content:{"describe":"invalid character 'p' looking for beginning of v

随便推点

有n个人围成一圈,顺序排号。从第一个人开始报号(从1到3报数),凡报到3的的人退出圈子,问最后留下的是原来第几号的那位。_编写程序,有n个人围成一圈,顺序编号,从第一个人开始按1、2、3顺序报数,凡报 到3的-程序员宅基地

文章浏览阅读1.8k次,点赞5次,收藏4次。题目有n个人围成一圈,顺序排号。从第一个人开始报号(从1到3报数),凡报到3的的人退出圈子,问最后留下的是原来第几号的那位。思路解题关键:凡报到3的人就应该退出圈子,当有n-1个人退出圈子时剩下的那个人就是最后留下的人。解题思路:创建一个数组num[n],数组num[n]赋值从1开始到n。申请一个变量k当满足条件k=3时,第i个人退出圈子(退出圈子时num[i]-0)申请一个变量m代表..._编写程序,有n个人围成一圈,顺序编号,从第一个人开始按1、2、3顺序报数,凡报 到3的

Android加载H5页面——webView加载网页时图片不显示_android webview无法加载图片-程序员宅基地

文章浏览阅读3.8k次,点赞3次,收藏8次。WebView加载网页,图片不显示直接上效果图:在Android studio中加载URL链接的时候,有些图片可以显示,有些显示不出来;考虑可以有以下原因:android webview 从Lollipop(5.0)开始webview默认不允许混合模式,https当中不能加载http资源,而开发的时候可能使用的是https的链接,但是链接中的图片可能是http的,所以需要设置开启。解..._android webview无法加载图片

几种基本汇编指令详解_movq-程序员宅基地

文章浏览阅读4.3w次,点赞29次,收藏138次。几种基本汇编指令详解常见寄存器 寄存器 16位 32位 64位 累加寄存器 AX EAX RAX 基址寄存器 BX EBX RBX 计数寄存器 CX ECX RCX 数据寄存器 DX EDX RDX 堆栈基指针 BP EBP RBP 变址寄存器 SI ESI RSI 堆栈顶指针 SP_movq

u8、u16、u32、s8、s16、s32、Size_t是什么类型?_u8就是char-程序员宅基地

文章浏览阅读10w+次,点赞51次,收藏330次。1.u8就是unsigned char ,是8位无符号char类型的值/*!< Signed integer types */typedef signed char int8_t;typedef signed short int16_t;typedef signed long int32_t;/*!< Unsigned integer..._u8就是char

freeswitch mrcp 源码分析--数据接收(下)_freeswitch 对接腾讯云mrcp-程序员宅基地

文章浏览阅读3.3k次。在前两篇我们介绍了mrcp接收后的处理,最后会调用apr_queue_push扔到消息队列里面。 对应的,在apt_consumer_task.apt_consumer_task_run()中会循环调用pr_queue.apr_queue_pop()从队列里面取出数据:apt_consumer_task.apt_consumer_task_run –> apr_queue.apr_queue_p_freeswitch 对接腾讯云mrcp

数据库SQLite常用语句<三>_sqlite数据库 in 语句-程序员宅基地

文章浏览阅读335次。**一、数据库表的操作:** 1. 创建数据库表创建数据库:create table 表名( _id integer primary key autoincrement,//主键id自增长 name varchar(40), age integer(20), birthday datetime //最后一行不用写 逗号(,)_sqlite数据库 in 语句