Saving m3u8 stream to gallery

Hi all;


I have a cache system working for HLS by using AVAssetDownloadTask, this task notifies me when a playlist download has completed as well as working to cache all video data and prevent duplicate downloads.


We would like to give users the option of saving this downloaded movpkg as an mp4 to their gallery, is this possible?


So far I have not found any way to handle the asset itself or the downloaded data in a way that would allow this conversion, I placed it inside an asset hoping we could use this to extract singular tracks and export however:

compatibleWithSavedPhotosAlbum is NO

isExportable is NO

isReadable is NO

isComposable is NO

Asset has it's media selection groups as expected.

Tracks returns nil unless it is in a player item.



At this point it is feeling like I will manually have to parse the movpkg folder and convert the data manually, is there an easier way to do this?