MP4Box: fragmentation, segmentation, splitting and interleaving
来源:互联网 发布:c语言return0写在哪 编辑:程序博客网 时间:2024/05/21 12:50
With our work on Dynamic Adaptive Streaming over HTTP (DASH), in the current version of GPAC (revision 2642 on SVN), we now have many options for interleaving, fragmenting and segmenting … which may be confusing. It is time to clarify their usage in MP4Box. Some related aspects using MPEG-2 TS instead of MP4 can be seen in this previous post.
The options are:
-inter time_in_ms (with possibly -tight) or -flat (no interleaving)
-frag time_in_ms
-dash dur_in_ms
-split time_sec (or -split-size)
Interleaving (-inter) is when (groups of ) samples of different tracks are stored alternatively in the file: e.g. N milliseconds of video samples, followed by N milliseconds of audio samples, followed by N milliseconds of video samples … Typically, interleaved samples are grouped within an interleaving window. Interleaving reduces disk accesses, playback buffer requirements and enables progressive download and playback.
Fragmentation (-frag) is an optional process applicable to the MP4 file format. By default, MP4 files generated with MP4Box are not fragmented. This process consists in using Movie Fragments (moof). Movie Fragments is a tool introduced in the ISO spec to improve recording of long-running sequences and that is now used for HTTP streaming. Even if it is possible, according to the ISO spec, to do interleaving on fragments, MP4Box currently does not support it, because we don’t see important use cases for it. For instance, all audio samples within a fragment are contiguously stored and similarly for the video samples. The only way to ‘interleave’ tracks is to have small fragments. There may be some overhead for big files, we welcome comments on this.
Segmentation (-dash) is the process of creating segments, parts of an original file meant for individual/separate HTTP download (not necessarily for individual playback). A segment can be a part of a big file or a separate file. It is not specific to the MP4 file format (in particular it may apply to MPEG-2 TS) but a segment may imply specific ISO signaling (styp and sidx boxes, for instance). A segment is what is refered to by the XML file used to drive the HTTP Streaming and segment boundaries can be convenient places for bitstream switching. Segmentation often implies fragmentation but not necessarily.
Last, MP4Box can split (-split) a file and create individual playable files from an original one. It does not use segmentation in the above sense, it removes fragmentation and can use interleaving.
Some examples of MP4Box usages:
- Rewrites a file with an interleaving window of 1 sec.
MP4Box -inter 1000 file.mp4
- Rewrites a file with 10 sec. fragments
MP4Box -frag 10000 file.mp4
- Rewrites a file (and creates the associated XML) with 10 sec. fragments and 30 sec. segments
MP4Box -frag 10000 -dash 30000 file.mp4
- Segmentation of a file into 30 sec. segment files with 10 sec. fragments (and creation of the associated XML file.mpd)
MP4Box -frag 10000 -dash 30000 -segment-name segment_file file.mp4
Interested readers can find more details about the ISO Base Media File Format specification, here.
转自:
http://gpac.wp.mines-telecom.fr/2011/02/02/mp4box-fragmentation-segmentation-splitting-and-interleaving/
- MP4Box: fragmentation, segmentation, splitting and interleaving
- MP4Box
- mp4box
- NUMA and node interleaving
- A - Lesha and array splitting
- A. Lesha and array splitting
- Lesha and array splitting CodeForces
- Interleaving Positive and Negative Numbers
- Interleaving Positive and Negative Numbers
- Memory Translation and Segmentation
- Memory Translation and Segmentation
- Simultaneous Detection and Segmentation
- Apache HBase Region Splitting and Merging
- Apache HBase Region Splitting and Merging
- Apache HBase Region Splitting and Merging
- Apache HBase Region Splitting and Merging
- Http Response Splitting and Cache poisoning
- Apache HBase Region Splitting and Merging
- sgu 118 Digital Root
- hdu 4450 Draw Something
- 使用ProGuard使你android代码保持混淆
- 五只猴子分桃,算法&面试
- xcode意外崩溃
- MP4Box: fragmentation, segmentation, splitting and interleaving
- 贪心算法::启发式搜索
- Linux网络编程一步一步学-设置非阻塞方式
- 刷机大师探秘
- 默认参数和当前日期相关
- 我总是这样,一个人默默的承受悲伤:QQ伤感日志
- DASH
- 推荐算法
- 范数