Search code examples
iosaudioavfoundationavcomposition

Loosing audio after processing in AVComposition


I am using AVMutableComposition to combine two pieces of media (one video one graphic overlay). The video was captured using UIImagePickerController.

Video records fine and audio is there when previewing the recording.

Process with Composition, and export session. Video saves fine (with overlay), but no audio.

iOS7.

I'm not specifically doing anything with audio in the composition. I just assumed it would "come along" with the video file. Is that accurate, or do I need to create a dedicated audio track in the composition?

_mike


Solution

  • After much researching, I found the solution to this in another Stackoverflow question (and answer).

    iOS AVFoundation Export Session is missing audio.

    Many thanks to that user.