当前位置:网站首页>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;
}
}
},
边栏推荐
- Build a modern data architecture on the cloud with Amazon AppFlow, Amazon lake formation and Amazon redshift
- 2022 low voltage electrician test question simulation test question bank simulation test platform operation
- 实现一个自定义布局的扫码功能
- 【liuyubobobo-玩转Leetcode算法面试】【00】课程概述
- Opengauss database backup and recovery guide
- CoordinatorLayout + TabLayout + ViewPager2(里面再嵌套一个RecyclerView),RecyclerView的滑动冲突解决
- Vsocde has cli every time it is opened js
- leetcode2311. Longest binary subsequence less than or equal to K (medium, weekly)
- DNS domain name resolution
- Open that kind of construction document
猜你喜欢
Infix expression to suffix expression (computer) code
MySQL operates the database through the CMD command line, and the image cannot be found during the real machine debugging of fluent
leetcode2310. The one digit number is the sum of integers of K (medium, weekly)
Ar Augmented Reality applicable scenarios
花一个星期时间呕心沥血整理出高频软件测试/自动化测试面试题和答案
Which brand of sports headset is better? Bluetooth headset suitable for sports
How to turn off the LED light of Rog motherboard
[reading notes] programmer training manual - practical learning is the most effective (project driven)
The basic steps of using information theory to deal with scientific problems are
How to build and use redis environment
随机推荐
Which is a good Bluetooth headset of about 300? 2022 high cost performance Bluetooth headset inventory
实现一个自定义布局的扫码功能
What style of Bluetooth headset is easy to use? High quality Bluetooth headset ranking
What is the principle of bone conduction earphones and who is suitable for bone conduction earphones
oracle创建只读权限的用户简单四步走
剑指 Offer 47. 礼物的最大价值
使用开源项目【Banner】实现轮播图效果(带小圆点)
leetcode2309. 兼具大小写的最好英文字母(简单,周赛)
leetcode2309. The best English letters with both upper and lower case (simple, weekly)
Open那啥的搭建文档
Is bone conduction earphone better than traditional earphones? The sound production principle of bone conduction earphones is popular science
CoordinatorLayout + TabLayout + ViewPager2(里面再嵌套一个RecyclerView),RecyclerView的滑动冲突解决
【带你学c带你飞】3day第2章 用C语言编写程序(练习 2.3 计算分段函数)
How to turn off the LED light of Rog motherboard
What kind of good and cost-effective Bluetooth sports headset to buy
What are the necessary things for students to start school? Ranking list of Bluetooth headsets with good sound quality
花一个星期时间呕心沥血整理出高频软件测试/自动化测试面试题和答案
Types of exhibition items available in the multimedia interactive exhibition hall
Which brand of running headphones is good? How many professional running headphones are recommended
Spend a week painstakingly sorting out the interview questions and answers of high-frequency software testing / automated testing