DASH Support in MP4Box

转载自:http://gpac.wp.mines-telecom.fr/mp4box/dash/

DASH Support in MP4Box

MP4Box can be used to generate content conformant to the MPEG-DASH specification, aka ISO/IEC 23009-1 available inISO Publicly Available Standards.

For more details on what is DASH and HTTP streaming, please refer tothis post. For more help, typeMP4Box -h dash

-dash Duration : enables DASH segmentation of input files with the given segment duration. For onDemand profile, where each media presentation is a single segment, this option sets the duration of a subsegment.

-frag dur_in_ms : specifies the duration of subsegments in ms. This duration is always less than the segment duration. By default (when not set), the subsegment duration is the DASH duration, i.e. there is only one subsegment per segment. For onDemand profile, where each media presentation is a single segment, this option sets the duration of a subsegment’s subsegment.

-out filename specifies output file name for MPD. May use relative path. All segments will be produced in the same directory as the MPD.

-tmp dirname specifies a directory for temporary file creation (the default temporary directory is OS-dependent).

-profile NAME specifies the target DASH profile:onDemand,live,main, simple, full. This will set default option values to ensure conformance to the desired profile.

-rap forces segments to begin with random access points. Segment duration may not be exactly what asked by-dash switch since encoded video data is not modified.

-frag-rap All fragments will begin with a random access points. Fragment duration may not be exactly what is asked by-frag since encoded video data is not modified. (ISOBMF only)

-segment-name name sets the segment name for generated segments. If not set (default), the segments are concatenated in output file, except if live profile is requested, in which case the default template dash_%s is used. The segment names can furthermore be configured by using a subset of the SegmentTemplate identifiers:$RepresentationID$, $Number$, $Bandwidth$and$Time. Additional items are defined:

  • $Init=VALUE$ is replaced byVALUE if the generated file is an initialization segment,
  • $Index=VALUE$ is replaced byVALUE if the generated file is an index segment.

-segment-ext name sets the segment extension. Default is m4s,null means no extension.

-base-url string  sets the base url at MPD level. Can be used several times for multiple URLs.

-mpd-title string sets MPD title.

-mpd-source string sets MPD source

-mpd-info-url string sets MPD info url.

-cprt string adds copyright string to MPD

-subsegs-per-sidx N  sets the number of subsegments to be written in each SIDX box. If 0, a single SIDX box is used per segment. If -1, no SIDX box is used. Otherwise, the segmenter will pack N subsegments in the root SIDX of the segment, with DashDuration/N/fragDuration fragments per subsegments.(ISOBMF only)

-url-template uses SegmentTemplate instead of explicit sources in segments. Ignored if segments are stored in a single file. Set by default for live profile.

-daisy-chain uses daisy-chaining of SIDX (1->2->3->4) instead of hierarchical. Ignored if-subseg-per-sidx is 0.(ISOBMF only)

-single-segment uses a single segment for each representation. Set by default for onDemand profile.

-single-file uses a single file for each representation.

-bs-switching MODE sets the bitstream switching mode to one of the following:

  • yes (default): generate initialization segments compatible with each representation in the adaptation set
  • no:turned on by default if a single input is dashed
  • single forcesyes mode when a single input is used.

This option is only used for ISOBMF inputs. The segmenter always assumes that MPEG-2 TS input use bitstream switching.

-dash-ctx FILE stores and restore DASH timing from FILE (created if not found). This option stores the current timing of the DASHed presentation, and for all segments except the first (initial call), shifts the timing according to this stored value. By calling MP4Box on a regular basis with new segment to append to the MPD, one can generate a live compatible MPD. All options from the regular mode are allowed in this mode, except the options related to the ISOonDemand profile.

It is possible to feed MP4Box with a set of ISOBMF files containing different media: MP4Box will generate multiple adaptation sets at once for ISOBMF. The different input files are filtered based on their media type, PAR, language and codec, and gathered in different adaptation sets. Media streams of the same type but with different properties are tagged as belonging to the same group through the@group attribute.

你可能感兴趣的:(流媒体技术)