I try to encrypt video through mediafilesegmenter but can't add keyformat in m3u8 file.

Hello,

I try to encrypt video for fairplay streaming through mediafilesegmenter below command.


mediafilesegmenter -k Key.txt -K dm://keyid -S fps_test3.mp4


In Key.txt file : 16 byte key store


I encrypt well but can't add KEYFORMAT="com.apple.streamingkeydelivery" in m3u8 file.


When i excute this command mediafilesegmenter -k Key.txt -K dm://dm -S fps_test3.mp4

Can't encrypt video this command.


Please give me right command line, so i can encrypt fairplay streaming video.


Thanks - advance.

Hi,


For FairPlay DRM your Key.txt file needs to be a 32 byte store (secret key + secret initialisation vector concatenated).


Then to segment and encrypt, something like:


mediafilesegmenter -I -start-segments-with-iframe -t 6 -i fps_test3_index.m3u8 --stream-encrypt --streaming-key-delivery --encrypt-key-file=./Key.txt --encrypt-key-url=skd://test3 fps_test3.mp4


Please note that the PATH component of the encrypt-key-url is defined as a unique identifier for the the content/asset and is required to identify the encryption key that must be returned by the FairPlay key server implementation. I used test3 here as an example.

I try to encrypt video through mediafilesegmenter but can't add keyformat in m3u8 file.
 
 
Q