Hello,
Is there an example from Apple on how to extract the data to create an Iframe playlist using the AVAssetSegmentTrackReport?
I'm following the example of HLS authoring from WWDC 2020 - Author fragmented MPEG-4 content with AVAssetWriter
It states:
"You can create the playlist and the I-frame playlist based on the information AVAssetSegmentReport provides."
I've examined the AVAssetSegmentTrackReport and it only appears to provide the firstVideoSampleInformation, which is good for the first frame, but the content I'm creating contains an I-Frame every second within 6 second segments.
I've tried parsing the data object from the assetWriter delegate function's didOutputSegmentData parameter, but only getting so far parsing the NALUs - the length prefixes seem to go wrong when I hit the first NALU type 8 (PPS) in the first segment.
Alternatively, I could parse out the output from ffmpeg, but hoping there's a solution within Swift.
Many thanks