Dash-Industry-Forum / dash.js

A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
Other
5.15k stars 1.68k forks source link

Support for period continuity #4306

Closed giorgos-epitropou-obs closed 1 year ago

giorgos-epitropou-obs commented 1 year ago

Hi, I encountered a manifest with 2 periods where each of the AdaptationSets in the second Period carry a SupplementalProperty descriptor with schemeIdUri set to urn:dvb:dash:period_continuity:2014 and value matching the Period id attribute of the first Period. Does dash.js support such connected representations?

<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.500S" profiles="urn:dvb:dash:profile:dvb-dash:2014,urn:dvb:dash:profile:dvb-dash:2017,urn:dvb:dash:profile:dvb-dash:isoff-ext-live:2014" mediaPresentationDuration="PT0H3M8S" type="static">
<Period id="1" start="PT0S" duration="PT0H2M8S">
    <AdaptationSet id="66" segmentAlignment="true" maxWidth="3840" maxHeight="2160" maxFrameRate="50" par="16:9" lang="und">
        <SegmentTemplate timescale="50000" media="3840x2160_50_pq10_no_metadata_broadband_5min/segments/seg-$Number$.m4s" startNumber="1" duration="100000" initialization="3840x2160_50_pq10_no_metadata_broadband_5min/segments/seg-init.mp4"/>
        <Representation id="1" mimeType="video/mp4" codecs="hev1.2.4.L153.90" width="3840" height="2160" frameRate="50" sar="1:1" startWithSAP="1" bandwidth="36919472" scanType="progressive">
        </Representation>
    </AdaptationSet>
    <AdaptationSet id="67" mimeType="audio/mp4" segmentAlignment="true" lang="en">
        <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
        <Representation bandwidth="128000" codecs="mp4a.40.2" id="2" startWithSAP="1" audioSamplingRate="48000">
            <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />
            <SegmentTemplate timescale="1000" media="HEAAC_128K_1secseg_desc/media-01.fmp4/audio/seg-$Number%04d$.m4f" startNumber="0" duration="1024" initialization="HEAAC_128K_1secseg_desc/media-01.fmp4/audio/init.mp4" />
        </Representation>
    </AdaptationSet>
</Period>
<Period start="PT0H2M8S" duration="PT0H1M0S">
    <AdaptationSet id="66" segmentAlignment="true" maxWidth="3840" maxHeight="2160" maxFrameRate="50" par="16:9" lang="und">
        <SupplementalProperty schemeIdUri="urn:dvb:dash:period_continuity:2014" value="1"/>
        <SegmentTemplate presentationTimeOffset="6400000" timescale="50000" media="3840x2160_50_pq10_no_metadata_broadband_5min/segments/seg-$Number$.m4s" startNumber="65" duration="100000" initialization="3840x2160_50_pq10_no_metadata_broadband_5min/segments/seg-init.mp4"/>
        <Representation id="1" mimeType="video/mp4" codecs="hev1.2.4.L153.90" width="3840" height="2160" frameRate="50" sar="1:1" startWithSAP="1" bandwidth="36919472" scanType="progressive">
        </Representation>
    </AdaptationSet>
    <AdaptationSet id="67" mimeType="audio/mp4" segmentAlignment="true" lang="en">
        <SupplementalProperty schemeIdUri="urn:dvb:dash:period_continuity:2014" value="1"/>
        <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
        <Representation bandwidth="128000" codecs="mp4a.40.2" id="2" startWithSAP="1" audioSamplingRate="48000">
            <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />
            <SegmentTemplate presentationTimeOffset="6144000" timescale="48000" media="HEAAC_128K_1secseg_desc/media-01.fmp4/audio/seg-$Number%04d$.m4f" startNumber="125" duration="49152" initialization="HEAAC_128K_1secseg_desc/media-01.fmp4/audio/init.mp4" />
        </Representation>
    </AdaptationSet>
</Period>
</MPD>

I also used the dash validator tool and got this part:

            "spec": "HbbTV-DVB DASH Validation Requirements",
            "section": "DVB: Section 10.5.2.3",
            "test": "If Adaptation Sets in two different Periods are period continuous, then Adaptation Sets with the value of their @id attribute set to AID in the first and subsequent Periods SHALL be associated as defined in clause 10.5.2.3",
            "messages": [
              "✗ Associated values not found for Adaptation 0 period 0, and Adapation 0 period 1",
              "✗ Associated values not found for Adaptation 1 period 0, and Adapation 1 period 1",
              "✗ Associated values not found for Adaptation 0 period 0, and Adapation 0 period 1",
              "✗ Associated values not found for Adaptation 1 period 0, and Adapation 1 period 1",
              "✗ Associated values not found for Adaptation 0 period 0, and Adapation 0 period 1",
              "✗ Associated values not found for Adaptation 1 period 0, and Adapation 1 period 1",
              "✗ Associated values not found for Adaptation 0 period 0, and Adapation 0 period 1",
              "✗ Associated values not found for Adaptation 1 period 0, and Adapation 1 period 1"
            ],
            "state": "FAIL",
            "part": {}
          }

but I can see the adaptation id's matching. Any ideas if the manifest also contain errors?

dsilhavy commented 1 year ago

We are not checking for urn:dvb:period_continuity:2014 in dash.js, but we are supporting a smooth period transition if the codecs match or Sourcebuffer.changeType() is supported. What is the expected behavior that you are missing in dash.js?

giorgos-epitropou-obs commented 1 year ago

It seems that while I get the event which indicates the period change, dash.js start downloading only audio segments and no video. So after a while playback just stops and no actual (smooth) period transition happens. That's the reason I asked if this is an unsupported feature.

dsilhavy commented 1 year ago

Then probably the video segments are not correctly signaled in the new period. If you can provide a hosted version of your content we can take a look

giorgos-epitropou-obs commented 1 year ago

The problem was on (one of) the video segments not the property, but thank you for your help