当前位置:网站首页>【读书会第十三期】视频文件的封装格式
【读书会第十三期】视频文件的封装格式
2022-07-04 03:46:00 【华为云】
FFmpeg的视频封装格式
FFmpeg支持很多封装格式,包括MP4、FL.V、 MKV、 TS等视频封装格式、MP3、 MC等音频封装格式以及RTMP、 RTSP、 HILS 等网络协议封装格式。
而我们重点学习MP4视频封装格式。
MP4封装格式
MP4封装格式基本上可以认为是日常生活和工作中最常见的视频文件格式,主要是由于其广泛的适用性,不仅在PC端(windows、 mac、 linux) 支持的非常好,而且在移动端(Android、 i0S) 也能流畅播放。
MP4格式标准
MP4格式标准为ISO- 14496 Part 12 和ISO- 14496 Part 14, 具体特征如下:
- MP4文件由许多Box和FullBox。
- FullBox 是Box的扩展,在lleader 中增加了8位version信息和24位的flags信息。
- 每个Box由Header和Data两部分组成。
- Header 中包含了整个Box 的长度大小(size) 和类型(type) 。
- Data 中包含了实际的数据,可以是纯数据,也可以是子Box。 当Box中的Data 是一系列子Box时,这个Box又被称为Container (容器)。
MP4 ftyp Box
ftyp Box, -般位于文件开始位置,其中包含了MP4视频文件的类型、版本、兼容协
议等信息。
MP4 moov容器
moov容器中包含了MP4视频文件的媒体数据信息,内部又包含两个子容器: mvhd和
trak,前者定义了文件头信息,后者定义了媒体文件中的track信息。
Moov容器一般默认会生成在MP4 文件结尾,在线播放时需要加载完整个文件才能正常打开,为了能够快速打开视频,需要把moov容器放在MP4文件的前面。
MP4 mdat Box
mdat Box,用来存放媒体文件的实际数据内容。
总结:
第二天的学习主要讲解了视频文件的封装格式,以最常见的MP4视频文件格式详细的讲述了格式具体的标准,可以说是将这个在生活中见得最常见的格式重新的理解了一遍,原来是这样进行封装的。
边栏推荐
- How about the ratings of 2022 Spring Festival Gala in all provinces? Map analysis helps you show clearly!
- Stm32bug [the project references devices, files or libraries that are not installed appear in keilmdk]
- MySQL data query optimization -- data structure of index
- Is it really so difficult to learn redis? Today, a fan will share his personal learning materials!
- [paddleseg source code reading] paddleseg calculation dice
- Aperçu du code source futur - série juc
- 用于TCP协议交互的TCPClientDemo
- 图解网络:什么是热备份路由器协议HSRP?
- logistic regression
- The new data center helps speed up the construction of a digital economy with data as a key element
猜你喜欢
JVM family -- heap analysis
拼夕夕二面:说说布隆过滤器与布谷鸟过滤器?应用场景?我懵了。。
What is the difference between enterprise wechat applet and wechat applet
[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush
Detailed explanation of PPTC self recovery fuse
'2'>' 10'==true? How does JS perform implicit type conversion?
@Scheduled scheduled tasks
What are the virtual machine software? What are their respective functions?
图解网络:什么是热备份路由器协议HSRP?
Command Execution Vulnerability - command execution - vulnerability sites - code injection - vulnerability exploitation - joint execution - bypass (spaces, keyword filtering, variable bypass) - two ex
随机推荐
Constantly changing harmonyos custom JS components during the Spring Festival - Smart Koi
Slurm view node configuration information
JDBC advanced
Sword finger offer:55 - I. depth of binary tree
Aperçu du code source futur - série juc
functools下的reduce函数
What are the virtual machine software? What are their respective functions?
Recent learning fragmentation (14)
Monitoring - Prometheus introduction
what does ctrl + d do?
Formulaire day05
New year's first race, submit bug reward more!
system information
选择排序与冒泡排序模板
SQL injection (1) -- determine whether there are SQL injection vulnerabilities
1289_ Implementation analysis of vtask suspend() interface in FreeRTOS
JVM family -- monitoring tools
SQL語句加强練習(MySQL8.0為例)
[untitled]
PHP database connection succeeded, but data cannot be inserted