expo-camera, how to rotate camera

Hi,
I use expo-camera in my app. I shoot video in portrait mode. On output I have a video what is displayed correct on iOS but rotated 90 on Android. If I shoot video in landscape mode this video is displayed correct on both platforms. So how I can say the camera to shoot video in landscape mode or how I can rotate a video for Android?

2 Likes

@borfor Did you get it working I have the same issue in expo 37.

No. I think it is a bug with expo camera. They need add a variable of the camera orientation in its code. I don’t know why they answer nothing. I mean it is the official expo forum.
Right now if you need this functionality your may look for another way how to realize it on Android or create an app only for iOS.

I shoot video in landscape mode this video is displayed correct on both platforms. it seems correct. mcdvoice

One solution could be to detect the orientation of the device using the accelerometer and rotate the video accordingly. Alternatively, you can try setting the video orientation explicitly to landscape mode in your camera settings. Another option would be to use a vanity video processing library like FFmpeg to rotate the video on Android after recording. I suggest exploring these options and seeing which works best for your app’s specific needs.