A tool for creating RTSP streams from Blink cameras using FFmpeg and MediaMTX.
Blink cameras are battery operated and don't have native RTSP support. This tool uses the BlinkPy Python library to download clips every time motion is detected and creates RTSP streams from them.
Key Points:
- Delay of up to ~30 seconds between motion detection and stream update
- Streams persist the last recorded frame until new motion is detected
- Compatible with Frigate NVR, Scrypted, and other RTSP consumers
- Photo Capture - Must disable "Photo Capture" in Blink app for each camera (photos prevent video recognition)
- Local Storage - Known issue with local storage systems (see #1 for workaround)
- Download - Retrieves the latest clip for each enabled camera from the Blink server
- Extract - FFmpeg extracts the last frame and creates a short still video (~0.5s)
- Publish - The still video is published on a loop to MediaMTX using FFmpeg's concat demuxer
- Update - When motion is detected, the new clip is downloaded and published
- Loop - A still video from the last frame of the new clip is then published on a loop
Step 1: Download compose.yaml and config/config.json from this repository
Step 2: Edit config.json in ./config/ directory:
- Add your Blink login credentials
- Configure camera and server settings (see Configuration section below)
Step 3: Initial setup (one-time only):
docker compose run blinkbridgeEnter your Blink verification code when prompted. Credentials will be saved to config/.cred.json. Exit with CTRL+C.
Step 4: Start the service:
docker compose upRTSP URLs will be printed to the console.
The current supported runtime is the Python service started by Docker Compose.
The shell scripts in the scripts/ folder are legacy helpers from earlier development and are not part of the default runtime path used by the container entrypoint.
Edit config.json with the following settings:
General Settings:
still_video_duration- Duration in seconds for the still frame video (default:0.5)log_level- Logging level:INFO,DEBUG,WARNING, orERRORpaths- Directory paths for videos, concat files, and config
Camera Settings:
cameras.enabled- List of specific camera names to enable (empty = all cameras)cameras.disabled- List of camera names to disablecameras.max_failures- Max consecutive failures before stopping a stream (default:3)cameras.restart_delay_seconds- Delay before restarting after failure (default:60)
Blink Account:
blink.login.username- Your Blink account emailblink.login.password- Your Blink account passwordblink.history_days- Days to look back in history (default:90)blink.poll_interval- Polling interval in minutes (default:1, minimum recommended)blink.metadata_pages- Number of API pages to fetch for video metadata, ~25 clips per page, shared across all cameras (default:10). Raise this if you have many cameras and quieter ones are missing their most recent clip on startup/restart.
RTSP Server:
rtsp_server.address- MediaMTX server address (default:mediamtx)rtsp_server.port- RTSP port (default:8554)
Frigate Camera Snippet Export (optional):
frigate_export.enabled- Enable exporting Frigatecameras:YAML blockfrigate_export.output_path- File path where snippet is writtenfrigate_export.rtsp_host/frigate_export.rtsp_port- Host/port used in exported RTSP URLsfrigate_export.roles- Roles included for each camera input (e.g.detect,record)frigate_export.detect_defaults- Default detect width/height/fps for exported cameras
When enabled, BlinkBridge writes a standalone cameras: block file after startup completes and cameras are discovered. The file is intended for manual copy/merge into a user-managed Frigate config.
Web Access (optional):
web.enabled- Enable BlinkBridge utility web pageweb.host/web.port- Bind address and port for the web UI- UI endpoint:
http://<host>:8765/ - Raw YAML endpoint:
http://<host>:8765/frigate-cameras.yml
In Codespaces, forward port 8765 to access the page from your browser.
Streams are available at: rtsp://<host>:8554/<camera_name>
Examples:
rtsp://localhost:8554/Front_Door # Local access
rtsp://192.168.1.100:8554/Front_Door # Network access
Note: Camera names are sanitized (spaces and special characters modified). Check console output for exact URLs.
- Support FFmpeg hardware acceleration (e.g. QSV)
- Process cameras in parallel and reduce latency
- Add ONVIF server with motion events