Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoxStoreFunc ¶
type Segmenter ¶
type Segmenter struct {
// contains filtered or unexported fields
}
Segmenter segments progressive mp4 according to predefined segment duration. Resulting segments are passed to boxStoreFunc, and it is up to user to define how to store them.
Segmentation flow: 1) Make segmentation time-points using first video track 2) Make sample intervals that represent future segments 3) Create init segments for each supported track 4) Create data segments for each supported track
This flow uses high-level functions, implemented in segmentation package.
Configured segment duration should be treated like 'preference'. Segmenter can increase it if necessary in order to make segments with equal sizes.
Tracks get new numbers since they will be in separate files. For example, if input file has video track with ID 0 and audio with ID 1, then in resulting video segments will be single track with ID 0, and in resulting audio segments will be single track also with ID 0.
Approach is taken from https://github.com/Eyevinn/mp4ff/tree/master/examples/segmenter.
func NewSegmenter ¶
func NewSegmenter( logger *zap.Logger, mdatRS io.ReadSeeker, segDuration time.Duration, boxStoreFunc BoxStoreFunc, ) *Segmenter