当前位置:网站首页>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()打开的流的回调函数。
边栏推荐
- After summarizing more than 800 kubectl aliases, I'm no longer afraid that I can't remember commands!
- How to get all the values stored in localstorage
- Add noise randomly to open3d point cloud
- "14th five year plan": emphasis on the promotion of electronic contracts, electronic signatures and other applications
- Doppler effect (Doppler shift)
- Bao Yan notebook IV software engineering and calculation volume II (Chapter 8-12)
- Make a short video clip number of we media film and television. Where can I download the material?
- Teach you to run uni app with simulator on hbuilderx, conscience teaching!!!
- Bao Yan notes II software engineering and calculation volume II (Chapter 13-16)
- 硬件及接口学习总结
猜你喜欢

Fiddler Everywhere 3.2.1 Crack

China Jinmao online electronic signature, accelerating the digitization of real estate business

Spire. PDF for NET 8.7.2

Rsync remote synchronization

Zero rhino technology joined hands with the intelligence Club: the "causal faction" forum was successfully held, and the "causal revolution" brought the next generation of trusted AI

Initialize your vector & initializer with a list_ List introduction

XML configuration file (DTD detailed explanation)

The difference of time zone and the time library of go language

18. (ArcGIS API for JS) ArcGIS API for JS point collection (sketchviewmodel)

GFS distributed file system
随机推荐
STM32__ 06 - single channel ADC
上门预约服务类的App功能详解
rsync远程同步
Russian Foreign Ministry: Japan and South Korea's participation in the NATO summit affects security and stability in Asia
[EF core] mapping relationship between EF core and C data type
QT -- thread
What if the C disk is not enough? Let's see how I can clean up 25g of temp disk space after I haven't redone the system for 4 years?
[Luogu p3295] mengmengda (parallel search) (double)
C reflection and type
Spire.PDF for NET 8.7.2
Rasa 3. X learning series -rasa 3.2.1 new release
如何获取localStorage中存储的所有值
wx.getLocation(Object object)申请方法,最新版
Rasa 3.x 学习系列-Rasa 3.2.1 新版本发布
Problems encountered in the database
妙才周刊 - 8
QT QPushButton details
JS 这次真的可以禁止常量修改了!
Use mapper: --- tkmapper
Spire Office 7.5.4 for NET