微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

为什么我的 Widevine PSSH 在 DASH 清单中无效?

如何解决为什么我的 Widevine PSSH 在 DASH 清单中无效?

首先,要对我的视频(240p、720p、2k)进行编码,我使用了 MP4Box -crypt L1/crypt.xml output_240.mp4 -out output_240_encrypted.mp4

crypt.xml

<?xml version="1.0" encoding="UTF-8" ?>
<GPACDRM type="CENC AES-CTR">
    <DRMInfo type="pssh" version="0">
        <BS ID128="EDEF8BA979D64ACEA3C827DCD51D21ED"/>
        <BS value="1" bits="32"/>
        <BS ID128="0x279926496a7f5d25da69f2b3b2799a7f"/>
    </DRMInfo>
    <CrypTrack first_IV="0x986F2358300DECB2fdbDF0BA1095F779">
        <key KID="0x279926496a7f5d25da69f2b3b2799a7f" value="0x3362e6a4b9a74bae56d7d52cc4d69973"/>
    </CrypTrack>
</GPACDRM>

当所有视频都加密后,我正在制作一个清单文件 MP4Box -dash 3000 -rap -pssh=m -profile live -out L1/ecdn/manifest.mpd output_240_encrypted.mp4#video output_720_encrypted.mp4#video output_2k_encrypted.mp4#video

manifest.mpd

<?xml version="1.0"?>
<!-- MPD file Generated with GPAC version 1.0.1-rev0-gd8538e8a-master at 2021-03-13T16:52:22.319Z -->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.500S" type="static" mediaPresentationDuration="PT0H0M27.366S" maxSegmentDuration="PT0H0M3.000S" profiles="urn:mpeg:dash:profile:isoff-live:2011" xmlns:cenc="urn:mpeg:cenc:2013">
 <Programinformation moreinformationURL="http://gpac.io">
  <Title>manifest.mpd generated by GPAC</Title>
 </Programinformation>

 <Period duration="PT0H0M27.366S">
  <AdaptationSet segmentAlignment="true" maxWidth="3840" maxHeight="2160" maxFrameRate="30" par="16:9" lang="und" startWithSAP="1">
   <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="27992649-6a7f-5d25-da69-f2b3b2799a7f"/>
   <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" value="Widevine">
    <cenc:pssh>AAAANHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABQAAAABJ5kmSWp/XSXaafKzsnmafw==</cenc:pssh>
   </ContentProtection>
   <Representation id="1" mimeType="video/mp4" codecs="avc1.4D4015" width="424" height="240" frameRate="30" sar="160:159" bandwidth="556592">
    <SegmentTemplate media="output_240_encrypted_dash$Number$.m4s" initialization="output_240_encrypted_dashinit.mp4" timescale="30000" startNumber="1" duration="90000"/>
   </Representation>
   <Representation id="2" mimeType="video/mp4" codecs="avc1.4D401F" width="1280" height="720" frameRate="30" sar="1:1" bandwidth="2434464">
    <SegmentTemplate media="output_720_encrypted_dash$Number$.m4s" initialization="output_720_encrypted_dashinit.mp4" timescale="30000" startNumber="1" duration="90000"/>
   </Representation>
   <Representation id="3" mimeType="video/mp4" codecs="avc1.4D4033" width="3840" height="2160" frameRate="30" sar="1:1" bandwidth="19269424">
    <SegmentTemplate media="output_2k_encrypted_dash$Number$.m4s" initialization="output_2k_encrypted_dashinit.mp4" timescale="30000" startNumber="1" duration="90000"/>
   </Representation>
  </AdaptationSet>
 </Period>
</MPD>

然而,清单包含一个被我的 Dash.js 播放器和一些在线 Pssh-Box 解析器认为无效的 PSSH。我做错了什么?

附言我正在尝试对视频进行编码,以便可以在我的播放器中使用 Axinom 许可服务器。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?