Linux command
mp4decrypt 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Decrypt
mp4decrypt --key [track_id]:[hex_key] [input.mp4] [output.mp4]
Decrypt
mp4decrypt --key [hex_kid]:[hex_key] [input.mp4] [output.mp4]
Decrypt
mp4decrypt --key 1:[hex_key1] --key 2:[hex_key2] [input.mp4] [output.mp4]
Decrypt
mp4decrypt --fragments-info [init.mp4] --key 1:[hex_key] [segment.m4s] [output.m4s]
Decrypt
mp4decrypt --show-progress --key 1:[hex_key] [input.mp4] [output.mp4]
说明
mp4decrypt decrypts MP4 files that have been encrypted with content protection schemes. It is part of the Bento4 SDK, a cross-platform C++ toolkit for working with ISO-MP4 files, MPEG-DASH, HLS, and CMAF. It is the decryption counterpart to mp4encrypt. The tool auto-detects the encryption scheme from the input file metadata. Supported schemes include MPEG-CENC (AES-CTR), MPEG-CBCS (AES-CBC subsample pattern), PIFF (Microsoft PlayReady), OMA-PDCF, Marlin IPMP, and ISMACRYP. These cover the DRM systems commonly used in industry: Widevine, PlayReady, FairPlay, and Marlin. For OMA DCF files, use 1 as the track index. For Marlin IPMP/ACGK encryption, use 0 as the track ID. KIDs (hex Key IDs) are only applicable to MPEG-CENC family encryption.
参数
- --key _\<id\>_:_\<key\>_
- Specify a decryption key. _id_ is either a track ID (decimal) or a 128-bit KID (hex). _key_ is the 128-bit decryption key in hex. May be specified multiple times for different tracks.
- --fragments-info _\<filename\>_
- Decrypt fragments using track information from a separate file. Used for fragmented MP4 workflows (DASH/HLS segments).
- --show-progress
- Display progress details during decryption
FAQ
What is the mp4decrypt command used for?
mp4decrypt decrypts MP4 files that have been encrypted with content protection schemes. It is part of the Bento4 SDK, a cross-platform C++ toolkit for working with ISO-MP4 files, MPEG-DASH, HLS, and CMAF. It is the decryption counterpart to mp4encrypt. The tool auto-detects the encryption scheme from the input file metadata. Supported schemes include MPEG-CENC (AES-CTR), MPEG-CBCS (AES-CBC subsample pattern), PIFF (Microsoft PlayReady), OMA-PDCF, Marlin IPMP, and ISMACRYP. These cover the DRM systems commonly used in industry: Widevine, PlayReady, FairPlay, and Marlin. For OMA DCF files, use 1 as the track index. For Marlin IPMP/ACGK encryption, use 0 as the track ID. KIDs (hex Key IDs) are only applicable to MPEG-CENC family encryption.
How do I run a basic mp4decrypt example?
Run `mp4decrypt --key [track_id]:[hex_key] [input.mp4] [output.mp4]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --key _\<id\>_:_\<key\>_ do in mp4decrypt?
Specify a decryption key. _id_ is either a track ID (decimal) or a 128-bit KID (hex). _key_ is the 128-bit decryption key in hex. May be specified multiple times for different tracks.