Skip to content
claytercekPublic
forked from lieff/minimp4

About

Minimalistic MP4 mux/demux single header library

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

66 Commits

Folders and files

Repository files navigation

Mini MP4

Build Status

Easy embeddable MP4 mux/demux library.

Fork notice: this fork carries fuzzer-found memory-safety and denial-of-service fixes for the demuxer (MP4D_open and friends): null-pointer derefs from track-less boxes, integer overflows in allocation-size math, unbounded file-controlled allocations, and O(n²) parsing hangs. Found with libFuzzer + ASan/UBSan against malformed inputs. See the commit history for details on each fix. Upstream appears unmaintained; these patches are offered there via pull request.

Usage

Muxing

Muxing can be done using 3 modes. Default mode uses one big mdat chunk:

default

This is most efficient mode, but disadvantage is that we need go back and patch mdat chunk size. This can be a problem in some cases, for example if stream transfered over network. To workaround this sequential mode is used:

default

This mode do not make any backwards seek. And last mode is fragmented aka fMP4.

default

This mode stores track information first and spreads indexes across all stream, so decoding can start before whole stream available. This mode is sequential too and usually used by browsers and HLS streaming.

Bindings

Interesting links

About

Minimalistic MP4 mux/demux single header library

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages