1

lately I have been trying to implement HLS streaming and offline capabilities on my iOS project. Currently I have been using my own downloading library to download different streaming files, like Widevine streams. The issue that I notice is that AVAssetDownloadURLSession downloads the hls files and saves it on the phone locally in a .movpkg format. I have been looking online if there is any packager (Like Shaka-packager) where I could transform my hls file to .movpkg and then download the .movpkg using my own download library instead of relying on apple AVAssetDownloadURLSession. Any help is appreciated.

Thanks

1 Answers1

2

One of the options is how to download and play HLS

  1. Download the remote m3u8 playlist
  2. Parse the playlist
  3. Download all the chunks for the required resolution and language (media0.ts, media1.ts, ...)
  4. Create a local m3u8 playlist (local_playlist.m3u8)
  5. Start the local server with the endpoint, which will return the local m3u8 and all chunks.
  6. Create an AVAsset with a URL to the local server.
dinis
  • 386
  • 5
  • 3
  • hi @dinis we developing a mobile application using Flutter. I'm facing problem playing HLS (m3u8) from the local asset on the iOS device. Can you explain points 5 and 6 in little briefs with some examples so that it will help me to understand playing HLS videos locally? – Jai Techie Apr 01 '22 at 06:05