Documentation
¶
Overview ¶
Package mp4ff implements MP4 media file parser and writer for AVC 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 implements parsing of AVC(H.264) nal headers, slice headers and complete SPS and PPS.
|
Package avc implements parsing of AVC(H.264) nal headers, slice headers and complete SPS and PPS. |
|
Package bits implements bit reading and writing including Golomb codes and EBSP.
|
Package bits implements 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
command
|
|
|
mp4ff-pslister
command
mp4ff-pslister lists parameter sets for H.264/AVC video in mp4 files.
|
mp4ff-pslister lists parameter sets for H.264/AVC video in mp4 files. |
|
examples
|
|
|
initcreator
command
|
|
|
resegmenter
command
resegmenter resegments mp4 files into concatenated segments with new duration.
|
resegmenter resegments mp4 files into concatenated segments with new duration. |
|
segmenter
command
segmenter segments a progressive mp4 file into audio and video segments There should be at most one audio and one video track in the input.
|
segmenter segments a progressive mp4 file into audio and video segments There should be at most one audio and one video track in the input. |
|
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. |
