当前位置:网站首页>FFMPEG关键结构体——AVFormatContext
FFMPEG关键结构体——AVFormatContext
2022-07-05 23:56:00 【陈小帅hh】
一、AVFormatContext结构体
AVFormatContext是存储音视频封装格式中包含的信息的结构体,也是FFmpeg中统领全局的结构体,对文件的封装、编码操作从这里开始。
结构体的定义位于libavformat中的avformat.h
二、常见变量
struct AVInputFormat *iformat;//输入数据的封装格式。仅解封装用,由avformat_open_input()设置。
struct AVOutputFormat *oformat;//输出数据的封装格式。仅封装用,调用者在avformat_write_header()之前设置。
AVIOContext *pb;// I/O上下文。
解封装:由用户在avformat_open_input()之前设置(然后用户必须手动关闭它)或通过avformat_open_input()设置。
封装:由用户在avformat_write_header()之前设置。 调用者必须注意关闭/释放IO上下文。
unsigned int nb_streams;//AVFormatContext.streams中元素的个数。
AVStream **streams;//文件中所有流的列表。
char filename[1024];//输入输出文件名。
int64_t start_time;//第一帧的位置。
int64_t duration;//流的持续时间
int64_t bit_rate;//总流比特率(bit / s),如果不可用则为0。
int64_t probesize;
//从输入读取的用于确定输入容器格式的数据的最大大小。
仅封装用,由调用者在avformat_open_input()之前设置。
AVDictionary *metadata;//元数据
AVCodec *video_codec;//视频编解码器
AVCodec *audio_codec;//音频编解码器
AVCodec *subtitle_codec;//字母编解码器
AVCodec *data_codec;//数据编解码器
int (*io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options);
//打开IO stream的回调函数。
void (*io_close)(struct AVFormatContext *s, AVIOContext *pb);
//关闭使用AVFormatContext.io_open()打开的流的回调函数。
边栏推荐
- XML configuration file (DTD detailed explanation)
- 硬件及接口学习总结
- 用列錶初始化你的vector&&initializer_list簡介
- 14 MySQL view
- Zhuan: in the future, such an organization can withstand the risks
- Laser slam learning record
- QCombox(重写)+QCompleter(自动补全,自动加载qcombox的下拉选项,设置背景颜色)
- 微信小程序---WXML 模板语法(附带笔记文档)
- 关于结构体所占内存大小知识
- Use CAS instead of synchronized
猜你喜欢

Online yaml to CSV tool

Spire. PDF for NET 8.7.2

Senparc.Weixin.Sample.MP源码剖析

Biased sample variance, unbiased sample variance

Wechat applet -- wxml template syntax (with notes)

多普勒效应(多普勒频移)

CAS and synchronized knowledge

SpreadJS 15.1 CN 与 SpreadJS 15.1 EN

开源crm客户关系统管理系统源码,免费分享

总结了 800多个 Kubectl 别名,再也不怕记不住命令了!
随机推荐
After summarizing more than 800 kubectl aliases, I'm no longer afraid that I can't remember commands!
如何让同步/刷新的图标(el-icon-refresh)旋转起来
保研笔记二 软件工程与计算卷二(13-16章)
Tips for using pads router
Senparc.Weixin.Sample.MP源码剖析
激光slam学习记录
Spire. PDF for NET 8.7.2
The use of El cascader and the solution of error reporting
GFS Distributed File System
第16章 OAuth2AuthorizationRequestRedirectWebFilter源码解析
Bao Yan notes II software engineering and calculation volume II (Chapter 13-16)
[online chat] the original wechat applet can also reply to Facebook homepage messages!
【在线聊天】原来微信小程序也能回复Facebook主页消息!
妙才周刊 - 8
Spire.PDF for NET 8.7.2
Upgrade openssl-1.1.1p for openssl-1.0.2k
如何获取localStorage中存储的所有值
Breadth first search open turntable lock
JS 这次真的可以禁止常量修改了!
2022.7.5-----leetcode.729