3

I basically know how an .mpd file would have to be structured to support streaming from separate .mp4 (or webm) files.

However, I would like to implement the "static" (aka "on-demand") method, thus only having one file per quality that I want to offer in the stream.

In all samples, this is done by supplying the indexRange & range values within a Representation like this:

<Representation bandwidth="2073921" codecs="avc1.4d401f" height="720" id="2" mimeType="video/mp4" width="1280">
        <BaseURL>car-20120827-88.mp4</BaseURL>
        <SegmentBase indexRange="708-1183">
          <Initialization range="0-707" />
        </SegmentBase>
</Representation>

What I could not find out anywhere is how one would calculate the indexRange/range values here, using only ffmpeg (or ffprobe).
What exactly would one have to do to get those numbers right for arbitrary (yet supported, of course) video files to create the .mpd file for them?

Or am I trying to figure out something in vain here and those values are just arbitrary?

TheSHEEEP
  • 2,961
  • 2
  • 31
  • 57
  • Might this be useful? http://stackoverflow.com/questions/14751134/how-to-create-a-mpd-file-of-mpeg-dash-to-play-a-webm-video – lapinkoira Apr 07 '16 at 15:22
  • Unfortunately not, since none of the links describes how to get those values exactly, only what those values are. GPAC/MP4Box is mentioned often, but I would prefer a solution without that tool. – TheSHEEEP Apr 07 '16 at 15:24
  • Of course, if mp4box is the only thing capable of producing useful indexRange number, I will have to, but I do hope there is another way. – TheSHEEEP Apr 07 '16 at 16:02
  • You will need to use or write a tool like mp4box. ffmpeg will not do it without rewriting the file. The numbers are not arbitrary. They are specific start points of each fragment – szatmary Apr 07 '16 at 17:38
  • I would be fine with ffmpeg rewriting the file, as I use the ffmpeg API on the C/C++ level to create the video in the first place, so I have full control there. – TheSHEEEP Apr 13 '16 at 08:33

0 Answers0