



Render: The data of each video frame that has been decoded and color space converted earlier is sent to the graphics card to be drawn on the screen.ġ.

Therefore, it is necessary to convert the data in yuv pixel format to rgb pixel format before rendering when displaying the image. At this point, the split data is compressed and encoded, and the common video compression data formats are h264.ĭecode: Simply speaking, it is to decompress the compressed encoded data into raw video pixel data, commonly used raw video pixel data formats are yuv.Ĭolor Space Convert: Normally, for image displays, it is used to display images through the RGB model, but using the YUV model can save bandwidth when transferring image data. Decapsulation plays the opposite role of encapsulation, breaking a streaming file into audio data and video data. In layman’s terms, encapsulation is the product of combining audio streams, video streams, subtitle streams and other accessories into a package according to certain rules. There is a concept called encapsulation format here, and encapsulation format refers to the combined format of audio and video, commonly known as mp4, flv, mkv, etc. libswresample: audio resampling library.ĭemultiplexing (Demux): Demultiplexing can also be called decapsulation.libswscale: image format conversion library.libavfilter: audio/video and subtitle filter library.libavcodec: core library for audio and video decoding.libavformat: encapsulation and decapsulation libraries for multimedia files or protocols, such as mp4, flv and other file encapsulation formats, rtmp, rtsp and other network protocol encapsulation formats.It generates libraries for processing and manipulating multimedia data, including the advanced audio and video decoding library libavcodec and the audio and video format conversion library libavformat. Preface FFmpegįFmpeg is a set of open source computer programs that can be used to record, convert and stream digital audio and video. Besides, the article focuses on the details that may be easily missed when decoding video, and finally, it briefly explains how to package a VideoDecoder with basic video decoding functions. This article firstly introduces the main process and basic principle of decoding video with FFmpeg as the topic secondly, it also describes the simple applications related to FFmpeg video decoding, including how to play video in a certain timeline order based on the original FFmpeg video decoding, and how to add the logic of seek when playing video.
