title: Does GPUImageMovieWriter support AVFileTypeMPEG4 with audio?
body: <p>GPUImage has allowed me to manipulate my video files incredibly efficiently in just the way I desire, but only if I use <code>AVFileTypeQuickTimeMovie</code> when I specify the <code>fileType</code> of the <code>GPUImageMovieWriter</code>.</p>
  
  <p>My application needs to interact with Android devices which are incapable of playing quicktime movie files, so I attempted to change my code to encode as follows:</p>
  
  <pre><code>movieWriter = [[GPUImageMovieWriter alloc] initWithMovieURL:movieURL size:CGSizeMake([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height) 
                fileType:AVFileTypeMPEG4 outputSettings:videoCompressionSettings];
  </code></pre>
  
  <p>I am passing the audio through as Brad shows in his example for the movie writer, but my app crashes at the following line relating to audio in the GPUImageMovieWriter.m file within the <code>setHasAudioTrack</code> function:</p>
  
  <pre><code>[assetWriter addInput:assetWriterAudioInput];
  </code></pre>
  
  <p>I find that if I remove audio completely GPUImage can output an MPEG4 file that plays well with Android. I tried not passing the audio through but subsequently faced crashing in the <code>[assetWriterAudioInput appendSampleBuffer:audioBuffer];</code> line of the <code>processAudioBuffer</code> method.</p>
  
  <p>I don't want to mess around too much with Brad's code because it has worked so well for me thus far, so I turn to the community to see if anyone has had similar issues and can offer suggestions. I am happy to provide more code, but I am not sure what is relevant and what is not.</p>
  
  <p>Thanks in advance.</p>