GPUImage2 icon indicating copy to clipboard operation
GPUImage2 copied to clipboard

Recorded video with front camera playing inverted

Open aaasifrz9 opened this issue 8 years ago • 3 comments

Hi @BradLarson,

I have transformed video view to display. Now it's showing properly on the device as like as back camera. But when I recorded it is playing inverted again because we have transformed view only not camera orientation.

Can you please help, how to invert recorded video with proper orientation.

Thanks in advance.

aaasifrz9 avatar Jan 24 '18 07:01 aaasifrz9

I would place the following in the init() function of the Camera before commitConfiguration() is called

if let connections = videoOutput.connections as? [AVCaptureConnection] {
    for connection in connections {
        if(connection.isVideoMirroringSupported) {
            connection.isVideoMirrored = (location == .frontFacing)
        }
    }
}

If you use the MovieOutput for recording, it should come out as you see it on the screen. If you take a photo with AVCapturePhotoOutput, then you will have to manually flip the photo after it is taken.

joshbernfeld avatar Feb 28 '18 23:02 joshbernfeld

Thanks @joshbernfeld

aaasifrz9 avatar Mar 05 '18 05:03 aaasifrz9

Thanks @joshbernfeld

w-i-n-s avatar Nov 08 '18 19:11 w-i-n-s