How to package AVC into MP4
ipcdev opened this issue · comments
How to package AVC into MP4
How to package AVC/HEVC into mp4
@ipcdev There is currently no such example code in this library.
However, it should be rather easy to write such code for generating fragmented/segmented MP4 files using this library.
An AVC stream consists of one or more NALUs (Network Adaptation Layer Units) per frame, and the MP4 files have one frame per sample in the file. Beyond the NALUs you need timestamps to get the right framerate/timing.
You first need to make an init segment as in examples/initcreator
.
Then you need to make "media segments". The code in examples/segmenter
takes a progressive mp4 file and creates such segments by pulling out allt samples and then writing them with the metadata boxes needed.
I hope this helps.