You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

FFmpeg是否支持Apple FairPlay DRM所需的AES128样本加密及TS流Sample AES加密?

Hey there! Let's tackle your two questions about FFmpeg and FairPlay Sample AES encryption head-on:

1. Does FFmpeg support AES-128 sample encryption as required by Apple FairPlay DRM?

Absolutely. FFmpeg does support AES-128 sample encryption that aligns with FairPlay's specifications. This uses AES-CTR mode, which is the required encryption method for FairPlay's Sample AES standard. You'll work primarily with FFmpeg's HLS muxer (since FairPlay is commonly paired with HLS streams) and specify the sample_aes encryption scheme to handle your MPEG-TS content correctly. You'll also need to provide encryption key details—either directly via command parameters or through a dedicated key info file.

2. Does FFmpeg support Sample AES encryption similarly to how it supports Common Encryption (CENC) for Widevine/PlayReady?

Not quite identically, but FFmpeg does have dedicated support for Sample AES, even though the workflow differs from CENC.

CENC (Common Encryption) is a standardized, container-agnostic encryption format that FFmpeg supports via the cenc scheme (often used with MP4 containers for Widevine/PlayReady). For Sample AES (FairPlay's preferred method), FFmpeg's support is tightly integrated with the HLS muxer. You won't use the same CENC configuration here; instead, you'll configure the HLS muxer with sample_aes-specific parameters to generate streams compatible with FairPlay.

Quick Example Command

Here's a simplified FFmpeg command to encrypt an MPEG-TS stream with Sample AES for FairPlay:

ffmpeg -i input.ts -c copy -hls_key_info_file fairplay_key_info.txt -hls_encryption_scheme sample_aes -hls_segment_type mpegts output_fairplay.m3u8

The fairplay_key_info.txt file should include the key URL, the AES-128 key (in hex), and optionally an initialization vector (IV). If you don't specify an IV, FFmpeg will generate one automatically per segment.

内容的提问来源于stack exchange,提问作者Sathish Rao

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.12 05:30:24