Skip to content

oe7set/CamRenamer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

22 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฅ CamRenamer - USB Camera Manager

A Windows application for renaming USB cameras in the Registry for better identification in streaming software like OBS.

Download CamRenamer

๐Ÿ“‹ Overview

CamRenamer allows you to easily rename USB cameras by changing their names directly in the Windows Registry. This is particularly useful for:

  • Streaming: Unique camera names in OBS, XSplit, and other applications
  • Multi-Camera Setups: Better organization of multiple cameras
  • Professional Production: Clear identification of cameras by location/function

โœจ Features

  • ๐Ÿ” Automatic Camera Detection: Finds all connected USB cameras
  • โœ๏ธ Easy Renaming: Intuitive user interface for changing names
  • ๐Ÿ”’ Registry Integration: Direct changes in the Windows Registry
  • ๐ŸŒ Unicode Support: Full support for international characters
  • ๐ŸŽจ Modern Design: Dark theme with user-friendly interface
  • โšก PowerShell Fallback: Alternative method for registry issues
  • ๐Ÿ›ก๏ธ Error Handling: Robust handling of permission errors

๐Ÿ“ธ Screenshots

Main Window

Screenshot

๐Ÿš€ Installation

Prerequisites

  • Windows 10/11 (required for Registry access)
  • Python 3.12+ (for development)
  • Administrator rights (for Registry changes)

Option 1: Executable File (Recommended)

  1. Download the latest version from Releases
  2. Extract the ZIP file
  3. Run CamRenamer.exe as Administrator

Option 2: With uv (Development)

# Clone repository
git clone https://github.com/oe7set/camrenamer.git
cd camrenamer

# Install dependencies
uv sync

# Start application
uv run python src/main.py

Option 3: With pip

# Clone repository
git clone https://github.com/oe7set/camrenamer.git
cd camrenamer

# Create virtual environment
python -m venv venv
venv\Scripts\activate

# Install dependencies
pip install -e .[dev]

# Start application
python src/main.py

๐ŸŽฎ Usage

Step-by-Step Guide

  1. Run as Administrator: Right-click on the application โ†’ "Run as administrator"

  2. Scan Cameras:

    • Click on "๐Ÿ”„ Scan Cameras" or press F5
    • All connected USB cameras will be listed
  3. Select Camera:

    • Click on a row in the table
    • The current name will be displayed in the input field
  4. Rename:

    • Enter the new name
    • Click on "โœ… Rename" or press Enter
    • Confirm the change
  5. Done:

    • The change is immediately saved in the Registry
    • A restart may be required for full effectiveness

Keyboard Shortcuts

Keyboard Combination Action
F5 Refresh camera list
Ctrl+L Clear table
Ctrl+Q Exit application
F1 Show about dialog
Enter Rename selected camera

๐Ÿ”ง Development

Project Setup

# Clone repository
git clone https://github.com/oe7set/camrenamer.git
cd camrenamer

# Development environment with uv
uv sync --group dev

# Or with pip
pip install -e .[dev]

Running Tests

# All tests
uv run pytest

# With Coverage
uv run pytest --cov=src --cov-report=html

# Unit tests only
uv run pytest -m "unit"

# Integration tests only
uv run pytest -m "integration"

Code Quality

# Linting with Ruff
uv run ruff check src/

# Check formatting
uv run ruff format --check src/

# Type checking with mypy
uv run mypy src/

Create Build

# Executable with PyInstaller
uv run pyinstaller --windowed --onefile --icon=src\img\icon.ico --name CamRenamer src/main.py

# Or with auto-py-to-exe (GUI)
uv run auto-py-to-exe

๐Ÿ“ Project Structure

CamRenamer/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ img/   
โ”‚   โ”‚   โ”œโ”€โ”€ icon.ico
โ”‚   |   โ””โ”€โ”€ icon.png
โ”‚   โ”œโ”€โ”€ main.py           
โ”‚   โ”œโ”€โ”€ resources.py       #auto gen ps1"cd src;pyside6-rcc resources.qrc -o resources.py"     
โ”‚   โ””โ”€โ”€ resources.qrc
โ”œโ”€โ”€ pyproject.toml        
โ”œโ”€โ”€ uv.lock
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ README.md

๐Ÿ› ๏ธ Technical Details

Architecture

  • GUI Framework: PySide6 (Qt6)
  • Threading: QThread for asynchronous operations
  • Registry Access: winreg + PowerShell Fallback
  • Camera Detection: PowerShell Get-PnpDevice
  • Design: Dark Theme with modern UI

Registry Paths

The application searches in the following Registry paths:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\{DeviceID}
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{GUID}

Unicode Support

  • UTF-8 Encoding for PowerShell output
  • Error handling for invalid characters
  • Support for international camera names

โš ๏ธ Security Notes

  • Administrator rights required: Registry changes require elevated permissions
  • Backup recommended: Create a Registry backup before major changes
  • Antivirus: Some antivirus programs may block Registry access

๐Ÿ› Known Issues

Issue: "Access Denied"

Solution: Run application as Administrator

Issue: Changes not visible

Solution: Restart system or reconnect camera

Issue: PowerShell Error

Solution: Check PowerShell execution policy:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

๐Ÿ“ž Support

"Buy Me A Coffee" ko-fi

๐Ÿค Contributing

Contributions are welcome! Please note:

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Branch pushen (git push origin feature/amazing-feature)
  5. Create Pull Request

Code Guidelines

  • Use Python 3.12+
  • Follow PEP 8 style (automatic with Ruff)
  • Write tests for new features
  • Docstrings for public APIs

๐Ÿ“œ License

This project is licensed under the MIT License. See LICENSE for details.

๐Ÿ™ Acknowledgments

  • Qt/PySide6: For the excellent GUI framework
  • Python Community: For the great tools and libraries
  • OBS Community: For the inspiration for this tool

๐Ÿ“Š Statistics

GitHub release (latest by date) GitHub Python Platform


Developed with โค๏ธ by Erwin Spitaler OE7SET

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages