File of recorded movie is too large.
The movies, that had been written with GPUImageMovieWriter are too large. They are 2x and more large than ios camera written movies. And settings of video quality and movie frame size do not affect the movie file size. Why? Am I doing something wrong?
I'm using next way to initialize GPUImageMovieWriter:
self.movieWriter = [[[GPUImageMovieWriter alloc] initWithMovieURL:self.videoURL size:movieSize] autorelease];
And next way for GPUImageVideoCamera:
self.videoCamera = [[[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPresetLow cameraPosition:AVCaptureDevicePositionBack] autorelease];
What are you setting movieSize to?
I have tried 640x480, 480x640, 320x480, 480x320.
On Mon, Aug 6, 2012 at 9:23 PM, Tom Corwine < [email protected]
wrote:
What are you setting movieSize to?
Reply to this email directly or view it on GitHub: https://github.com/BradLarson/GPUImage/issues/351#issuecomment-7531233
Have you tried adjusting the compression parameters of the GPUImageMovieWriter? It's possible that I'm not using optimal settings in my defaults, as I didn't spend a lot of time toying with those.
It's on my list to find a more optimal settings to work with.
@2energycell , you can find in - (void)initializeMovieWithOutputSettings:(NSMutableDictionary *)outputSettings; of GPUImageMovieWritersome settings that Brad was playing with. The bit rate is 1 factor that is causing the higher file size.
Thanks a lot, this is exactly what I wanted to adjust.
Please report back what settings you eventually use :)
I have uncommented creation of videoCleanApertureSettings, videoAspectRatioSettings, compressionProperties and have seted the AVVideoAverageBitRateKey to 500000 value in "GPUImageMovieWriter.m". And the file size now are significantly smaller.
I have one more question. If I want ONLY to compress some movie with GPUImage. What is the best way? At the moment I'm passing the movie through GPUImageBrightnessFilter with brightness = 0.0f. Is there some approach not to use "fake" filter?
If you just want to recompress a movie, you don't need this framework for it. Just use AV Foundation to handle the movie and it will be a lot faster.
But if I want to use GPUImage framework, what can I do to compress the movie and not to use "fake" filter?