Mikael
Mikael

Reputation: 3612

GPUImage wrong rotation of video

I record video using AVCaptureSession. After seeing the recorded video file (from iTunes) it always has the correct rotation (landscape right and landscape left). However, when I show the video using GPUImageView and GPUImageMovie, it will be upside down for landscape left.

Any ideas would be extremely helpful!

UPDATE

Now I noticed that when I take a screenshot from the video using AVAssetImageGenerator, that is also upside down.

Upvotes: 2

Views: 2437

Answers (1)

Mikael
Mikael

Reputation: 3612

Solved it by setting the input rotation:

if ([[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationLandscapeLeft)
{
    [currentFilter setInputRotation:kGPUImageRotate180 atIndex:0];
}

Upvotes: 4

Related Questions