shaka-project / shaka-packager

A media packaging and development framework for VOD and Live DASH and HLS applications, supporting Common Encryption for Widevine and other DRM Systems.
https://shaka-project.github.io/shaka-packager/
Other
1.95k stars 504 forks source link

Incorporate SegmentTimeline in AdaptationSet (current support is to have it in each Representation) #782

Open nikhilkalantri opened 4 years ago

nikhilkalantri commented 4 years ago

Spoke to KQ offline about this and he asked me to file a feature request:

Example:

<Period id="0">

    <AdaptationSet id="0" contentType="audio" segmentAlignment="true">

      <SegmentTemplate timescale="44100" initialization="$RepresentationID$/init_a.mp4" media="$RepresentationID$/$Number$.m4a" startNumber="1">

          <SegmentTimeline>
            <S t="0" d="..."/>
            ......
            ......

            <S t="..." d="..."/>

          </SegmentTimeline>

        </SegmentTemplate>

      <Representation id="24fps_480p_950" bandwidth="134042" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">

        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>

      </Representation>

      <Representation id="24fps_360p_512" bandwidth="134042" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">

        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>

      </Representation>

      <Representation id="24fps_720p_1500" bandwidth="134042" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">

        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>

      </Representation>

      <Representation id="24fps_1080p_3500" bandwidth="134042" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">

        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>

      </Representation>

      <Representation id="24fps_720p_2300" bandwidth="134042" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">

        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>

      </Representation>

    </AdaptationSet>

    <AdaptationSet id="1" contentType="video" maxWidth="1920" maxHeight="1080" frameRate="24000/1001" segmentAlignment="true" par="16:9">

      <SegmentTemplate timescale="24000" initialization="$RepresentationID$/init_v.mp4" media="$RepresentationID$/$Number$.m4v" startNumber="1">

        <SegmentTimeline>

          <S t="0" d="..."/>
            ......
            ......

            <S t="..." d="..."/>

        </SegmentTimeline>

      </SegmentTemplate>

      <Representation id="24fps_1080p_3500" bandwidth="3535843" codecs="avc1.4d402a" mimeType="video/mp4" sar="1:1" width="1920" height="1080"/>

      <Representation id="24fps_720p_1500" bandwidth="1451442" codecs="avc1.4d4028" mimeType="video/mp4" sar="1:1" width="1280" height="720" />

      <Representation id="24fps_480p_950" bandwidth="1040040" codecs="avc1.42c01f" mimeType="video/mp4" sar="32:27" width="720" height="480" />

      <Representation id="24fps_720p_2300" bandwidth="2228135" codecs="avc1.4d4029" mimeType="video/mp4" sar="1:1" width="1280" height="720" />

      <Representation id="24fps_360p_512" bandwidth="571909" codecs="avc1.42c01e" mimeType="video/mp4" sar="1:1" width="640" height="360" />

    </AdaptationSet>

  </Period>
kqyang commented 4 years ago

@nikhilkalantri Thanks for the feature request. Let us know if you are also interested in helping us implement it.

nikhilkalantri commented 4 years ago

Sure @kqyang. I can take a look into this.