文档目录
FFmpeg API
本节目录
- 解封装流程(Demuxing) 一、从文件读取 packet 到解码出 frame 的完整流程 extern "C" { #include <libavformat/avformat.h> …
- 封装流程(Muxing) 一、从编码后的 packet 写出文件/推流的完整流程 struct VideoEncoder { AVFormatContext* fmt_ctx = …
- RGB ↔ YUV 转换(sws_scale) 一、为什么需要它 从桌面采集(DXGI/PipeWire)拿到的是 BGRA/RGBA 帧,编码器只接受 YUV420P。sws_scale 一次性完成: …
- 第四阶段总结 解封装(Demuxing): avformat_open_input → 打开文件 av_read_frame → 读 packet …