Documentation ¶
Overview ¶
Package mp4ff - MP4 media file parser and writer for AVC and HEVC video, AAC audio and stpp/wvtt subtitles. Focused on fragmented files as used for streaming in DASH, MSS and HLS fMP4.
MP4 library ¶
The mp4 library has functions for parsing (called Decode) and writing (called Encode). It is focused on fragmented files as used for streaming in DASH, MSS and HLS fMP4. mp4.File is a representation of a "File" which can be more or less complete, but should have some top layer boxes. It can include
- InitSegment (ftyp + moov boxes)
- One or more segments
- Each segment has an optional styp box followed by one or more fragments
- A fragment must always consist of one moof box followed by one mdat box.
The typical child boxes are exported so that one can write paths such as
moof.Traf.Trun
to access the (only) trun box of a moof box.
Command Line Tools ¶
Some simple command line tools are available in cmd directory.
Example code ¶
Example code is available in the examples directory.
Directories ¶
Path | Synopsis |
---|---|
Package avc - parse and generate AAC meta data including ADTS headers.
|
Package avc - parse and generate AAC meta data including ADTS headers. |
Package avc - parse AVC(H.264) NAL unit headers, slice headers and complete SPS and PPS.
|
Package avc - parse AVC(H.264) NAL unit headers, slice headers and complete SPS and PPS. |
Package bits - bit reading and writing including Golomb codes and EBSP.
|
Package bits - bit reading and writing including Golomb codes and EBSP. |
Package cmd - command line tools built using mp4ff.
|
Package cmd - command line tools built using mp4ff. |
mp4ff-info
mp4ff-info prints the box tree of input mp4 (ISOBMFF) file.
|
mp4ff-info prints the box tree of input mp4 (ISOBMFF) file. |
mp4ff-nallister
mp4ff-nallister - list NAL units and slice types of first AVC or HEVC track of an mp4 (ISOBMFF) file.
|
mp4ff-nallister - list NAL units and slice types of first AVC or HEVC track of an mp4 (ISOBMFF) file. |
mp4ff-pslister
mp4ff-pslister - list parameter sets for AVC(H.264) and HEVC(H.265) video in mp4 files.
|
mp4ff-pslister - list parameter sets for AVC(H.264) and HEVC(H.265) video in mp4 files. |
mp4ff-wvttlister
mp4ff-wvttlister - list wvtt (WebVTT in ISOBMFF) samples
|
mp4ff-wvttlister - list wvtt (WebVTT in ISOBMFF) samples |
examples
|
|
initcreator
initcreator - create init segments for AVC video and AAC audio.
|
initcreator - create init segments for AVC video and AAC audio. |
multitrack
multitrack - decode example multitrack fragmented file with video and closed caption tracks
|
multitrack - decode example multitrack fragmented file with video and closed caption tracks |
resegmenter
resegmenter - resegment mp4 files into concatenated segments with new duration.
|
resegmenter - resegment mp4 files into concatenated segments with new duration. |
segmenter
segmenter - segments a progressive mp4 file into init and media segments The output is either single-track segments, or muxed multi-track segments.
|
segmenter - segments a progressive mp4 file into init and media segments The output is either single-track segments, or muxed multi-track segments. |
Package hevc - parsing of HEVC(H.265) NAL unit headers, slice headers, VPS, SPS, and PPS.
|
Package hevc - parsing of HEVC(H.265) NAL unit headers, slice headers, VPS, SPS, and PPS. |
Package mp4 - library for parsing and writing MP4/ISOBMFF files with a focus on fragmented files.
|
Package mp4 - library for parsing and writing MP4/ISOBMFF files with a focus on fragmented files. |