Skip to content

vaihkonen/BlackmagicMicroControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blackmagic Camera Control

A Python GUI application for controlling Blackmagic cameras via REST API.

Features

  • Real-time Camera Control: Adjust ISO, shutter speed, aperture, and white balance
  • Recording Control: Start/stop recording with visual feedback
  • Live Status Monitoring: Battery level, storage remaining, and current settings
  • Auto Refresh: Automatic status updates from camera
  • Configurable Settings: Connection, UI, and logging settings
  • Modern GUI: Clean, responsive interface using tkinter

Requirements

  • Python 3.7 or higher
  • tkinter (usually included with Python)
  • Required packages (see requirements.txt)

Installation

  1. Clone or download this repository
  2. Install dependencies:
    pip install -r requirements.txt

Usage

Running the Application

python main.py

Configuration

  1. Camera Connection:

    • Go to File → Settings → Camera tab
    • Set your camera's IP address and port
    • HTTPS Settings:
      • Enable "Use HTTPS" for secure connection (mandatory)
      • Disable "Verify SSL" if using self-signed certificates
    • Authentication (Required):
      • Enter Username/Password (most common), OR
      • Enter API Key if your camera uses token-based auth
      • Try common defaults: admin/admin or blackmagic/blackmagic
    • Configure timeout and retry settings
  2. Interface Settings:

    • Choose UI theme
    • Set window size preferences
    • Configure auto-refresh settings
  3. Logging:

    • Set log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
    • Configure log file rotation

Camera Control

  1. Connect to Camera: Click "Connect" button
  2. Adjust Settings: Use the control panel to change:
    • ISO (100-12800)
    • Shutter Speed (1/24 - 1/200)
    • Aperture (f/1.4 - f/16)
    • White Balance (2500K - 7500K)
  3. Recording: Use the recording panel to start/stop recording
  4. Status Monitoring: View real-time camera status and settings

API Integration

The application now supports HTTPS connections for secure communication with your Blackmagic camera. The application expects a REST API with the following endpoints:

Connection Settings

  • Protocol: HTTPS (mandatory for Blackmagic cameras)
  • Port: 443 (HTTPS default)
  • SSL Verification: Disabled by default for self-signed certificates
  • Authentication: Username/Password or API Key required
  • Host: JuhaninMicro.local (configurable)

Common Authentication

  • Username: admin / Password: admin
  • Username: blackmagic / Password: blackmagic
  • Check your camera manual for model-specific defaults

Status Endpoint

  • GET /status - Get camera status and settings

Recording Endpoints

  • POST /recording/start - Start recording
  • POST /recording/stop - Stop recording

Settings Endpoints

  • PUT /settings/iso - Set ISO value
  • PUT /settings/shutter - Set shutter speed
  • PUT /settings/aperture - Set aperture
  • PUT /settings/whitebalance - Set white balance

Expected Response Format

{
  "success": true,
  "model": "Blackmagic Pocket Cinema Camera 4K",
  "firmware": "7.9.1",
  "serial": "123456789",
  "settings": {
    "iso": 800,
    "shutter_speed": "1/50",
    "aperture": "f/2.8",
    "white_balance": 5600,
    "recording": false,
    "battery_level": 85,
    "storage_remaining": "01:23:45"
  }
}

Project Structure

BlackmagicMicroControl/
├── main.py                    # Application entry point
├── requirements.txt           # Python dependencies
├── config.json               # Configuration file (auto-generated)
├── src/
│   ├── api/
│   │   └── camera_client.py  # REST API client
│   ├── config/
│   │   └── settings.py       # Settings management
│   ├── gui/
│   │   ├── main_window.py    # Main application window
│   │   ├── control_panels.py # Camera control panels
│   │   └── settings_dialog.py # Settings dialog
│   └── utils/
│       └── logger.py         # Logging utilities
├── logs/                     # Log files directory
└── .github/
    └── copilot-instructions.md # Copilot instructions

Development

Adding New Camera Controls

  1. Update CameraSettings class in camera_client.py
  2. Add API methods to BlackmagicAPIClient
  3. Create UI controls in control_panels.py
  4. Update the main window event handlers

Customizing the Interface

  • Modify themes and styles in main_window.py
  • Add new panels by extending the control panels
  • Update settings dialog for new configuration options

Troubleshooting

Connection Issues

  • Verify camera IP address and port in settings
  • Check network connectivity
  • Ensure camera API is running and accessible
  • Review logs in the logs/ directory

Performance Issues

  • Disable auto-refresh if experiencing slowdowns
  • Increase refresh interval in settings
  • Check log level (DEBUG creates more overhead)

GUI Issues

  • Try different themes in Interface settings
  • Adjust window size settings
  • Restart application after making changes

License

This project is provided as-is for educational and development purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages