Hi Rene' On Wed, Oct 30, 2024 at 10:20:09PM +0100, René Doss wrote: > Hallo, > > I have to rotate the camera. I have a optical spectrometer and the spectrum > is mirrored. > > I can not turn the sensor. It is all fixed with glue. > > How can I set the option flip or rotate the picture in the driver? > > > > I collect all my datas of my videodevice. > > > lsusb > > > Bus 003 Device 007: ID 0c68:6464 Sonix Technology Co., Ltd. USB 2.0 Camera > > > lsmod |grep video > uvcvideo 106496 0 > videobuf2_vmalloc 20480 1 uvcvideo > videobuf2_memops 20480 1 videobuf2_vmalloc > videobuf2_v4l2 32768 1 uvcvideo > videobuf2_common 77824 4 > videobuf2_vmalloc,videobuf2_v4l2,uvcvideo,videobuf2_memops > videodev 253952 3 > videobuf2_v4l2,uvcvideo,videobuf2_common > mc 61440 4 > videodev,videobuf2_v4l2,uvcvideo,videobuf2_common > video 61440 0 > > v4l2-ctl --list-devices > USB 2.0 Camera: USB-ZH (usb-0000:00:14.0-5): > /dev/video0 > /dev/video1 You should check if your devices support the hflip control. v4l2-ctl --list-ctrls -d /dev/video0 | grep flip v4l2-ctl --list-ctrls -d /dev/video1 | grep flip If it does you can set the control before starting the streaming and the video stream should be horizontally flipped natively. I've been told the UVC specs do not officially support flips, but some devices implement them through an extension of the specs. If your camera device does not natively support flips, you could probably use gstreamer and pass the video through the 'videoflip' element. https://gstreamer.freedesktop.org/documentation/videofilter/videoflip.html?gi-language=c Hope it helps > > I hope you have some hints. > > Best regards > > > René Doss >