当前位置:网站首页>Analysis of FLV packaging format
Analysis of FLV packaging format
2022-07-02 02:30:00 【When can Xiaobai advance to success】
FLV(Flash Video) yes Adobe A popular streaming media format designed and developed by the company , Because of its lightweight video file size 、 Simple package and so on , Make it very suitable for application on the Internet . Besides ,FLV have access to Flash Player Play it , and Flash Player Plug ins have been installed in most browsers around the world , This makes it possible to play through the web FLV The video is very easy . At present, mainstream video websites such as Youku , Tudou.com , LETV and other websites without exception use FLV Format .FLV The file suffix of encapsulation format is usually “.flv”.
On the whole ,FLV Including file header (File Header) And the body (File Body) Two parts , The file body consists of a series of Tag form . So a FLV The file is as shown in the figure 1-1 structure .

among , Every Tag It also includes Previous Tag Size Field , That's the previous one Tag Size .Tag The type of can be video 、 Audio and Script, Every Tag Only one of the above three types of data can be included . chart 1-2 It shows FLV Detailed structure of the document . 
inputFlv: function* () {
yield 9;
var tmp = new ArrayBuffer(4);
var tmp8 = new Uint8Array(tmp);
var tmp32 = new Uint32Array(tmp);
while (true) {
tmp8[3] = 0;
var t = yield 15;
var type = t[4];
tmp8[0] = t[7];
tmp8[1] = t[6];
tmp8[2] = t[5];
var length = tmp32[0];
tmp8[0] = t[10];
tmp8[1] = t[9];
tmp8[2] = t[8];
var ts = tmp32[0];
if (ts === 0xFFFFFF) {
tmp8[3] = t[11];
ts = tmp32[0];
}
var payload = yield length;
switch (type) {
case 8:
this.opt.hasAudio && buffer.push({
ts,
payload,
decoder: audioDecoder,
type: 0
});
break;
case 9:
if (this.opt.useWCS) {
wcsVideoDecoder.decode(payload, ts);
} else {
buffer.push({
ts,
payload,
decoder: videoDecoder,
type: payload[0] >> 4
});
}
break;
}
}
},边栏推荐
- [learn C and fly] 1day Chapter 2 (exercise 2.2 find the temperature of Fahrenheit corresponding to 100 ° f)
- 大厂裁员潮不断,双非本科出身的我却逆风翻盘挺进阿里
- CoordinatorLayout + TabLayout + ViewPager2(里面再嵌套一个RecyclerView),RecyclerView的滑动冲突解决
- How to turn off debug information in rtl8189fs
- Which is a good Bluetooth headset of about 300? 2022 high cost performance Bluetooth headset inventory
- Software testing learning notes - network knowledge
- 剑指 Offer II 031. 最近最少使用缓存
- 剑指 Offer 29. 顺时针打印矩阵
- Ar Augmented Reality applicable scenarios
- 实现一个自定义布局的扫码功能
猜你喜欢

CVPR 2022 | Dalian Institute of technology proposes a self calibration lighting framework for low light level image enhancement of real scenes

Pat a-1165 block reversing (25 points)

连通块模板及变式(共4题)

CoordinatorLayout + TabLayout + ViewPager2(里面再嵌套一个RecyclerView),RecyclerView的滑动冲突解决

leetcode2312. Selling wood blocks (difficult, weekly race)

LFM信号加噪、时频分析、滤波

软件开发生命周期 --瀑布模型

Leetcode face T10 (1-9) array, ByteDance interview sharing

Decipher the AI black technology behind sports: figure skating action recognition, multi-mode video classification and wonderful clip editing

query词权重, 搜索词权重计算
随机推荐
Realize the code scanning function of a custom layout
Comparative analysis of MVC, MVP and MVVM, source code analysis
Infix expression to suffix expression (computer) code
[question 008: what is UV in unity?]
leetcode2309. The best English letters with both upper and lower case (simple, weekly)
Pytest testing framework
The middle element and the rightmost element of the shutter
Deep learning: a solution to over fitting in deep neural networks
剑指 Offer II 031. 最近最少使用缓存
Sword finger offer 29 Print matrix clockwise
How to execute an SQL in MySQL
Flutter un élément au milieu, l'élément le plus à droite
C # use system data. The split mixed mode assembly is generated for the "v2.0.50727" version of the runtime, and it cannot be loaded in the 4.0 runtime without configuring other information
Pat a-1165 block reversing (25 points)
[reading notes] programmer training manual - practical learning is the most effective (project driven)
Opengauss database backup and recovery guide
As a software testing engineer, will you choose the bank post? Laolao bank test post
RTL8189FS如何关闭Debug信息
Query word weight, search word weight calculation
Which kind of sports headphones is easier to use? The most recommended sports headphones