First of all, I would like to congratulate Brad on his amazing work on GPUImage.
I am trying to apply a rotation to this video file and get the mpeg4 file (AVFileTypeMPEG4) as output.
In doing so, I get the following message:
* - [AVAssetWriterInput appendSampleBuffer:] The input buffer must be in uncompressed format when outputSettings is not nil
This problem occurs when using the following init method for GPUImageMovieWriter with the file type set to AVFileTypeMPEG4:
- (id)initWithMovieURL:(NSURL *)newMovieURL size:(CGSize)newSize fileType:(NSString *)newFileType outputSettings:(NSMutableDictionary *)outputSettings;
However, it works for another init method that actually generates a Quicktime movie (AVFileTypeQuickTimeMovie is set by default).
- (id)initWithMovieURL:(NSURL *)newMovieURL size:(CGSize)newSize;
Please someone tell me if GPUImageWriter can now output the mpeg4 movie file.
After many studies and attempts, you can see below one of several codes that I have made.
movieFile = [[GPUImageMovie alloc] initWithURL:inputUrl]; movieFilter = [[GPUImageBrightnessFilter alloc] init]; [movieFilter setInputRotation:videoRotationMode atIndex:0]; [movieFile addTarget:movieFilter]; unlink([[outputUrl path] UTF8String]);
Thank you in advance
PS: I am using iOS6
source share