AVPlayer using a colorcube and HLS source

Okay,


Not so experienced with AVFoundation or iOS so finding my way.


I am trying to play a video on iOS that is sourced from a HLS stream and goes through a LUT (ColorCube)


I had it working using a .mp4 file from a server, but that approach doesn't work with a HLS stream. The general approach was


Get the Asset (AVAsset from URL)

Get the AVAssetTrack for the video

Create AVMutableComposition with that track

Create a AVMutableVideoComposition with that composition above and then pass the CIFilter set up in that constructor

Create a player item from the composition and then pass the video composition as the VideoComposition


Now that appeared to work but frankly it seems a pretty odd set up


And i assume the reason why the HLS source doesn't work is because of step 2 and there not being a track until it starts playing?


So i'm really confused about the correct set up for passing the video through a CI Filter from a HLS source.


Can anyone point me in the vague direction where i should be looking?


thanks!
Paul

Replying to add some detail.


I have the simplest version


Get an AVAsset

Create AVVideoComposition with the asset and the CI filter set up

Create AVPlayerItem and AVPlayer


So, if i supply a URL which is a .mp4 file then it works

If i supply a URL which is a HLS playlist then the video players but there are no CIFilters running


Literally just swapping the source URL so i assume that HLS must be going through some other pipeline, in which case how do i add CI Filters to that or even overlay other tracks?

@paulinventome According to Apple docs

A video composition can only be used with file-based media and is not supported for use with media served using HTTP Live Streaming.

You may wanna check out CADisplayLink for HLS instead.

AVPlayer using a colorcube and HLS source
 
 
Q