ffmpeg-drm
Installation
SKILL.md
ffmpeg-drm
Context: $ARGUMENTS
Quick start
- Encrypt HLS with AES-128: → Steps 1 → 2 → 3 → 4
- Package DASH CENC (ClearKey / Widevine / PlayReady-ready): → Steps 1 → 3 → 4
- Rotate keys mid-stream: → Step 3 with
-hls_flags periodic_rekey - Play back a
crypto:file: → Step 4 - Decrypt a segment for QA:
scripts/drm.py decrypt-segment ...
When to use
- You need to protect a VOD or live HLS stream with AES-128 full-segment encryption.
- You need to package MPEG-DASH with Common Encryption (CENC, cbcs, cenc-aes-ctr) for ClearKey, Widevine, PlayReady, or FairPlay-ready workflows.
- You need to generate HLS key info files, rotate keys, or signal ClearKey in an MPD.
- You need a reproducible, scripted encryption pipeline without a commercial packager.
- Don't use for: Widevine/PlayReady license server integration (ffmpeg can't emit PSSH boxes reliably — use Shaka Packager or Bento4), or FairPlay SAMPLE-AES-CTR signaling (use Apple
mediafilesegmenter).