FLV packaging principle

FLV (Flash Video) is a popular streaming media format designed and developed by Adobe. Due to its video file size and simple packaging, it is very suitable for applications on the Internet. In addition, FLV can be played using Flash Player, and the Flash Player plug-in has been installed on most browsers in the world, which makes it very easy to play FLV videos through web pages. At present, mainstream video websites such as Youku, Tudou, LeTV and other websites all use the FLV format without exception. The file extension of the FLV package format is usually ".flv".

Generally speaking, FLV consists of two parts: File Header and File Body. The file body is composed of a series of tags. Therefore, an FLV file is structured as shown in Figure 1.
Insert picture description here
Among them, each Tag also contains the Previous Tag Size field, which indicates the size of the previous Tag. The types of tags can be video, audio and script, and each tag can only contain one of the above three types of data. Figure 2 shows the detailed structure of the FLV file.

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_23350817/article/details/107775801