iOS: I need to convert CMSampleBuffer Linear PCM audio to MPEG-4 AAC

Hello,

I am a deaf-blind wheelchair user, and I program in Swift using a braille display.

I’m reaching out for your help on an issue I’ve been struggling to solve.

Basically, when I extract a CMSampleBuffer from an AVAsset of a video, it comes with the Audio Format ID as Linear PCM. However, when I try to pass this CMSampleBuffer to write another video using AVAssetWriter, the video ends up muted.

The audio settings of the output video are configured to MPEG-4 AAC, but the input CMSampleBuffer has the Audio Format ID as Linear PCM.

I would like to request an extension for CMSampleBuffer that converts Linear PCM audio to MPEG-4 AAC.

I’ve searched extensively and couldn’t find anything.

Looking forward to your help.

Thank you.

iOS: I need to convert CMSampleBuffer Linear PCM audio to MPEG-4 AAC
 
 
Q