Arducam 16MP IMX519 - 90 degrees image rotation

Hi all, I have assembled python code from examples to record 10 seconds video, I have tried almost anything to rotate the camera 90 degrees but without any success. Is this possible to be done by software at all or do I have to change the mounting? I have successfully rotated the camera 180 degrees but this is not suitable for my project since the casing is made for the camera to go on the side

This is how my camera is mounted:

import time
import libcamera
from picamera2 import Picamera2
from picamera2.encoders import H264Encoder
from libcamera import controls
picam2 = Picamera2()
video_config = picam2.create_video_configuration()
video_config["transform"] = libcamera.Transform(hflip=0, vflip=1)
picam2.set_controls({"AfMode": controls.AfModeEnum.Continuous})
encoder = H264Encoder(10000000)

picam2.start_recording(encoder, '/home/admin/FTP/Images/test.h264')

I am using Raspberry Pi Zero W, connected via SSH and FTP to download the video and images I create.
Thank you :slight_smile:

Did you ever figure out a solution?

Nope… I did change my design and turn it physically…