HLS authoring - creating Iframe playlist

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

Answered by Engineer in 801749022

There's no supported way for you to extract complete iFrame data with the APIs currently available. If you'd like us to consider adding the necessary functionality, please file an enhancement request using Feedback Assistant. Once you file the request, please post the FB number here. If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?

Rico

WWDR - DTS - Software Engineer

Accepted Answer

There's no supported way for you to extract complete iFrame data with the APIs currently available. If you'd like us to consider adding the necessary functionality, please file an enhancement request using Feedback Assistant. Once you file the request, please post the FB number here. If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?

Rico

WWDR - DTS - Software Engineer

Thanks Rico - FB14961066

HLS authoring - creating Iframe playlist
 
 
Q