title: Can't get ffmpeg to generate an MP4 file on iOS
body: <p>I'm having serious problems trying to get an iOS app to create an MP4 file from an RTSP stream using ffmpeg.</p>
  
  <p>I can open the stream, decode it, show the video on screen and play the live audio without any issues. The problems arise when I try to output the AV stream to a file.</p>
  
  <p>If I ask ffmpeg to create an MP4 file, it fails, informing me that the audio codec in the stream is incompatible with MP4 files. If I attempt to transcode the audio into acc, then ffmpeg lets me continue, but during the file output I get multiple "aac bitstream error" messages, and the recording is silent.</p>
  
  <p>I also tried having ffmpeg create a mov (Quicktime) file instead of MP4. If I do that, it seems to work: I get a mov file that plays back with audio. That being done, I tried to transcode the mov file to mp4 using AVAssetExportSession. But this doesn't work: it reports that the decode failed.</p>
  
  <p>I'm not sure what to try next.</p>