This project is a web application that allows users to stream RTSP video, add live overlays (text/images), and control the position, size, and styling of those overlays. The backend uses Node.js (temporarily), but according to assignment requirements, it should ideally be reimplemented in Python (Flask).
- Stream video from any public RTSP URL.
- Add overlays on the video in real time (text or image).
- Drag and resize overlays within the video container.
- Save overlays via backend API (MongoDB).
- Perform full CRUD operations on overlays.
- Live feedback and controls (pause, play, volume).
Layer | Stack |
---|---|
Frontend | React, Video.js, Axios |
Backend | Node.js (Express) [TEMP] |
Database | MongoDB |
Streaming | FFmpeg (via fluent-ffmpeg) |
Assignment mentions Python (Flask) as the preferred backend.
http://localhost:5000/api
Create a new overlay.
Request Body:
{
"type": "text", // or "image"
"content": "Hello World",
"position": { "x": 100, "y": 150 },
"size": { "width": 200, "height": 100 },
"color": "#ffffff",
"fontSize": "18px",
"bgColor": "#00000080"
}
Response: 201 Created
{
"_id": "...",
"type": "text",
"...": "..."
}
Returns all saved overlays.
Response:
[
{ "_id": "...", "type": "text", ... },
{ "_id": "...", "type": "image", ... }
]
Update an existing overlay.
Request Body (partial updates allowed):
{
"position": { "x": 200, "y": 250 }
}
Response: 200 OK
Delete an overlay.
Response:
{
"message": "Overlay deleted"
}
Starts a stream from a given RTSP URL.
Request Body:
{
"rtspUrl": "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4"
}
Response:
{
"streamId": "168234234",
"streamUrl": "/streams/168234234/index.m3u8"
}
Returns status of the stream.
Stops a running stream.
cd backend
npm install
cp .env.example .env # Add your MongoDB URI
npm start
cd frontend
npm install
npm start
Open
http://localhost:3000
Paste a valid RTSP URL into the input box and click Start Stream.
- Type the text or image URL.
- Set font size, colors.
- Click Add Overlay.
- Double-click overlay to edit content.
- Resize by dragging edges.
- Move by dragging overlay.
- Delete with the ❌ button.