2

I'm using AVMutableComposition and AVAssetExportSession to combine a silent MP4 video with a WAV audio file. The basic steps are:

  • Create AVAssets for the video and audio
  • Add tracks to the AVMutableComposition
  • Add each AVAssets first track to a track in the AVMutableComposition
  • Create an AVAssetExportSession using AVAssetExportPresetPassthrough
  • Export asynchronously

Everything works, but the audio sample rate of the resulting video file is always 44.1 kHz, regardless of the sample rate of the WAV file. Is there a way to set the audio sample rate of the video file that's created?

Luke
  • 7,110
  • 6
  • 45
  • 74

0 Answers0