Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8037

Camera board • Re: gst libcamerasrc v4l2 loop back flip issue

$
0
0
🧵 [Help] CSI Camera via libcamera-spa Appears Flipped in Zoom/Teams — How to Invert Stream in PipeWire?
Board: Raspberry Pi 5
Camera: Official Raspberry Pi CSI Camera (v2 or v3)
OS: Raspberry Pi OS (Bookworm, Wayland)
Stack: libcamera + PipeWire (via libcamera-spa)
Apps: Zoom, Google Meet, Microsoft Teams (Flatpak/browser)

❓ Problem
When using the CSI camera with video conferencing applications (Zoom, Meet, Teams), the video stream appears mirrored/flipped horizontally.

This flipping only occurs when the camera is accessed via PipeWire, which is the default camera backend in Wayland environments (especially for Flatpak apps and browsers).

The video orientation is correct when using native tools like libcamera-vid or libcamera-still.

🔍 What I’ve Tried
To work around the flipped image, I previously used a GStreamer pipeline with videoflip and routed the corrected stream through v4l2loopback, like so:

gst-launch-1.0 libcamerasrc ! videoflip method=horizontal-flip ! v4l2sink device=/dev/video10
I then configured Zoom to use /dev/video10 (the virtual webcam). This works, but it's not ideal due to performance overhead, system complexity, and lack of auto-start integration.

⚙️ Background on Stack
Since Raspberry Pi OS (Bookworm), the camera stack works as follows:

libcamera handles CSI cameras and replaces older V4L2 camera stacks.

PipeWire handles multimedia (audio + video), and exposes cameras to user applications.

libcamera-spa is a PipeWire plugin that bridges libcamera devices into the PipeWire graph as virtual video sources.

This means apps like Zoom or Firefox don't access /dev/video* directly anymore, but instead use the virtual PipeWire camera node backed by libcamera-spa.

❓ My Current Question
Is there a way to apply a horizontal (or vertical) flip directly to the CSI camera stream used by PipeWire via libcamera-spa, without needing an external GStreamer/v4l2loopback pipeline?

In particular:

Can libcamera-spa be configured to flip or rotate the video stream?

Can libcamera sensor orientation or tuning files help set the correct default orientation?

Is there a way to use a filter-chain module in PipeWire to flip the video stream before it reaches the application?

Or is there a native PipeWire option (e.g. stream transform or metadata) that can correct this?

Statistics: Posted by jana007 — Tue Jun 10, 2025 8:56 am



Viewing all articles
Browse latest Browse all 8037

Trending Articles