I am trying to implement Mpeg DASH streaming using shaka packager. To generate segments of duration 5 seconds each, --segment_duration param helps me achieve this.
https://google.github.io/shaka-packager/html/documentation.html#chunking-options
I could see how a fragmented video is represented from the following link
What exactly is Fragmented mp4(fMP4)? How is it different from normal mp4?
- What is the purpose of fragmentation?
- Does the packager automatically create fragments when segmented?
- Does each segment have moof+mdat as represented above?
- What are subsegments?
- What happens if --segment_duration and --fragment_duration is set to the same value?
- What is the purpose of --min-buffer-time?
Segments are a property of DASH. A segment is the minimal download unit.
Fragments are a property of fragmented MP4 files. Typically a fragment consists of moof + mdat.
A fragmented MP4 is usually created as ftyp moov | moof mdat | moof mdat | ... | moof mdat |.
A regular MP4 is ftyp moov mdat or ftyp mdat moov.
A fragmented MP4 is more reliable since individual fragments can be independently decoded. A long lasting recorder is a good use case. In case of a power loss an incomplete fragmented MP4 is stil useful.
In DASH I would align fragments and segments. You probably could have multiple fragments per segments.