ARVideoKit icon indicating copy to clipboard operation
ARVideoKit copied to clipboard

Orientation & dimensions of Recordings on iPad are wrong

Open gheatley opened this issue 7 years ago • 7 comments

Hi Ahmed, ARVideoKit is amazing, I can't live without it now. Please help!

I am finding a major issue when trying to record on iPad.

When recording in portrait, orientations appear correct. But the resultant video is squashed horizintally and is not iPad screen dimensions.

If you try to record in other orientations the dimensions are squashed as with portrait, but also the recordings are saved at the wrong orientaion. And further to this, the orientation of the AR Content in the video does not match the orientation of the video content!

Testing on an iPad Pro 12.9" running iOS 12.

My settings:

    arVideoKitRecorder?.onlyRenderWhileRecording = true
    arVideoKitRecorder?.contentMode = .aspectFill //ALSO TRIED .auto
    arVideoKitRecorder?.enableAdjustEnvironmentLighting = true
    arVideoKitRecorder?.inputViewOrientations = [.landscapeLeft, .landscapeRight, .portrait]
    arVideoKitRecorder?.deleteCacheWhenExported = true

I've also tried setting

func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
return ViewAR.orientation
}

gheatley avatar Oct 03 '18 14:10 gheatley

resultant video is squashed horizontally on iphone X max running ios 12.1 as well.

seandmccue avatar Dec 06 '18 07:12 seandmccue

@AFathi Any chance a fix for this is in the works?

gheatley avatar Feb 07 '19 09:02 gheatley

@gheatley @seandmccue, I unfortunately don't have access to neither an iPad or iPhone X. Can you share with me screenshots of the issue.

Thanks.

AFathi avatar Feb 07 '19 17:02 AFathi

@AFathi Ok, I'm hoping this is what you need to put this bug away once & for all..

After doing some investigating with an iPad Pro 12.9" using the latest ARVideoKit commit (b05e744), there are two separate issues going on:

1. When you first use ARVideoKit after a fresh app launch, the FIRST photo/video/gif/live photo you capture in ANY device orientation comes-in in Portrait orientation & is squashed horizontally. It's like there's a fixed portrait aspect ratio getting applied for the first capture you take. This issue then disappears for any subsequent capture for the app session's lifespan.

Examples Portrait & Device Landscape Left recordings, each 1st time after fresh app launch:

iPadPro_FirstCapture.zip

2. Capturing in any orientation other than Portrait. The video layer of the resulting capture, gets rotated correctly, however the AR layer appears to remain locked in its original portrait orientation. I have tested this with both Landscape & Portrait-Upside-Down device orientations.

Examples Portrait, Device Landscape Left & Portrait Upside-Down recordings, each one is the subsequent capture after getting the first erroneous first-launch capture out of the way:

iPadPro_SubsequentCapture.zip

All of the above examples I have provided are of the video record mode, however the two issues apply to all of the capture types: video/still photo/gif/live photo.

PS. As a side-issue, you can see the captured video is chuggy/jumpy. Any advice on improving/fixing this too would be appreciated.

Good luck & I hope this helps.

gheatley avatar Feb 12 '19 09:02 gheatley

I also have the same problem with aps running in landscape. The video comes out in portrait with the video rotated and the scene the right orientation but squished to match the wrong video aspect ratio.

I would dearly love a work around. Unfortunately running the app in portrait is not an option for me.

Cheers

kallipigous avatar Feb 14 '19 03:02 kallipigous

Same issue on iPhone Xr portrait

Emanuele-Fortunati avatar Jul 16 '19 16:07 Emanuele-Fortunati

I am experiencing the same issue on iPhone XS. Was anybody able to resolve this issue?

nazdream avatar Feb 21 '22 07:02 nazdream