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
❓ How to prevent the flip/mirror? #966
Comments
Hey, what do you mean with "they don't do the flip"? A selfie with VisionCamera looks exactly like a selfie on Snapchat, no? |
Actually no; just using the vision camera example, we can clearly see that from the time we press the button capture, and move to the mediapage, the mediapage displays a "mirrored" image of the one I saw in real time from the camera page. This flip is also mentioned here (#130) , although my issue is not the same. (just try taking a photo with your hands raised at the left of your face, from camerapage to media page you will see your hands at the other side of the photo) |
can you please share a screen recording? Are you talking about Android or iOS? |
It's happening on android, haven't tested iOS yet. |
Hi @pierroo , did you got any solution ? On recording video from front camera. |
Unfortunately none, @mrousavy if you happen to pass by did you have the chance to look into it ? |
No, I haven't. Does this happen on iOS as well? |
@mrousavy i am using vision-camera for android only. So for me issue is on android. |
Surprisingly no, it does not. |
Okay yea I think I recall it being an Android issue / CameraX limitation... |
Thank you for your additional input. |
I currently don't have enough free time to fix this issue, but I am also pretty sure that CameraX does not support this out of the box so this comes with a performance penalty. |
I am also able to reproduce this issue on android. Some observations:
Recording of the issue (Please download and play):IMG_8311.MOVExample:
Questions:
Version:
Code:(Note: Some additional functionalities are also there in the code)
|
@mrousavy I can give it a try to solve this if you could provide some hints. |
Any updates on this ? |
Here's the code for flipping if that helps anyone: react-native-vision-camera/android/src/main/java/com/mrousavy/camera/CameraView+TakePhoto.kt Lines 90 to 91 in de41f8b
and the save func: react-native-vision-camera/android/src/main/java/com/mrousavy/camera/utils/ImageProxy.save.kt Lines 92 to 97 in de41f8b
|
@mrousavy thanks for the quick answer !! Thanks again |
Same problem here with version 2.14.0 |
@mrousavy if you look at the iOS camera app, front camera video displays it mirrored on screen, but output video is horizontally flipped. Otherwise, things like words will be back to front. |
This problem occurs on iOS too (front camera only). |
I've implemented an easy solution for ios: CameraView+RecordVideo
And in RecordingSession:
|
So I stumbled upon this problem personally where one android device didn't mirror and another one did. An easy (maybe ugly?) solution was to replace:
Hope this helps someone out there with the same issue as me. |
Did anyone found a solution for this issue? |
Any solution ? |
Question
It feels weird when in selfie mode the resulting image is mirrored / flipped.
When you check the main app (snapchat / tiktok), they don't do the flip, to not distract / confuse the user.
Is there any way to cancel the flip?
What I tried
No response
VisionCamera Version
^2.13.1
Additional information
The text was updated successfully, but these errors were encountered: