Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirroring transform rotated upside down (front camera) #250

Open
piv199 opened this issue Jun 15, 2021 · 1 comment
Open

Mirroring transform rotated upside down (front camera) #250

piv199 opened this issue Jun 15, 2021 · 1 comment

Comments

@piv199
Copy link

piv199 commented Jun 15, 2021

Hi there,

Trying to adopt this library for video recording in the project, but face strange issue. As far as I researched the issues section, this problem with mirroring mode for front camera is still actual:

#49
#113

Basically for front camera it doesn't matter where and when you set nextLevel.mirroringMode = .off - it's not mirrored on previewLayer, but the resulting video is mirrored.

Proposed solution was to apply nextLevel.videoConfiguration.transform = .init(scaleX: -1, y: 1) which works fine for apple devices. But what I faced is not all video players understand the resulting video and it gets rotated upside down.
If we look into metadata, the recorded video will have:
Rotation: 180
SIDE DATA LIST

  • Displaymatrix: 00000000: -65536 0 0 00000001: 0 65536 0 00000002: 0 0 1073741824
  • Rotation: -180

If not applying transform, everything is zero and not rotated, but mirrored. Could there be any other solutions to get resulting video without any rotation metadata or mirroring for front camera?

@om-ha
Copy link

om-ha commented Mar 20, 2022

Refer to my comment here #113 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants