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

[DASH] Text segments are not grouped together in manifest when allow_approximate_timeline is enabled #417

Closed kqyang closed 6 years ago

kqyang commented 6 years ago

See #380 for background.

Here is the result MPD

<AdaptationSet id="1" contentType="text" lang="cs" segmentAlignment="true">
      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="subtitle"/>
      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
      <Representation id="1" bandwidth="1018" codecs="wvtt" mimeType="application/mp4">
        <SegmentTemplate timescale="1000" initialization="ct24-9_subtitle_init.mp4" media="subtitle/ttv_$Number$.m4s" startNumber="1">
          <SegmentTimeline>
            <S t="0" d="3200"/>
            <S t="3200" d="3200"/>
            <S t="6400" d="3200"/>
            <S t="9600" d="3200"/>
            <S t="12800" d="3200"/>
            <S t="16000" d="3200"/>
            <S t="19200" d="3200"/>
            <S t="22400" d="3200"/>
            <S t="25600" d="3200"/>
            <S t="28800" d="3200"/>
            <S t="32000" d="3200"/>
            <S t="35200" d="3200"/>
...

It should be something like this:

<AdaptationSet id="1" contentType="text" lang="cs" segmentAlignment="true">
      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="subtitle"/>
      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
      <Representation id="1" bandwidth="1018" codecs="wvtt" mimeType="application/mp4">
        <SegmentTemplate timescale="1000" initialization="ct24-9_subtitle_init.mp4" media="subtitle/ttv_$Number$.m4s" startNumber="1">
          <SegmentTimeline>
            <S t="0" d="3200" r="..."/>
...
kqyang commented 6 years ago

Cherry-picked to v2.1.1.