VideoHelp Forum
+ Reply to Thread
Results 1 to 2 of 2
Thread
  1. I'm trying to implement the simplest form of dash DRM player.
    I've utilized the mp4decypt from Bento4 to decrypt the segments.
    The video plays fine. The decrypted audio track contains no sound.
    Both audio and video tracks are encrypted with the same key.
    Here is the sample mpd file for the provider on which the sound is not present.

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <MPD availabilityStartTime="2019-11-02T03:56:07.353Z" minBufferTime="PT4S" minimumUpdatePeriod="PT2S" profiles="urn:mpeg:dash:profile:isoff-live:2011" publishTime="2019-11-02T09:06:17.000000Z" suggestedPresentationDelay="PT10S" timeShiftBufferDepth="PT1M0S" type="dynamic" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" xmlns:cenc="urn:mpeg:cenc:2013">
      <Period id="141540025230000" start="PT0S">
        <AdaptationSet bitstreamSwitching="false" contentType="video" id="1" mimeType="video/mp4" segmentAlignment="true">
          <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="4286d952-5a19-c9ec-bdbe-92384485e310" />
          <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" cenc:default_KID="4286d952-5a19-c9ec-bdbe-92384485e310">
            <cenc:pssh>AAAASHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACgIARIQQobZUloZyey9vpI4RIXjEBoIY2lzY29uZHMiBDI3MDQqAlNE</cenc:pssh>
          </ContentProtection>
          <SegmentTemplate initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/$Time$.m4f" startNumber="3089" timescale="90000">
            <SegmentTimeline>
              <S d="540000" r="10" t="1669680000" />
            </SegmentTimeline>
          </SegmentTemplate>
          <Representation bandwidth="360000" codecs="avc1.428015" frameRate="90000/7507" height="270" id="54001_54001_video_seg_auto_video_163" width="480" />
          <Representation bandwidth="600000" codecs="avc1.428016" frameRate="90000/3600" height="270" id="54002_54002_video_seg_auto_video_163" width="480" />
          <Representation bandwidth="800000" codecs="avc1.4D401F" frameRate="90000/3600" height="480" id="54003_54003_video_seg_auto_video_163" width="640" />
          <Representation bandwidth="960000" codecs="avc1.4D4020" frameRate="90000/3600" height="540" id="54004_54004_video_seg_auto_video_163" width="960" />
          <Representation bandwidth="1499968" codecs="avc1.640028" frameRate="90000/3600" height="720" id="54005_54005_video_seg_auto_video_163" width="1280" />
        </AdaptationSet>
        <AdaptationSet bitstreamSwitching="false" contentType="audio" id="3" lang="eng" mimeType="audio/mp4" segmentAlignment="true">
          <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="4286d952-5a19-c9ec-bdbe-92384485e310" />
          <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" cenc:default_KID="4286d952-5a19-c9ec-bdbe-92384485e310">
            <cenc:pssh>AAAASHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACgIARIQQobZUloZyey9vpI4RIXjEBoIY2lzY29uZHMiBDI3MDQqAlNE</cenc:pssh>
          </ContentProtection>
          <SegmentTemplate initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/$Time$.m4f" startNumber="3089" timescale="90000">
            <SegmentTimeline>
              <S d="540000" r="10" t="1669680000" />
            </SegmentTimeline>
          </SegmentTemplate>
          <Representation audioSamplingRate="48000" bandwidth="40000" codecs="mp4a.40.5" id="54001_54001_video_seg_auto_audio_80_mp4a.40.5_42064" />
        </AdaptationSet>
        <AdaptationSet bitstreamSwitching="false" contentType="audio" id="4" lang="mul" mimeType="audio/mp4" segmentAlignment="true">
          <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="4286d952-5a19-c9ec-bdbe-92384485e310" />
          <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" cenc:default_KID="4286d952-5a19-c9ec-bdbe-92384485e310">
            <cenc:pssh>AAAASHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACgIARIQQobZUloZyey9vpI4RIXjEBoIY2lzY29uZHMiBDI3MDQqAlNE</cenc:pssh>
          </ContentProtection>
          <SegmentTemplate initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/$Time$.m4f" startNumber="3089" timescale="90000">
            <SegmentTimeline>
              <S d="540000" r="10" t="1669680000" />
            </SegmentTimeline>
          </SegmentTemplate>
          <Representation audioSamplingRate="48000" bandwidth="40000" codecs="mp4a.40.5" id="54001_54001_video_seg_auto_audio_82_mp4a.40.5_42064" />
        </AdaptationSet>
      </Period>
    After a good amount of time spent on debugging this, I came to the conclusion that mp4decypt is not decrypting the video content properly and that it just silently fails and the incorrectly decrypted content ends up served to the user.

    Any help is appreciated.

    Thanks!
    Quote Quote  
  2. Member
    Join Date
    Apr 2020
    Location
    Mexico City
    Search Comp PM
    Hello, looking for the same topic I found your question.
    How to decrypt fragments with mp4decrypt?
    I appreciate very much your help
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!