Git Product home page Git Product logo

cameractrls's Introduction

cameractrls

Camera controls for Linux

It's a standalone Python CLI and GUI (GTK3, GTK4, TK) and camera Viewer (SDL) to set the camera controls in Linux. It can set the V4L2 controls and it is extendable with the non standard controls. Currently it has a Logitech extension (LED mode, LED frequency, BRIO FoV, relative Pan/Tilt), Kiyo Pro extension (HDR, HDR mode, FoV, AF mode, Save), Systemd extension (Save and restore controls with Systemd path+service).

Install

Download on Flathub Get it from the Snap Store

On Arch pacman -S cameractrls

Git Install method

Install the dependencies via apt:

sudo apt install git libsdl2-2.0-0 libturbojpeg

or via dnf:

sudo dnf install git SDL2 turbojpeg

Clone the repo

git clone https://github.com/soyersoyer/cameractrls.git
cd cameractrls

cameractrlsgtk

GTK3 GUI for the Camera controls

cameractrls launcher

cameractrls crop screen cameractrls image screen cameractrls exposure screen cameractrls advanced screen cameractrls capture screen

GTK3 GUI install

Add desktop file to the launcher

desktop-file-install --dir="$HOME/.local/share/applications" \
--set-key=Exec --set-value="$PWD/cameractrlsgtk.py" \
--set-key=Path --set-value="$PWD" \
--set-key=Icon --set-value="$PWD/pkg/hu.irl.cameractrls.svg" \
pkg/hu.irl.cameractrls.desktop

Run from the launcher or from the shell

./cameractrlsgtk.py

GTK4 GUI install (experimental)

Add desktop file to the launcher

desktop-file-install --dir="$HOME/.local/share/applications" \
--set-key=Exec --set-value="$PWD/cameractrlsgtk4.py" \
--set-key=Path --set-value="$PWD" \
--set-key=Icon --set-value="$PWD/pkg/hu.irl.cameractrls.svg" \
pkg/hu.irl.cameractrls.desktop

Run from the launcher or from the shell

./cameractrlsgtk4.py

cameractrlstk

TKinter GUI for the Camera controls

If you like old looking user interfaces.

cameractrls tk screen

TK GUI install

Install the python3 tkinter dependency via apt:

sudo apt install python3-tk

or via dnf:

sudo dnf install python3-tkinter

Add desktop file to the launcher

desktop-file-install --dir="$HOME/.local/share/applications" \
--set-key=Exec --set-value="$PWD/cameractrlstk.py" \
--set-key=Path --set-value="$PWD" \
--set-key=Icon --set-value="$PWD/pkg/hu.irl.cameractrls.svg" \
pkg/hu.irl.cameractrls.desktop

Run from the launcher or from the shell

./cameractrlstk.py

cameractrls.py

The CLI.

Run the cameractrls

./cameractrls.py
usage: ./cameractrls.py [--help] [-d DEVICE] [--list] [-c CONTROLS]

optional arguments:
  -h, --help         show this help message and exit
  -d DEVICE          use DEVICE, default /dev/video0
  -l, --list         list the controls and values
  -L, --list-devices list capture devices
  -c CONTROLS        set CONTROLS (eg.: hdr=on,fov=wide)

example:
  ./cameractrls.py -c brightness=128,kiyo_pro_hdr=on,kiyo_pro_fov=wide

cameraview.py

The camera viewer.

./cameraview.py -h
usage: ./cameraview.py [--help] [-d DEVICE] [-r ANGLE] [-m FLIP] [-c COLORMAP]

optional arguments:
  -h, --help         show this help message and exit
  -d DEVICE          use DEVICE, default /dev/video0
  -r ANGLE           rotate the image by ANGLE, default 0
  -m FLIP            mirror the image by FLIP, default no, (no, h, v, hv)
  -c COLORMAP        set colormap for GREY streams, default grayscale
                    (grayscale, inferno, viridis, ironblack, rainbow)

example:
  ./cameraview.py -d /dev/video2

shortcuts:
  f: toggle fullscreen
  r: ANGLE +90 (shift+r -90)
  m: FLIP next (shift+m prev)
  c: COLORMAP next (shift+c prev)

Updating the cameractrls

git pull

Deleting the cameractrls

Disable, stop and delete the systemd paths, services:

cd ~/.config/systemd/user
systemctl --user disable --now cameractrls-*
rm cameractrls-*

Remove launcher shortcut

rm ~/.local/share/applications/hu.irl.cameractrls.desktop

Delete the cameractrls:

rm -rf cameractrls

cameractrls's People

Contributors

soyersoyer avatar monkatraz avatar chrishoage avatar lackhove avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.