Closed Murmur closed 1 year ago
ClearKeyDRM CBCS + InbandEventStream crash as well https://refapp.hbbtv.org/videos/dashtest/test4/cbcs/manifest_clearkey_evtib.mpd
ClearKeyDRM CBCS without InbandEventStream xml field is ok https://refapp.hbbtv.org/videos/dashtest/test4/cbcs/manifest_clearkey.mpd
ClearKeyDRM CENC + InbandEventStream is ok https://refapp.hbbtv.org/videos/dashtest/test4/cenc/manifest_clearkey_evtib.mpd
Kid: QyFWeBI0EjQSNBI0EjQSNw Key: EjQSNBI0EjQSNBI0EjQSNw
The inclusion of an InbandEventStream in the manifest causes the whole segment to be parsed in order to extract the emsg
.
The problem is that the existing senc
parser in dashjs assumes that there is always a per-sample IV, and that the length of that is 8 bytes. In the CBCS example there are no per-sample IVs in use, so the senc
parser over-reads for each entry, causing it to overrun its buffer.
Since the senc
parser is (currently) useful only when playing MSS streams, an easy fix might be to make a quick change to only add the MSS-specific parsers when MSS is actively in use. In that case, the senc box won't be parsed - it just gets read opaquely.
(Note: fixing the senc
parser is non-trivial because it requires additional context from other boxes)
CENC: SampleIV 8 bytes
, CBCS: ConstantIV 16 bytes
I made a simple standalone player and both CENC+CBCS works with EMSG inband events. It's something DashjsDemoUI do in a default player settings? https://refapp.hbbtv.org/dash/dashjs/index.html?video=cbcsevtib https://refapp.hbbtv.org/dash/dashjs/index.html?video=cencevtib
Event message is printed at 0s,15s timestamps. Test player use a playready drm.
As @davemevans the demo UI includes the Smooth Streaming files:
<script src="../../dist/dash.mss.debug.js"></script>
So your example page is probably missing:
ISOBoxer.addBoxProcessor('senc', sencProcessor);
@Murmur Can you please do a quick check if #4147 solves this issue
@Murmur Can you please do a quick check if #4147 solves this issue
@dsilhavy All good. Win10Edge Playready CBCS+EMSG ok, ClearKey CBCS+EMSG ok. CENC+EMSG still ok, Nodrm+EMSG still ok.
Thanks @Murmur
( Nightly Dashjs, Win10 Edge Playready )
CBCS drm and InbandEventStream xml field combination crash, using the same segments but no event xml field in a manifest works fine. Same happens with Widevine(Chrome, Firefox, Edge) drm as well.
CBCS + InbandEventStream crash, see error message below. https://refapp.hbbtv.org/videos/dashtest/test4/cbcs/manifest_evtib.mpd https://test.playready.microsoft.com/service/rightsmanager.asmx?cfg=(kid:header,sl:2000,persist:false,contentkey:EjQSNBI0EjQSNBI0EjQSNw==,ckt:aescbc)
CBCS without InbandEventStream xml element is ok https://refapp.hbbtv.org/videos/dashtest/test4/cbcs/manifest.mpd https://test.playready.microsoft.com/service/rightsmanager.asmx?cfg=(kid:header,sl:2000,persist:false,contentkey:EjQSNBI0EjQSNBI0EjQSNw==,ckt:aescbc)
CENC + InbandEventStream is ok https://refapp.hbbtv.org/videos/dashtest/test4/cenc/manifest_evtib.mpd https://test.playready.microsoft.com/service/rightsmanager.asmx?cfg=(kid:header,sl:2000,persist:false,contentkey:EjQSNBI0EjQSNBI0EjQSNw==)
NoDrm + InbandEventStream is ok https://refapp.hbbtv.org/videos/dashtest/test4/manifest_evtib.mpd
Segments
cbcs/v1/1.m4s, cbcs/v1/5.m4s | cenc/v1/1.m4s, cenc/v1/5.m4s
has EMSG message box.