FFmpeg有两个存储帧数据的结构体,其中AVPacket是解封装后保存压缩数据包,AVFrame是解码后保存音视频帧。 AVPacket结构体以前放在avcodec.h头文件中,在FFmpeg4.4以后放在单独packet.h头文件。官方对AVPacket的说明如下: /*** This structure stores compressed data. It is typically ex
AVPacket结构用于保存压缩编码过的数据。在解码时,该结构的实例通常作为解复用器(demuxer)的输出并输入到解码器中;在编码时,通常是编码器的输出,并输入到复用器(muxer)中。该结构体的定义如下: typedef struct AVPacket {/*** A reference to the reference-counted buffer where the packet d