首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Bento4工具难以解密CENC编码的文件

使用Bento4工具难以解密CENC编码的文件
EN

Stack Overflow用户
提问于 2016-09-17 17:42:10
回答 1查看 7.5K关注 0票数 2

我有一个在CENC中加密的文件,现在我正在尝试使用bento4 mp4decrypt tools中的mp4decrypt来解密它。该文件由mp4文件中的单个h264轨迹组成。这是mp4info的输出--verbose

代码语言:javascript
复制
File:
major brand:      dash
minor version:    0
compatible brand: iso6
compatible brand: dash
Movie:
 duration:   0 ms
 time scale: 120000
 fragments:  yes

Found 1 Tracks
Track 1:
flags:        7 ENABLED IN-MOVIE IN-PREVIEW
id:           1
type:         Video
duration: 0 ms    
language: und
media:
sample count: 0
timescale:    120000
duration:     0 (media timescale units)
duration:     0 (ms)
bitrate (computed): 6386.097 Kbps
display width:  1920.000000
display height: 817.021271
Sample Description 0
[ENCRYPTED]
  Coding:         encv
  Scheme Type:    cenc
  Scheme Version: 65536
  Scheme URI:
Protection System Details:
[schi] size=8+32
  [tenc] size=12+20
    default_AlgorithmID = 1
    default_IV_size = 8
    default_KID = [23 b6 70 1b e9 8b 4e ea 80 4e 9b 59 6c 59 37 a5]
Bytes: 0000000000000001000000000000000000000000000000000780033000480000004800000000000000010a41564320436f64696e670000000000000000000000000000000000000000000018ffff000000476176634301640028ffe1002e67640028acc8501e019effc0c7c0c81a808080a000007d200017701c00000301c9c380000773595359803c60c65801000668e938233c8f
Coding:      avc1 (H.264)
Width:       1920
Height:      816
Depth:       24
AVC Profile:          100 (High)
AVC Profile Compat:   0
AVC Level:            40
AVC NALU Length Size: 4
AVC SPS: [67640028acc8501e019effc0c7c0c81a808080a000007d200017701c00000301c9c380000773595359803c60c658]
AVC PPS: [68e938233c8f]
Codecs String: avc1.640028

因此,要使用上面的密钥解密它,我肯定会这样做:

代码语言:javascript
复制
mp4decrypt --key 1:23b6701be98b4eea804e9b596c5937a5 --show-progress input.mp4 output.mp4

MP4 Decrypter - Version 1.4
(Bento4 Version 1.5.0.0)
(c) 2002-2015 Axiomatic Systems, LLC
usage: mp4decrypt [options] <input> <output>
Options are:
--show-progress : show progress details
--key <id>:<k>
  <id> is either a track ID in decimal or a 128-bit KID in hex,
  <k> is a 128-bit key in hex
  (several --key options can be used, one for each track or KID)
  note: for dcf files, use 1 as the track index
  note: for Marlin IPMP/ACGK, use 0 as the track ID
  note: KIDs are only applicable to some encryption methods like MPEG-CENC
  --fragments-info <filename>
  Decrypt the fragments read from <input>, with track info read
  from <filename>.

我在命令行上得到的只是零输出,并且输出文件仍然无法播放。

有什么想法吗?视频轨道是针对整个文件的,而不是分割成片段本身。

EN

回答 1

Stack Overflow用户

发布于 2016-10-06 23:15:37

您正在尝试使用密钥ID而不是密钥本身来解密文件。"23 b6 70 1b e9 8b 4e ea 80 4e 9b 59 6c 59 37 a5“是密钥的标识符,而不是密钥本身。当然你不会破译的。它在文件中,以便DRM系统检索密钥(发送或搜索keyID以获取密钥本身)。尝试使用密钥值进行解密。您的mp4encrypt命令应该与如下选项一起使用:--key 1::0000000000000000,因为您的IV大小为8

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39545288

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档