strix

repository·main·Indexed 21 days ago

https://github.com/eduard256/strix

A camera stream discovery tool and Frigate configuration generator. Strix uses a database of over 100,000 URL patterns to probe IP cameras, test stream quality (codecs, resolution, and latency), and automatically generate ready-to-use configurations for NVR software like Frigate and go2rtc. It supports various protocols including RTSP, RTSPS, HTTP/HTTPS, RTMP, Bubble, DVRIP, and HomeKit.

Tokens
3.4K
Snippets
16
Records
23
Agent score
68%

What's inside strix

  1. How Strix camera discovery works

    main

    Strix automates the process of finding and configuring camera streams through several steps:

    1. Probing: Enter a camera IP. Strix probes the device for open ports, MAC vendor (OUI), mDNS, and HTTP servers.
    2. Searching: Search for the camera model in the internal database. You can provide credentials if required.
    3. URL Building: Strix generates all possible stream URLs based on patterns found in its database (which contains 100,000+ patterns).
    4. Testing: 20 parallel workers test every generated URL, providing live screenshots, codec information, resolution, and latency.
    5. Selection: You pick the preferred main and sub-streams from the test results.
    6. Config Generation: Strix generates a ready-to-use Frigate configuration which can be copied, downloaded, or saved directly to Frigate.
  2. Install Strix using Podman

    main

    When using Podman, you must explicitly grant NET_RAW and NET_ADMIN capabilities because Podman drops these by default, and Strix requires them for network scanning. Alternatively, you can use the --privileged flag.

    podman run -d \
      --name strix \
      --network host \
      --cap-add=NET_RAW \
      --cap-add=NET_ADMIN \
      --restart unless-stopped \
      eduard256/strix:latest
  3. Install Strix via Docker

    main

    Run Strix as a Docker container. The database is already embedded in the image. Using --network host is recommended to allow the container to probe the local network.

    docker run -d --name strix --network host eduard256/strix:latest
  4. Install Strix on Linux or Proxmox

    main

    For a quick installation on Linux or Proxmox, use the interactive installer script. You must run this as root or with sudo. The installer will automatically detect your system and guide you through the setup process.

    Once installed, the web interface is accessible at http://YOUR_IP:4567.

    bash <(curl -fsSL https://raw.githubusercontent.com/eduard256/Strix/main/install.sh)
  5. Install Strix using Docker

    main

    Run Strix as a standalone container using Docker. It is recommended to use --network host to allow the application to perform network scanning and device probing.

    docker run -d --name strix --network host --restart unless-stopped eduard256/strix:latest
  6. Install Strix as a Home Assistant Add-on

    main
    1. Navigate to Settings > Add-ons > Add-on Store in Home Assistant.
    2. Open the menu (top right) and select Repositories.
    3. Add the following repository URL: https://github.com/eduard256/hassio-strix.
    4. Install Strix, then enable Start on boot and Show in sidebar.
  7. Install Strix using Docker Compose

    main

    You can use Docker Compose to deploy Strix either standalone or alongside other services like Frigate or go2rtc. Download the appropriate YAML file from the repository and run docker compose up -d.

    # Strix only
    curl -O https://raw.githubusercontent.com/eduard256/Strix/main/docker-compose.yml
    docker compose up -d
    
    # Strix + Frigate
    curl -O https://raw.githubusercontent.com/eduard256/Strix/main/docker-compose.frigate.yml
    docker compose -f docker-compose.frigate.yml up -d
    
    # Strix + go2rtc
    curl -O https://raw.githubusercontent.com/eduard256/Strix/main/docker-compose.go2rtc.yml
    docker compose -f docker-compose.go2rtc.yml up -d
  8. Typical Automation Flow with Strix API

    main

    A standard workflow for integrating Strix into an automation system follows these steps:

    1. Probe device: GET /api/probe?ip={ip} to identify the device.
    2. Search database: GET /api/search?q={query} to find matching camera patterns.
    3. Build stream URLs: GET /api/streams?ids={ids}&ip={ip}&user={user}&pass={pass} to generate valid RTSP/HTTP URLs.
    4. Test streams: POST /api/test with the generated URLs to verify codecs and resolution.
    5. Poll results: GET /api/test?id={session_id} to check test completion.
    6. Generate config: POST /api/generate to create a Frigate YAML configuration.
  9. Install Strix via Binary

    main

    Download the appropriate binary from GitHub Releases. The binary is a zero-dependency static file for Linux amd64/arm64, though ffmpeg is required for screenshot conversion. You can specify the listen address using the STRIX_LISTEN environment variable.

    chmod +x strix-linux-amd64
    STRIX_LISTEN=:4567 ./strix-linux-amd64
  10. Configure Strix via Environment Variables

    main

    Use the following environment variables to configure the Strix runtime:

    VariableDefaultDescription
    STRIX_LISTEN:4567HTTP listen address
    STRIX_DB_PATHcameras.dbPath to SQLite database
    STRIX_LOG_LEVELinfotrace, debug, info, warn, error
    STRIX_FRIGATE_URLauto-discoveryFrigate URL, e.g. http://localhost:5000
    STRIX_GO2RTC_URLauto-discoverygo2rtc URL, e.g. http://localhost:1984
  11. Configure Strix environment variables

    main

    Strix can be configured using the following environment variables:

    VariableDefaultDescription
    STRIX_LISTEN:4567HTTP listen address
    STRIX_DB_PATHcameras.dbPath to SQLite camera database
    STRIX_LOG_LEVELinfoLog level: debug, info, warn, error, trace
    STRIX_FRIGATE_URLauto-discoveryFrigate URL, e.g. http://localhost:5000
    STRIX_GO2RTC_URLauto-discoverygo2rtc URL, e.g. http://localhost:1984
  12. Deploy Strix using Docker Compose

    main

    To run Strix as a standalone service, use the provided docker-compose.yml configuration. The service uses host network mode to ensure connectivity.

    Run the following command to start the container in detached mode:

    docker compose up -d