Camera settings and control app working with V4L subsystem.
  • Go 99.8%
  • Shell 0.2%
Find a file
Alexey Skobkin 8ddd65f29e
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
docs: add user-facing README with screenshots
Co-Authored-By: GLM-5.3 Flash <noreply@z.ai>
2026-10-19 15:48:20 +04:00
.woodpecker ci: install Wayland and xkbcommon headers for the glfw package 2026-10-18 23:29:36 +04:00
assets ci: baseline Woodpecker pipeline, strict golangci config, track UI concept asset 2026-09-13 23:47:43 +03:00
cmd/v4lens build: link-time buildinfo with version in title, log and metadata 2026-10-18 22:06:27 +04:00
docs docs: add user-facing README with screenshots 2026-10-19 15:48:20 +04:00
internal fix(ui): size the profile apply-result dialog to its content 2026-10-19 15:48:10 +04:00
packaging ui: themed tray icon and desktop entry for native-Wayland windows 2026-10-18 18:30:54 +04:00
.gitignore ci: GoReleaser release publishing to Forgejo on tags 2026-10-18 20:56:26 +04:00
.golangci.yml ci: baseline Woodpecker pipeline, strict golangci config, track UI concept asset 2026-09-13 23:47:43 +03:00
.goreleaser.yml build: link-time buildinfo with version in title, log and metadata 2026-10-18 22:06:27 +04:00
AGENTS.md docs: remove completed MVP execution documents 2026-10-19 15:10:20 +04:00
go.mod ui: main window, tabs, control renderers, profiles, preferences 2026-09-14 01:55:41 +03:00
go.sum ui: main window, tabs, control renderers, profiles, preferences 2026-09-14 01:55:41 +03:00
LICENSE build: module bootstrap, XDG paths, logging, config 2026-09-13 23:57:34 +03:00
README.md docs: add user-facing README with screenshots 2026-10-19 15:48:20 +04:00

V4Lens

A small Linux desktop utility for V4L2 cameras and capture devices. V4Lens makes common camera controls easier to use than qv4l2 while preserving access to unfamiliar and vendor-specific controls instead of hiding them.

It runs as a resident tray application: your camera settings and profiles stay available in the background, and launching it again just raises the existing window.

Main window (Format tab) Preview
Main window with the Format tab open Preview window

Features

  • Live control changes — sliders, checkboxes and menus write to the device immediately; integer sliders have an exact-value field, and rapid dragging is coalesced to avoid flooding the device.
  • Nothing hidden — known controls are semantically grouped (Image, PTZ, Format), unknown or vendor-specific ones still appear as generic controls; unsupported compound controls are marked as such.
  • Profiles — saved as YAML per physical device and bound to stable device identity, so they survive replugs, reboots and /dev/videoN renumbering. Selecting a profile applies it immediately; if some values fail (e.g. busy controls), everything that applied successfully stays applied and you get a structured partial result.
  • Dirty-state indicator — the profile shows visibly when actual device state drifts from the saved profile.
  • Format tab — enumerates real device capabilities (input, pixel format, resolution, FPS) with only valid combinations offered; format changes are staged until you apply them.
  • Preview — a separate window supporting MJPEG and common YUV formats (YUYV, UYVY, NV12, NV21, I420). Unsupported formats disable only the preview, never control or profile application. If a format change requires restarting the stream, the window stays open with the last frame.
  • Autostart — optional start-with-system (tray only) and apply-default-profile-on-start, enabled from the tray or Preferences.

Requirements

  • Linux with V4L2 (/dev/video*)
  • Wayland or X11 session
  • Standard V4L2 capture devices, including UVC webcams

Install

Download a release archive and checksum from the releases page, verify with checksums.txt, and extract the v4lens binary.

From source

Building requires Go 1.27.1+, a C toolchain, pkg-config, and development headers for OpenGL/Mesa, X11 (x11, xrandr, xinerama, xcursor, xi, xxf86vm), Wayland and xkbcommon:

go build -trimpath -o v4lens ./cmd/v4lens

Desktop integration

On native Wayland sessions the compositor takes the window/taskbar icon from a desktop entry, so install one for the current user:

packaging/install-user.sh

This also enables launcher integration under X11. It is optional otherwise.

Usage

Run v4lens — the application appears in the system tray and opens the main window. Closing the main window hides it; the app keeps running in the tray until you use its Quit action.

v4lens --background   # start resident without opening the main window

Only one instance runs per user; a second launch activates the existing one.

Files

Purpose Location
Preferences $XDG_CONFIG_HOME/v4lens/
Profiles $XDG_CONFIG_HOME/v4lens/profiles/
Logs $XDG_STATE_HOME/v4lens/v4lens.log
Autostart entry $XDG_CONFIG_HOME/autostart/v4lens.desktop

Development

gofmt -w . && go test ./... && go vet ./... && golangci-lint run ./...

Integration tests that need v4l2loopback or real camera hardware live behind explicit build tags, so baseline CI and development require no physical camera. Product, architecture and UI specs, plus the decision log, are in docs/.

License

MIT