MSS video freezes when start time is EPOCH
Created by: RadoslawZambrowski
Environment
- [] The MPD passes the DASH-IF Conformance Tool on https://conformance.dashif.org/
-
The stream has correct Access-Control-Allow-Origin headers (CORS) -
There are no network errors such as 404s in the browser console when trying to play the stream -
The issue observed is not mentioned on https://github.com/Dash-Industry-Forum/dash.js/wiki/FAQ -
The issue occurs in the latest reference client on http://reference.dashif.org/dash.js/ and not just on my page
- Link to playable MPD file:
- Dash.js version: 3.1.2
- Browser name/version: Edge
- OS name/version: Windows 10
Steps to reproduce
Unfortunately, I've no manifest URL to share, but play a MSS stream with EPOCH start time in the manifest, in a format like below and video will freeze
<SmoothStreamingMedia MajorVersion="2" MinorVersion="2" TimeScale="10000000" Duration="113414400000">
<StreamIndex Type="audio" QualityLevels="1" TimeScale="10000000" Language="eng" Name="stream_audio_eng_128000" Chunks="5907" Url="">
<QualityLevel Index="0" Bitrate="128000" CodecPrivateData="1190" SamplingRate="48000" Channels="2" BitsPerSample="16" PacketSize="4" AudioTag="255" FourCC="AACL" />
<c t="15966717588800000" d="19200000" r="5907" />
</StreamIndex>
<StreamIndex Type="video" QualityLevels="6" TimeScale="10000000" Name="video" Chunks="5907" Url="" MaxWidth="1280" MaxHeight="720" DisplayWidth="1280" DisplayHeight="720">
<QualityLevel Index="0" Bitrate="480000" CodecPrivateData="00000001674D401FB90A05017FCB80880000030008000003019724003A9801D4F7BDC07C221145800000000168F92BC8" MaxWidth="640" MaxHeight="360" FourCC="AVC1" />
<c t="15966717588800000" d="19200000" r="5907" />
</StreamIndex>
<Protection>
<ProtectionHeader SystemID=""></ProtectionHeader>
</Protection>
</SmoothStreamingMedia>
This happens because there is a problem with parsing MSS manifest when t
is defined as EPOCH. For the first segment of the stream, time (t
) is calculated as a negative value what makes player freeze.
The issue is in this line and is related to floating-point number precisions : https://github.com/Dash-Industry-Forum/dash.js/blob/master/src/mss/parser/MssParser.js#L784
Observed behaviour
Browses freezes and the page is not responding to any user action.