2

我有一个在 CENC 中加密的文件,我现在正尝试使用bento4 mp4decrypt 工具中的 mp4decrypt 对其进行解密。该文件由 mp4 文件中的单个 h264 轨道组成。这是 mp4info --verbose 的输出

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

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

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>.

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

有任何想法吗?视频轨道是针对整个文件的,它本身不会被分割成片段。

4

1 回答 1

1

您正在尝试使用密钥 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

于 2016-10-06T15:15:36.930 回答