Overview
BloodCat includes a bash scriptplay.sh that automatically opens all discovered RTSP streams in individual viewing windows using ffplay.
Requirements
FFmpeg Installation
The viewer requiresffplay, which is part of the FFmpeg package.
The script automatically checks for
ffplay and displays installation instructions if it’s missing (see play.sh:11-17).Usage
Basic Usage
After running BloodCat and discovering cameras:- Read all RTSP URLs from
./data/ipcam.info - Open each stream in a separate
ffplaywindow - Display streams in a grid layout
What Happens
Fromplay.sh:27-37, the script:
FFplay Command Parameters
The actual command used to play each stream:Parameter Breakdown
-rtsp_transport tcp
-rtsp_transport tcp
Forces RTSP to use TCP instead of UDP for more reliable streaming through firewalls and NAT.
-x 420
-x 420
Sets the video window width to 420 pixels.
-y 340
-y 340
Sets the video window height to 340 pixels.
& (background)
& (background)
Runs the ffplay process in the background, allowing multiple streams to play simultaneously.
Viewing Grid Layout
Each stream opens in a window sized 420×340 pixels. This size is chosen to allow multiple camera feeds to be arranged in a grid on your screen without overlapping.For example, on a 1920×1080 display, you can comfortably view approximately 12 camera feeds (4 columns × 3 rows) simultaneously.
Example Layout
Error Handling
File Not Found
Fromplay.sh:20-24, the script checks if the output file exists:
Invalid URLs
The script automatically skips:- Empty lines
- Lines that don’t start with
rtsp://
Stopping the Viewer
Stop All Streams
Since allffplay instances run in the background, you can stop them all at once:
Stop Individual Stream
Close individual stream windows by:- Clicking the window close button
- Pressing
ESCorQwhile the window is focused
Advanced Usage
Custom Window Size
You can modify the window dimensions by editingplay.sh:35: