BradLarson / GPUImage

An open source iOS framework for GPU-based image and video processing
http://www.sunsetlakesoftware.com/2012/02/12/introducing-gpuimage-framework
BSD 3-Clause "New" or "Revised" License
20.24k stars 4.61k forks source link

Video Saved Wrong Rotation #2353

Open tugberkgunver opened 8 years ago

tugberkgunver commented 8 years ago

Hi i am using UIInterfaceOrientationLandscapeRight yes its working (First image) after saved library(Second image) wrong rotation how to solve this? Please help me

videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPreset1920x1080 cameraPosition:AVCaptureDevicePositionBack];

videoCamera.outputImageOrientation = UIInterfaceOrientationLandscapeRight;

img_0651 img_0653

BradLarson commented 8 years ago

Please stop "bumping" this issue with repeated posts. Each one is firing off new notifications, and they're starting to annoy me.

tugberkgunver commented 8 years ago

Hi i solved problem.Like this.

GPUImagePicture *inputImage = [[GPUImagePicture alloc] initWithImage:[UIImage imageNamed:self.imagePath]];

    videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPreset1920x1080 cameraPosition:AVCaptureDevicePositionBack];

videoCamera.outputImageOrientation = UIInterfaceOrientationLandscapeRight;

videoCamera.horizontallyMirrorFrontFacingCamera = NO;
videoCamera.horizontallyMirrorRearFacingCamera = NO;

And after movieWriter = [[GPUImageMovieWriter alloc] initWithMovieURL:movieURL size:CGSizeMake(640.0, 480.0)];

This width and height rotation UIInterfaceOrientationLandscapeRight output for my library.