当前位置:网站首页>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;
}
}
},
边栏推荐
- How to hide the scroll bar of scroll view in uniapp
- SQL server calculates the daily average and annual average of the whole province
- 【带你学c带你飞】1day 第2章 (练习2.2 求华氏温度 100°F 对应的摄氏温度
- leetcode373. Find and minimum k-pair numbers (medium)
- Additional: information desensitization;
- If you want to rewind the video picture, what simple methods can you use?
- Mathematics in Sinorgchem: computational geometry
- Realize the code scanning function of a custom layout
- MySQL operates the database through the CMD command line, and the image cannot be found during the real machine debugging of fluent
- How to use redis ordered collection
猜你喜欢
Query word weight, search word weight calculation
leetcode2311. Longest binary subsequence less than or equal to K (medium, weekly)
连通块模板及变式(共4题)
附加:信息脱敏;
What is the principle of bone conduction earphones and who is suitable for bone conduction earphones
JVM面试篇
New programmer magazine | Li Penghui talks about open source cloud native message flow system
Types of exhibition items available in the multimedia interactive exhibition hall
[opencv] - comprehensive examples of five image filters
If you want to rewind the video picture, what simple methods can you use?
随机推荐
essay structure
Which kind of sports headphones is easier to use? The most recommended sports headphones
AR增强现实可应用的场景
es面试题
CVPR 2022 | Dalian Institute of technology proposes a self calibration lighting framework for low light level image enhancement of real scenes
MySQL operates the database through the CMD command line, and the image cannot be found during the real machine debugging of fluent
Kibana controls es
leetcode2312. Selling wood blocks (difficult, weekly race)
实现一个自定义布局的扫码功能
What is the principle of bone conduction earphones and who is suitable for bone conduction earphones
What is the function of the headphone driver
[punch in questions] integrated daily 5-question sharing (phase II)
【深度学习】infomap 人脸聚类 facecluster
The middle element and the rightmost element of the shutter
Software development life cycle -- waterfall model
LFM signal denoising, time-frequency analysis, filtering
Leetcode question brushing (10) - sequential question brushing 46 to 50
leetcode2310. The one digit number is the sum of integers of K (medium, weekly)
how to come in an investnent bank team
If you want to rewind the video picture, what simple methods can you use?