Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The format of time/duration in MPEG-DASH .MPD file?

The following is a snap of a .mpd file:

<MPD type="static" xmlns="urn:mpeg:DASH:schema:MPD:2011" profiles="urn:mpeg:dash:profile:full:2011" minBufferTime="PT1.5S" mediaPresentationDuration="PT0H1M59.89S">
 <ProgramInformation moreInformationURL="http://gpac.sourceforge.net">
  <Title>Media Presentation Description for file hdworld_0696kbps_ffmpeg_track1.mp4 generated with GPAC </Title>
 </ProgramInformation>
 <Period start="PT0S" duration="PT0H1M59.89S">

For attributes of time-range type, like minBufferTime, mediaPresentationDuration, start or duration, they seems to share the same format. Does anyone know what format it is and where I can get a spec for that?

like image 289
Drake Guan Avatar asked May 22 '14 07:05

Drake Guan


People also ask

What is .MPD file?

A media presentation description (MPD) file is used to hold the information on the various streams and the bandwidths they are associated with. In your video source (src) attribute you point to the MPD instead of to the media file as you would with non-adaptive media.

What is timescale in MPD?

Timescale is "ticks per second", so each segment is 1 minute long --> <SegmentList timescale="90000" duration="5400000"> <RepresentationIndex sourceURL="representation-index.sidx"/> <SegmentURL media="segment-1.ts"/> <SegmentURL media="segment-2.ts"/> <SegmentURL media="segment-3.ts"/> <SegmentURL media="segment-4.ts"/ ...

What is timescale in DASH?

A sample timeline is measured in timescale units defined as a number of units per second ([DASH] 5.3. 9.2 and 5.3. 9.6).

How does MPEG-DASH work?

MPEG-DASH is similar to HLS, another streaming protocol, in that it breaks videos down into smaller chunks and encodes those chunks at different quality levels. This makes it possible to stream videos at different quality levels, and to switch in the middle of a video from one quality level to another one.


2 Answers

The format is ISO8601 duration.

like image 68
Drake Guan Avatar answered Sep 19 '22 12:09

Drake Guan


Don't know a spec for that, also didn't find it in the standard, but from what i gathered so far, the format is pretty simple:

You always have 'PT' as a prefix, then you give a time-range in units of seconds (S), minutes (M), hours (H) and days (D). For seconds, fractional values are possible.

Back to the manifest snap you posted:

mediaPresentationDuration="PT0H1M59.89S" refers to a mediaPresentationDuration of 0 hours, 1 minute and 59.89 seconds.

minBufferTime="PT1.5S" refers to a minBufferTime 1.5 seconds.

start="PT0S" means start is "at" 0 seconds.

like image 43
Bastian35022 Avatar answered Sep 16 '22 12:09

Bastian35022