Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging DRM-encrypted MPEG-DASH stream (Playready) #1615

Closed
5 tasks done
radiantmediaplayer opened this issue Sep 28, 2016 · 7 comments
Closed
5 tasks done

Debugging DRM-encrypted MPEG-DASH stream (Playready) #1615

radiantmediaplayer opened this issue Sep 28, 2016 · 7 comments

Comments

@radiantmediaplayer
Copy link

Environment
Steps to reproduce

Input manifest http://dashpr.staging.tevolution.tv/misc/vm_hd_4/sub_drm.ism/master.mpd into dash.js 2.3. You will need custom protection data.
var protectionData = {
"com.microsoft.playready": {
"serverURL": "http://pr.test.expressplay.com/playready/RightsManager.asmx?ExpressPlayToken=AQAAAxEKWuIAAABgMGpLhIKbmWmgEAiYJ6gj_ty32uETVvTKzHaazk_OxhKG13qvntHHzuA9aCXW6xbtm5Tig6B5Ido-iWm_x2oJOifzoP5Pij3mkVtnudJwNTdFmTc-YCuv_zvNWbQ2KNTViym00NArouvo_ybiTNbdI7TnGLM",
}
};

You can see it live here: http://www.ppr.0pb.org/~flemoing/radiantmedia/example_radian_dash_with_DRM_playready.html

As you may guess the stream does not play in MS Edge with DRM Playready. MPEG-DASH stream is provided by Unified Streaming Platform. DRM is provided by ExpressPlay.

The stream in clear (without DRM) works as expected. The stream with Widevine DRM works on Chrome.

I have read through the log but the only relevant info I can gather is:
[228] Video Element Error: MEDIA_ERR_SRC_NOT_SUPPORTED (0xC00D002F).

I would like to know what steps could be taken to determine the root cause of this DRM-related issue. Is there any further information I can get out of dash.js to narrow down this issue.

Observed behaviour

Stream does not play

Console output
HTML1300: Navigation occurred.
test.html
No cast extension found
rmp.min.js (10,19364)
[29] [dash.js 2.3.0] MediaPlayer has been initialized 
rmp-dash.debug.js (2783,13)
[32] EME detected on this user agent! (ProtectionModel_21Jan2015) 
rmp-dash.debug.js (2783,13)
XML5602: Unexpected end of input.
Line: 1, Column 2
[141] Parsing complete: ( xml2json: 16.0ms, objectiron: 11.5ms, total: 0.0274s) 
rmp-dash.debug.js (2783,13)
[142] Playback Initialized 
rmp-dash.debug.js (2783,13)
[144] Manifest has been refreshed at Wed Sep 28 2016 19:20:43 GMT+0200 (Romance Summer Time)[1475083243.881]  
rmp-dash.debug.js (2783,13)
[145] SegmentTimeline detected using calculated Live Edge Time 
rmp-dash.debug.js (2783,13)
[152] MediaSource attached to element.  Waiting on open... 
rmp-dash.debug.js (2783,13)
[156] MediaSource is open! 
rmp-dash.debug.js (2783,13)
[156] Duration successfully set to: 1696.6 
rmp-dash.debug.js (2783,13)
[157] Added 0 inline events 
rmp-dash.debug.js (2783,13)
[158] video codec: video/mp4;codecs="avc1.42C01E" 
rmp-dash.debug.js (2783,13)
[160] Schedule controller stopping for video 
rmp-dash.debug.js (2783,13)
[165] audio codec: audio/mp4;codecs="mp4a.40.2" 
rmp-dash.debug.js (2783,13)
[165] audio codec: audio/mp4;codecs="mp4a.40.2" 
rmp-dash.debug.js (2783,13)
[168] Schedule controller stopping for audio 
rmp-dash.debug.js (2783,13)
[169] No text data. 
rmp-dash.debug.js (2783,13)
[171] Schedule controller stopping for fragmentedText 
rmp-dash.debug.js (2783,13)
[173] No embeddedText data. 
rmp-dash.debug.js (2783,13)
[173] No muxed data. 
rmp-dash.debug.js (2783,13)
[184] Start Event Controller 
rmp-dash.debug.js (2783,13)
[186] Schedule controller starting for video 
rmp-dash.debug.js (2783,13)
[187] Schedule controller starting for audio 
rmp-dash.debug.js (2783,13)
[188] Schedule controller starting for fragmentedText 
rmp-dash.debug.js (2783,13)
[191] Native video element event: play 
rmp-dash.debug.js (2783,13)
[214] Init fragment finished loading saving to video's init cache 
rmp-dash.debug.js (2783,13)
RMP: MPEG-DASH playbackError detected
rmp.min.js (12,16734)
[216] Video Element Error: MEDIA_ERR_SRC_NOT_SUPPORTED (0xC00D002F) 
rmp-dash.debug.js (2783,13)
[216] [object MediaError] 
rmp-dash.debug.js (2783,13)
RMP: MPEG-DASH generic error detected
rmp.min.js (12,16872)
[219] Schedule controller stopping for video 
rmp-dash.debug.js (2783,13)
[220] Schedule controller stopping for audio 
rmp-dash.debug.js (2783,13)
[221] Schedule controller stopping for fragmentedText 
rmp-dash.debug.js (2783,13)
@sandersaares
Copy link
Member

@davemevans
Copy link
Contributor

The test page doesn't work for me. I'm running Edge 25.10586.0.0/EdgeHTML 13.10586 on Windows 10.

It's barfing when the video initialisation segment is appended. This isn't encrypted, but does add pssh boxes and has the encv sample description.

@radiantmediaplayer
Copy link
Author

I am also on Edge 25.10586.0.0/EdgeHTML 13.10586 on Windows 10 and the stream won't play (black screen with spinner and error in console). I cannot play it in IE 11 neither.

@sandersaares I am surprised your version of Edge would play the stream (I was leaning towards an encryption issue rather than a playback issue). What version of Edge did you use?

@bbcrddave Out of curiosity what tools are you using to check the information within the fragment boxes? If I download the first fragment and run mediainfo on it - it does report the fragment to be encrypted.

Video 
ID : 1 
Format : AVC 
Format/Info : Advanced Video Codec 
Format profile : Baseline@L3 
Format settings, CABAC : No 
Format settings, ReFrames : 5 frames 
Codec ID : encv / avc1 
Codec ID/Info : Advanced Video Coding 
Width : 640 pixels 
Height : 360 pixels 
Display aspect ratio : 16:9 
Frame rate mode : Variable 
Color space : YUV 
Chroma subsampling : 4:2:0 
Bit depth : 8 bits 
Scan type : Progressive 
Encryption : Encrypted 

@davemevans
Copy link
Contributor

I was looking at the initialisation segment (sub_drm-video=782000.dash). It contains the encv sample entry (with sinf box and its children) and pssh boxes. These boxes signal to the decoder that an encrypted stream is to be expected, but the initialisation segment itself does not contain any encrypted data.

I just used a simple box viewer - http://download.tsi.telecom-paristech.fr/gpac/mp4box.js/filereader.html - and interpret their contents manually.

The stream fails as soon as the initialisation segment is appended, before any encrypted media is appended. Since it is a MEDIA_ERR_SRC_NOT_SUPPORTED, rather than a MEDIA_ERR_DECODE, I imagine there is something in the initialisation segment Edge doesn't like. Perhaps @sandersaares has a newer version of Edge which contains a fix for this issue?

I note that both Chrome and Firefox successfully append the initialisation segment (but obviously fail to requestMediaKeySystemAccess for PlayReady).

@radiantmediaplayer
Copy link
Author

Thanks @bbcrddave for those information - this really helps. I will try to download a VM with latest Edge (EdgeHTML 14) to see if I can gather more information.

@davemevans
Copy link
Contributor

Appears to work in Microsoft Edge 38.14393.0.0/EdgeHTML 14.14393.

Closing as not a dash.js issue. Please reopen if you believe differently.

@sandersaares
Copy link
Member

Yep, I also tested with Edge 38.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants