CamGo — Local Camera Control Interface

USB Cameras • Recording • Snapshots • Explicit Control

CamGo is a lightweight, single-file Go application designed to provide direct, local control over USB and built-in camera devices through a clean web-based interface. The application is intentionally conservative in its behavior, remaining fully idle until the user explicitly initiates monitoring, snapshot capture, or recording.

Rather than acting as a camera driver, CamGo functions as a process coordinator and control surface. All camera interaction is delegated to FFmpeg, while CamGo manages lifecycle, state, and presentation with predictable and observable behavior.

Version Information

Application: CamGo
Version: 1.0.0
Author: K0NxT3D
Language: Go (single-file build)
Runtime: Localhost only

Core Capabilities

🎥 Device Enumeration & Selection

  • Automatic discovery of available /dev/video* devices
  • Clear separation between built-in and USB cameras
  • Runtime device switching when idle
  • No automatic camera activation on page load

📸 Snapshot Capture

  • Single-frame image capture on demand
  • Immediate device release after capture
  • Timestamped JPEG output to disk
  • Fails safely if the camera is busy

🎬 Video Recording

  • Explicit start/stop recording control
  • Single FFmpeg process per recording session
  • Exclusive device locking during recording
  • Real-time duration tracking
  • Clean shutdown with finalized output files

🖥 Optional Live Monitoring

  • Snapshot-based live preview (polling model)
  • No continuous device lock
  • Cannot interfere with recording
  • Designed for clarity, not bandwidth efficiency

Runtime Behavior Model

Idle State

On startup, CamGo performs device discovery only. No camera hardware is engaged and no background processes are launched until the user takes action.

Monitoring State

Live monitoring operates by capturing individual frames at fixed intervals. Each capture releases the device immediately, ensuring that monitoring remains non-intrusive and reversible.

Recording State

Recording initiates a single FFmpeg process which retains exclusive control of the selected device for the duration of the session. While recording is active, snapshot and monitoring actions are intentionally blocked to prevent conflicts.

Design Principles

  • Single-file deployment with no external Go dependencies
  • No hidden background activity
  • User-driven hardware access only
  • Clear, observable runtime state
  • Minimal surface area for failure

Requirements

  • Go (any modern version)
  • FFmpeg available in system PATH
  • Linux system with V4L2 camera support

Installation & Compilation

CamGo is distributed as a single Go source file and requires no external Go dependencies. Compilation produces a standalone binary suitable for local execution on supported platforms.

Prerequisites

  • Go (installed and available in PATH)
  • FFmpeg (installed and available in PATH)
  • Linux system with V4L2 camera support

Compile from Source

go build -o camgo main.go

This will produce a single executable named camgo. The binary may be relocated freely and does not require accompanying assets.

Run Without Compilation (Development)

go run main.go

This mode is useful during development and testing, but compiling a binary is recommended for regular use.

Usage — Quick Launch

When launched without command-line options, CamGo starts a local web server bound to localhost and opens the user interface in the default web browser. No camera hardware is accessed at startup.

./camgo

After launch:

  • Select the desired camera device from the dropdown
  • Optionally start live monitoring
  • Capture snapshots or begin recording explicitly
  • Stop recording to finalize the output file

CamGo remains idle unless directed otherwise. Closing the browser does not stop the server process; terminate the application from the terminal when finished.

Usage — Command Line Options

CamGo supports a small set of command-line flags to customize runtime behavior. All options are optional and have safe defaults.

Available Options

  • -port — HTTP port for the web interface
  • -device — Preselect a camera device (e.g. /dev/video2)
  • -out — Output directory for snapshots and recordings
  • -headless — Disable automatic browser launch

Examples

Run on a custom port:

./camgo -port 8090

Start with a specific camera selected:

./camgo -device /dev/video2

Change the output directory:

./camgo -out ./captures

Run without opening a browser:

./camgo -headless

Command-line options influence startup behavior only. Device switching and capture control remain available through the web interface.

Disclaimer

CamGo is intended for local, trusted environments. The application does not provide authentication, encryption, or remote access controls. Users are responsible for ensuring appropriate permissions and legal compliance when capturing audio or video.

Metadata

Status: Stable

Interface: Web (Localhost)

Capture Engine: FFmpeg

Platform: Linux

License: Private

Tags

Camera Go FFmpeg USB Linux Localhost Media