axiomatic-systems / Bento4

Full-featured MP4 format, MPEG DASH, HLS, CMAF SDK and tools
http://www.bento4.com
2.03k stars 483 forks source link

AES-128 HLS not playing with Fairplay #532

Open ashiskumarsahu opened 4 years ago

ashiskumarsahu commented 4 years ago

Hi, I am looking for a solution for AES-128 support for HLS with Fairplay but still no luck. I have tried with the following methods:

/var/www/html/bento4/bin/mp4hls --verbose --encryption-mode=AES-128 --encryption-key=01fd4a2885bfff4213b3c23c511764ccdcc662932883a33905aa2d01f260291c --encryption-iv-mode=fps --encryption-key-format=com.apple.streamingkeydelivery --encryption-key-uri=skd://expressplay_token /var/www/html/encoding-test/39774/sample.mf4

/var/www/html/bento4/bin/mp4dash --encryption-key=30537460994376649869149380419693:58043169292813174717439662781721 --use-segment-list --marlin --hls --encryption-cenc-scheme=cbcs --widevine --widevine-header=provider:intertrust#content_id:2a --playready --playready-version=4.3 --playready-header=https://expressplay-licensing.axprod.net/LicensingService.ashx --fairplay-key-uri=skd://expressplay_token sample.mf4

/var/www/html/bento4/bin/mp4hls --encryption-key=01fd4a2885bfff4213b3c23c511764ccdcc662932883a33905aa2d01f260291c --encryption-iv-mode=fps --encryption-key-format=com.apple.streamingkeydelivery --encryption-key-uri=skd://expressplay_token /var/www/html/encoding-test/39774/sample_360.mf4

I have encoded with ffmpeg and fragmented with mp4fragment tool with 4000 fragment duration. Could any one suggest me the correct way to do this.

Additional notes:

py-pkulk commented 3 years ago

Try something like this : mp4hls.bat -o HLS_Encrypted\san_output --encryption-mode=AES-128 --encryption-key=708b1a811e1XXXXXXXXXXXXfd708B1A81YYYYYYYYYYYYYY1D1FD --encryption-iv-mode=fps --encryption-key-format=com.apple.streamingkeydelivery --encryption-key-uri=skd://fps.myweb.com/;70835353-5333434343422232323232 --encryption-key-format-versions=1 fragmented_audio_aac20.mp4 fragmented_audio_ddp51.mp4 fragmented_video_h264_3000kbps.mp4 fragmented_video_h264_4500kbps.mp4