当前位置:网站首页>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;
}
}
},边栏推荐
- If you want to rewind the video picture, what simple methods can you use?
- flutter 中间一个元素,最右边一个元素
- Open that kind of construction document
- CVPR 2022 | Dalian Institute of technology proposes a self calibration lighting framework for low light level image enhancement of real scenes
- 超图iServer rest服务之feature查询
- [learn C and fly] day 5 chapter 2 program in C language (Exercise 2)
- QT实现界面跳转
- How to hide the scroll bar of scroll view in uniapp
- The wave of layoffs in big factories continues, but I, who was born in both non undergraduate schools, turned against the wind and entered Alibaba
- STM32__ 05 - PWM controlled DC motor
猜你喜欢

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

Which kind of sports headphones is easier to use? The most recommended sports headphones

An analysis of circuit for quick understanding
![[liuyubobobo play with leetcode algorithm interview] [00] Course Overview](/img/1c/c8cab92c74b6658c3ef608c5255f1f.png)
[liuyubobobo play with leetcode algorithm interview] [00] Course Overview

golang---锁

Opengauss database backup and recovery guide
![[learn C and fly] 4day Chapter 2 program in C language (exercise 2.5 generate power table and factorial table](/img/f4/298f64c4b4f8674eda4e8fb19a976a.png)
[learn C and fly] 4day Chapter 2 program in C language (exercise 2.5 generate power table and factorial table

LFM signal denoising, time-frequency analysis, filtering
![[graduation season] graduate seniors share how to make undergraduate more meaningful](/img/03/9adc44476e87b2499aa0ebb11cb247.png)
[graduation season] graduate seniors share how to make undergraduate more meaningful

LeetCode刷题(十)——顺序刷题46至50
随机推荐
New programmer magazine | Li Penghui talks about open source cloud native message flow system
Face++ realizes face detection in the way of flow
leetcode2310. The one digit number is the sum of integers of K (medium, weekly)
剑指 Offer 62. 圆圈中最后剩下的数字
【无标题】
Calculation (computer) code of suffix expression
JS slow animation
[graduation season] graduate seniors share how to make undergraduate more meaningful
Leetcode question brushing (10) - sequential question brushing 46 to 50
Webgpu (I): basic concepts
CVPR 2022 | 大连理工提出自校准照明框架,用于现实场景的微光图像增强
* and & symbols in C language
Email picture attachment
Use the open source project [banner] to achieve the effect of rotating pictures (with dots)
No programming code technology! Four step easy flower store applet
Oracle creates a user with read-only permission in four simple steps
Logging only errors to the console Set system property ‘log4j2. debug‘ to sh
golang---锁
Types of exhibition items available in the multimedia interactive exhibition hall
STM32F103——两路PWM控制电机