Skip to main content

Discover RTSP cameras on your LAN and auto-configure when only one device is present

Project description

rtspfinder

Discover RTSP IP cameras on your local network, try common default credentials, and automatically save configuration when exactly one device is found.

admin:123456 is tried first, followed by a built-in list of common camera usernames and passwords.

Install

From PyPI:

pip install rtspfinder

From source:

pip install .
# optional: better multi-interface subnet detection
pip install rtspfinder[netifaces]

Quick start (auto mode)

With no arguments, rtspfinder:

  1. Uses saved config if present (~/.config/rtspfinder/config.json) and connects to the stream
  2. Otherwise scans the LAN for RTSP (port 554)
  3. If one RTSP host is found, probes paths/credentials, writes config, and opens the stream
  4. If several hosts exist but only one authenticates, still auto-configures and connects

In-terminal video (like ani-cli)

By default, when run from a TTY, video plays inside the terminal using mpv (--vo=kitty, tct, or caca) — same idea as ani-cli’s --no-detach in-terminal mpv.

brew install mpv ffmpeg    # required for TTY video
brew install chafa         # optional ASCII fallback
rtspfinder                 # discover → save → play in TTY
rtspfinder --tty           # force TTY even if auto-detection differs
rtspfinder --gui           # separate window (ffplay/mpv)
rtspfinder

Force a new scan:

rtspfinder --refresh

Print the saved URL for scripts:

rtspfinder --url

Skip auto-connect:

rtspfinder --no-connect

Camera controls (YCC365 Plus / Ginatex HTTP + ONVIF)

Per YCC365 docs: HTTP 80, RTSP 554, ONVIF 80.

Many of these cameras (including Ginatex/TAS-Tech firmware) expose ONVIF PTZ over HTTP without auth — same approach as the PTZ-YCC365 Home Assistant component.

# Discover HTTP/ONVIF endpoints (uses saved config if present)
rtspfinder controls --discover-only --save

# Interactive PTZ in the terminal: w/a/s/d move, x stop, q quit
rtspfinder controls

More commands

Command Description
rtspfinder --discover-only List hosts with port 554 open
rtspfinder --host 192.168.1.100 -v Probe one camera
rtspfinder --show-config Show saved configuration
rtspfinder --no-auto Scan all hosts without auto-save rules
rtspfinder --no-save Discover but do not write config file

Config file permissions are set to 600 where supported.

Python API

from rtspfinder import auto_configure, load_config

result = auto_configure()
if result.configured:
    print(result.config.url)

Security

Only use on networks and devices you own or are authorized to test. Change default camera passwords after setup.

Publish to PyPI

pip install build twine
python -m build
twine check dist/*
twine upload dist/*

Use PyPI API tokens; do not commit credentials.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rtspfinder-1.4.0.tar.gz (27.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rtspfinder-1.4.0-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file rtspfinder-1.4.0.tar.gz.

File metadata

  • Download URL: rtspfinder-1.4.0.tar.gz
  • Upload date:
  • Size: 27.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for rtspfinder-1.4.0.tar.gz
Algorithm Hash digest
SHA256 d02de1e6818ce501cebdbca6b9ab55c092af8c67e91ab20780eb4f3adb610dd5
MD5 48f5bf7a914d9eaed8dd6fbeed1c2f1e
BLAKE2b-256 bc2c6b0693931c2a807b2b5035117e153a1b79fe4338de0e5090a68e8e05d370

See more details on using hashes here.

File details

Details for the file rtspfinder-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: rtspfinder-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 29.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for rtspfinder-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6637cf1a47185d4b165c192c6566e8774f33b653681bf95a5dda00c211758e27
MD5 facf979afd8a9f29b791c2039f1a0bb9
BLAKE2b-256 654c1b66e9231ff80d9347bcd98a47f0e1d48b49ceac230bc212a891fb2437b8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page