Can not playback downloaded encrypted HLS fmp4 on iPhone

Hi all,

we want to play downloaded encrypted HLS Fragment MP4 files on iPhone, and we are using UsingAVFoundationToPlayAndPersistHTTPLiveStreams to test. on this HLSCatalog app, we can playback encrypted HLS Fragment MP4 streaming, but when we download the encrypted HLS Fragment MP4 to device/iPhone, then try to playback on device, but now, it has an issue:The error is: Error: Optional("The operation couldn’t be completed. (CoreMediaErrorDomain error 1718449215.)")

So, we want to know how can I playback downloaded encrypted HLS fmp4 on iPhone. and you can try below url: http://69.234.244.220/prod/vod/HDR10_2D_LEFT_48FPS_FMP4_Encrypted/prog_index.m3u8

Steps to reproduce:

1: create a HLS fragment mp4 with mediafilesegmenter: mediafilesegmenter --iso-fragmented -t 4 --encrypt-key-file=BT709-2D-48FPS.key --encrypt-key-url=http://69.234.244.220:5000/download/BT709-2D-48FPS.key -f prod/vod/HDR10_2D_LEFT_48FPS_FMP4_Encrypted HDR10_2D_LEFT_48FPS.mp4

2: upload to content server

3: download UsingAVFoundationToPlayAndPersistHTTPLiveStreams from https://developer.apple.com/documentation/avfoundation/offline_playback_and_storage/using_avfoundation_to_play_and_persist_http_live_streams

4: in HLSCatalog app, replace playlist_url of Item-1 of Streams to http://69.234.244.220/prod/vod/HDR10_2D_LEFT_48FPS_FMP4_Encrypted/prog_index.m3u8

5: in HLSCatalog app->click the icon of Advanced Stream-->click download, when download success, the try play...now, it can NOT playback on iPhone.

Hello @4hours. The note on the Overview section of Using AVFoundation to play and persist HTTP Live Streams mentions the sample doesn't support saving FairPlay Streaming (FPS) content. Please refer to the FairPlay Streaming Server SDK for a sample that shows how to download encrypted content.

Hi

the url is not FPS url(m3u8 does not contain KEYFORMAT="com.apple.streamingkeydelivery"), and the url is encrypted HLS url, So, except FPS, are there any other APIs/tools that support playback downloaded encrypted HLS fmp4?

OR

in order to support playback downloaded encrypted HLS fmp4, I MUST use FairPlay Streaming (FPS)?

Thanks.

Can not playback downloaded encrypted HLS fmp4 on iPhone
 
 
Q