shaka-project / shaka-player

JavaScript player library / DASH & HLS client / MSE-EME player
Apache License 2.0
7.16k stars 1.34k forks source link

Player throw error 6001 despite correct DRM config #6646

Closed vanminhquangtri closed 5 months ago

vanminhquangtri commented 5 months ago

Have you read the Tutorials? Yes

Have you read the FAQ and checked for duplicate open issues? Yes

If the question is related to FairPlay, have you read the tutorial?

What version of Shaka Player are you using? 4.6.3

What browser and OS are you using? Mac OS Monterey 12.7.5: Chrome 125, Microsoft Edge 125 I mean this happen for Chrom and Edge on MacOs

Please ask your question I play stream H265. My device support H265. Player give error 6001 although:

This is my DRM config:

streaming: {
    bufferingGoal: 30,
    bufferBehind: 60,
    lowLatencyMode: true,
    inaccurateManifestTolerance: 0,
    rebufferingGoal: 0.01,
    stallEnabled: false,
    retryParameters: {
      timeout: 0,
      maxAttempts: 3,
      baseDelay: 2000,
      backoffFactor: 2,
      fuzzFactor: 0.5,
    },
  },
  manifest: {
    retryParameters: {
      timeout: 0,
      maxAttempts: 3,
      baseDelay: 2000,
      backoffFactor: 2,
      fuzzFactor: 0.5,
    },
  },
  abr: {
    enabled: true,
  },
  drm: {
    retryParameters: {
      timeout: 0,
      maxAttempts: 3,
      baseDelay: 2000,
      backoffFactor: 2,
      fuzzFactor: 0.5,
    },
    servers: {
      'com.microsoft.playready': process.env.SIGMA_PLAYREADY_URL,
      'com.widevine.alpha': process.env.SIGMA_WIDEVINE_URL,
      'com.apple.fps.1_0': process.env.SIGMA_FAIRPLAY_LICENSE_URL,
    },
  },

This is my support info, return from shaka.Player.probeSupport()

{
    "manifest": {
        "application/dash+xml": true,
        "video/vnd.mpeg.dash.mpd": true,
        "application/x-mpegurl": true,
        "application/vnd.apple.mpegurl": true,
        "application/vnd.ms-sstr+xml": true,
        "application/x-offline-manifest": true
    },
    "media": {
        "video/mp4; codecs=\"avc1.42E01E\"": true,
        "video/mp4": true,
        "video/mp4; codecs=\"avc3.42E01E\"": true,
        "video/mp4; codecs=\"hev1.1.6.L93.90\"": true,
        "video/mp4; codecs=\"hvc1.1.6.L93.90\"": true,
        "video/mp4; codecs=\"hev1.2.4.L153.B0\"; eotf=\"smpte2084\"": true,
        "video/mp4; codecs=\"hvc1.2.4.L153.B0\"; eotf=\"smpte2084\"": true,
        "video/mp4; codecs=\"vp9\"": false,
        "video/mp4; codecs=\"vp09.00.10.08\"": true,
        "video/mp4; codecs=\"av01.0.01M.08\"": true,
        "video/mp4; codecs=\"dvh1.20.01\"": false,
        "audio/mp4; codecs=\"mp4a.40.2\"": true,
        "audio/mp4": true,
        "audio/mp4; codecs=\"ac-3\"": false,
        "audio/mp4; codecs=\"ec-3\"": false,
        "audio/mp4; codecs=\"ac-4\"": false,
        "audio/mp4; codecs=\"opus\"": true,
        "audio/mp4; codecs=\"flac\"": true,
        "audio/mp4; codecs=\"dtsc\"": false,
        "audio/mp4; codecs=\"dtse\"": false,
        "audio/mp4; codecs=\"dtsx\"": false,
        "video/webm; codecs=\"vp8\"": true,
        "video/webm": true,
        "video/webm; codecs=\"vp9\"": true,
        "video/webm; codecs=\"vp09.00.10.08\"": true,
        "audio/webm; codecs=\"vorbis\"": true,
        "audio/webm": true,
        "audio/webm; codecs=\"opus\"": true,
        "video/mp2t; codecs=\"avc1.42E01E\"": true,
        "video/mp2t": true,
        "video/mp2t; codecs=\"avc3.42E01E\"": true,
        "video/mp2t; codecs=\"hvc1.1.6.L93.90\"": true,
        "video/mp2t; codecs=\"mp4a.40.2\"": true,
        "video/mp2t; codecs=\"ac-3\"": false,
        "video/mp2t; codecs=\"ec-3\"": false,
        "text/vtt": true,
        "application/mp4; codecs=\"wvtt\"": true,
        "application/mp4": true,
        "application/ttml+xml": true,
        "application/mp4; codecs=\"stpp\"": true,
        "audio/aac": true,
        "audio/ac3": false,
        "audio/ec3": false,
        "audio/mpeg": true
    },
    "drm": {
        "org.w3.clearkey": {
            "persistentState": false
        },
        "com.widevine.alpha": {
            "persistentState": true
        },
        "com.microsoft.playready": null,
        "com.microsoft.playready.recommendation": null,
        "com.apple.fps.1_0": null,
        "com.apple.fps": null,
        "com.adobe.primetime": null
    },
    "offline": true
}

This is my manifest

<?xml version="1.0" ?>
<MPD
    xmlns:cenc="urn:mpeg:cenc:2013"
    xmlns:mspr="urn:microsoft:playready"
    xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" minBufferTime="PT4.00S" mediaPresentationDuration="PT2M0.167S" type="static">
    <Period>
        <!-- Video -->
        <AdaptationSet mimeType="video/mp4" segmentAlignment="true" startWithSAP="1" maxWidth="1920" maxHeight="1080" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
            <!-- MPEG Common Encryption -->
            <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="e191e7f8-4e7c-42af-b088-52c63d336df5"/>
            <!-- PlayReady -->
            <ContentProtection schemeIdUri="urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95" value="2.0">
                <mspr:pro>4AIAAAEAAQDWAjwAVwBSAE0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAAOgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZgB0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQAGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAHIAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEAVABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQBZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBMAEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+ADwALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4AKwBPAGUAUgA0AFgAeABPAHIAMABLAHcAaQBGAEwARwBQAFQATgB0ADkAUQA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBVAE0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AEsAUwBVAE0APgA8AEwAQQBfAFUAUgBMAD4AaAB0AHQAcABzADoALwAvAGwAaQBjAGUAbgBzAGUALgBzAGkAZwBtAGEAZAByAG0ALgBjAG8AbQAvAGwAaQBjAGUAbgBzAGUALwB2AGUAcgBpAGYAeQAvAHAAbABhAHkAcgBlAGEAZAB5ADwALwBMAEEAXwBVAFIATAA+ADwARABTAF8ASQBEAD4AQQBIACsAMAAzAGoAdQBLAGIAVQBHAGIASABsADEAVgAvAFEASQB3AFIAQQA9AD0APAAvAEQAUwBfAEkARAA+ADwALwBEAEEAVABBAD4APAAvAFcAUgBNAEgARQBBAEQARQBSAD4A</cenc:pssh>
            </ContentProtection>
            <!-- Widevine -->
            <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
                <cenc:pssh>AAAAZXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEUSEOGR5/hOfEKvsIhSxj0zbfUaD3RodWRvbXVsdGltZWRpYSIYb2ZmbGluZV9wYWNrYWdlcl92b2RfRkhECAFI49yVmwY=</cenc:pssh>
            </ContentProtection>
            <Representation id="video-hvc1-1" codecs="hvc1.1.2.L63.90" width="640" height="360" scanType="progressive" frameRate="24" bandwidth="884580">
                <BaseURL>media-video-hvc1-1.mp4</BaseURL>
                <SegmentBase indexRange="1892-2295">
                    <Initialization range="0-1891"/>
                </SegmentBase>
            </Representation>
            <Representation id="video-hvc1-2" codecs="hvc1.1.2.L90.90" width="854" height="480" scanType="progressive" frameRate="24" bandwidth="1424136">
                <BaseURL>media-video-hvc1-2.mp4</BaseURL>
                <SegmentBase indexRange="1898-2301">
                    <Initialization range="0-1897"/>
                </SegmentBase>
            </Representation>
            <Representation id="video-hvc1-3" codecs="hvc1.1.2.L93.90" width="1280" height="720" scanType="progressive" frameRate="24" bandwidth="2238212">
                <BaseURL>media-video-hvc1-3.mp4</BaseURL>
                <SegmentBase indexRange="1895-2298">
                    <Initialization range="0-1894"/>
                </SegmentBase>
            </Representation>
            <Representation id="video-hvc1-4" codecs="hvc1.1.2.L120.90" width="1920" height="1080" scanType="progressive" frameRate="24" bandwidth="3761233">
                <BaseURL>media-video-hvc1-4.mp4</BaseURL>
                <SegmentBase indexRange="1895-2298">
                    <Initialization range="0-1894"/>
                </SegmentBase>
            </Representation>
        </AdaptationSet>
        <!-- Audio -->
        <AdaptationSet mimeType="audio/mp4" startWithSAP="1" segmentAlignment="true" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
            <!-- MPEG Common Encryption -->
            <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="e191e7f8-4e7c-42af-b088-52c63d336df5"/>
            <!-- PlayReady -->
            <ContentProtection schemeIdUri="urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95" value="2.0">
                <mspr:pro>4AIAAAEAAQDWAjwAVwBSAE0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAAOgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZgB0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQAGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAHIAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEAVABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQBZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBMAEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+ADwALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4AKwBPAGUAUgA0AFgAeABPAHIAMABLAHcAaQBGAEwARwBQAFQATgB0ADkAUQA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBVAE0APgBlAHQAKwBSAGwAYQBxADEAYgBaAGsAPQA8AC8AQwBIAEUAQwBLAFMAVQBNAD4AP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AbgBzAGUALgBzAGkAZwBtAGEAZAByAG0ALgBjAG8AbQAvAGwAaQBjAGUAbgBzAGUALwB2AGUAcgBpAGYAeQAvAHAAbABhAHkAcgBlAGEAZAB5ADwALwBMAEEAXwBVAFIATAA+ADwARABTAF8ASQBEAD4AQQBIACsAMAAzAGoAdQBLAGIAVQBHAGIASABsADEAVgAvAFEASQB3AFIAQQA9AD0APAAvAEQAUwBfAEkARAA+ADwALwBEAEEAVABBAD4APAAvAFcAUgBNAEgARQBBAEQARQBSAD4A</cenc:pssh>
            </ContentProtection>
            <!-- Widevine -->
            <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
                <cenc:pssh>AAAAZXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEUSEOGR5/hOfEKvsIhSxj0zbfUaD3RodWRvbXVsdGltZWRpYSIYb2ZmbGluZV9wYWNrYWdlcl92b2RfRkhECAFI49yVmwY=</cenc:pssh>
            </ContentProtection>
            <Representation id="audio-und-mp4a.40.2" codecs="mp4a.40.2" bandwidth="188005" audioSamplingRate="48000">
                <AudioChannelConfiguration schemeIdUri="urn:mpeg:mpegB:cicp:ChannelConfiguration" value="2"/>
                <BaseURL>media-audio-und-mp4a.40.2.mp4</BaseURL>
                <SegmentBase indexRange="1580-1983">
                    <Initialization range="0-1579"/>
                </SegmentBase>
            </Representation>
        </AdaptationSet>
    </Period>
</MPD>
avelad commented 5 months ago

Widevine + HEVC is only supported with Widevine L1 and only in Windows with a experimental configuration. See: https://github.com/StaZhu/enable-chromium-hevc-hardware-decoding?tab=readme-ov-file#encrypted-content