Skip to content

danielrosehill/Logitech-C925E-Boot-Configurator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Webcam Configuration Script

Automatically configure Logitech C925e webcam to 1080p @ 24fps MJPEG on system boot.

Overview

This repository contains a systemd service and bash script that ensures your Logitech C925e webcam always starts with consistent settings:

  • Resolution: 1920x1080 (1080p)
  • Framerate: 24 fps
  • Format: MJPEG (Motion-JPEG)

Why This Exists

When using webcams for recording (especially in OBS Studio), it's important to have consistent, predictable settings. This script ensures your webcam is always configured the same way, so you know exactly what framerate and quality you're recording at without having to check settings each time.

Files

  • webcam-1080p-24fps.sh - The configuration script
  • webcam-config.service - Systemd service file for automatic startup

Installation

1. Install the script

sudo cp webcam-1080p-24fps.sh /usr/local/bin/
sudo chmod +x /usr/local/bin/webcam-1080p-24fps.sh

Or place it in your preferred scripts directory (e.g., ~/scripts/system/).

2. Install the systemd service

sudo cp webcam-config.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable webcam-config.service

3. Start the service (or reboot)

sudo systemctl start webcam-config.service

Or simply reboot your system - the service will run automatically.

Manual Usage

You can run the script manually at any time:

./webcam-1080p-24fps.sh

Note: The webcam must not be in use by any application when running the script.

Verification

Check that the service is running:

systemctl status webcam-config.service

View current webcam settings:

v4l2-ctl --device=/dev/video0 --get-fmt-video
v4l2-ctl --device=/dev/video0 --get-parm

Requirements

  • Linux system with systemd
  • v4l2-ctl utility (usually in v4l-utils package)
  • Logitech C925e webcam (or compatible device that supports 1080p @ 24fps MJPEG)

Customization

To change the settings, edit webcam-1080p-24fps.sh and modify these variables:

WEBCAM_DEVICE="/dev/video0"  # Your webcam device
RESOLUTION="1920x1080"        # Desired resolution
FPS="24"                      # Desired framerate
FORMAT="MJPEG"                # Video format

Check available formats and framerates for your webcam:

v4l2-ctl --device=/dev/video0 --list-formats-ext

Troubleshooting

"Device or resource busy" error

The webcam is currently in use by another application (e.g., OBS, browser). Close all applications using the webcam and try again.

Service fails to start

Check the service logs:

sudo journalctl -u webcam-config.service -n 50

Wrong device

If your webcam is not /dev/video0, find the correct device:

v4l2-ctl --list-devices

Then update the WEBCAM_DEVICE variable in the script.

License

MIT License - Feel free to use and modify as needed.

Author

Created by Daniel with assistance from Claude Code.

About

v4l2 configuration script for Logitech C925e webcam - sets 1080p @ 24fps MJPEG on boot

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages