Transform camera streams, uploaded photos, and MQTT-triggered captures into timelapse videos with a comprehensive web interface.
- RTSP Streams - Connect to any IP camera with RTSP protocol
- USB Cameras - Direct access to webcams and USB video devices
- Capture Cards - HDMI/SDI capture cards for professional video input
- HTTP Streams - MJPEG, HLS, and DASH streaming protocols
- RTMP Streams - Live streaming from RTMP sources
- Screen Capture - Desktop and application window recording
- Photo Upload - Drag-and-drop interface for uploading image collections
- Network Import - Import photos from network paths and shared folders
- MQTT Triggers - Capture photos from any source based on MQTT message transitions (1β0)
- Database Integration - SQLite database for session tracking and metadata storage
- Session Management - View, manage, and delete all capture sessions
- Storage Quotas - Configurable storage limits with automatic enforcement
- Automatic Cleanup - Scheduled cleanup of old sessions and orphaned files
- Flexible Scheduling - Set custom intervals and optional auto-stop duration
- Customizable Output - Adjust timelapse FPS (1-60)
- Real-time Preview - View snapshots as they're captured via WebSocket
- Video Export - Download generated timelapses as MP4 files
- Thumbnail Generation - Automatic thumbnail creation for photo galleries
- Docker (20.10+)
- Docker Compose (1.29+)
-
Clone and navigate to the project:
git clone https://git.rg3d.me/rg3d/RTSP-Timelapse-Creator cd RTSP-Timelapse-Creator -
Configure the hostname:
Edit
docker-compose.ymland update the frontend build args to match your server's hostname or IP:frontend: build: args: - REACT_APP_API_URL=http://YOUR_HOSTNAME:3001 - REACT_APP_WS_URL=ws://YOUR_HOSTNAME:3002
-
Start the application:
docker-compose up -d --build
-
Access the web interface:
http://YOUR_HOSTNAME:3000
3000- Frontend web interface3001- Backend API3002- WebSocket server
The application provides multiple ways to create timelapses:
-
Enter your RTSP URL in the format:
rtsp://[username:password@]host[:port]/pathExample:
rtsp://admin:password@192.168.1.100:554/stream1 -
Test the connection to verify the stream is accessible
-
Configure capture settings:
- Snapshot Interval - How often to capture frames (seconds)
- Timer Mode (optional) - Auto-stop after specified duration
- Timelapse FPS - Playback speed of final video (1-60)
-
Start capturing and watch snapshots appear in real-time
- Switch to "Upload Photos" tab
- Drag and drop your image files or click to select
- Supported formats: JPEG, PNG, GIF (max 10MB each)
- Preview uploaded images in the gallery
- Generate timelapse from your photo collection
- Switch to "Import from Path" tab
- Enter network path to directory containing images
- Example:
/path/to/photosor\\server\share\photos
- Example:
- Click "Import Photos" to copy and process images
- Generate timelapse from imported photos
- Switch to "MQTT Trigger" tab
- Select video source type:
- RTSP Stream, USB Camera, Capture Card, HTTP Stream, RTMP Stream, or Screen Capture
- Configure source-specific settings (device path, URL, etc.)
- Configure MQTT settings:
- Broker URL:
mqtt://broker.example.com:1883 - Topic:
sensor/trigger - Credentials (optional): username and password
- Broker URL:
- Start MQTT capture to listen for messages
- Photos are captured from your selected source when message changes from '1' to '0'
- Perfect for motion sensors, door triggers, etc.
- Generate timelapse once you have at least 2 snapshots
- Download your video as MP4
- Re-download from Sessions tab - All generated videos are preserved
- Manage sessions in the Sessions tab
- Interval: 300 seconds (5 minutes)
- Duration: 28800 seconds (8 hours)
- FPS: 30
- Result: 8 hours compressed into ~3 minutes
- Interval: 3600 seconds (1 hour)
- Duration: 604800 seconds (7 days)
- FPS: 24
- Result: 1 week compressed into ~7 seconds
- Verify RTSP URL format is correct
- Check username/password if authentication is required
- Ensure camera is accessible on the network
- Try explicitly adding port (e.g.,
:554) - Verify camera allows multiple connections
Test manually:
docker-compose exec backend ffmpeg -rtsp_transport tcp -i "rtsp://your-url" -frames:v 1 test.jpg- Check if port 3002 is accessible
- Verify firewall settings
- Ensure backend container is running:
docker-compose ps - Check browser console for errors
Update the frontend build args in docker-compose.yml with your server's IP address instead of localhost, then rebuild:
docker-compose down
docker-compose up -d --build- Reduce FPS or number of snapshots
- Increase Docker memory limit in Docker Desktop settings
- Add memory limits to docker-compose.yml:
backend: deploy: resources: limits: memory: 4G
# View logs
docker-compose logs -f
# View backend logs only
docker-compose logs -f backend
# Restart services
docker-compose restart
# Stop services
docker-compose down
# Rebuild and restart
docker-compose up -d --build- Frontend: React + TailwindCSS + WebSocket client (port 3000)
- Backend: Node.js + Express + FFmpeg + WebSocket server (ports 3001, 3002)
- Database: SQLite with PostgreSQL migration path
- Storage: Docker volumes for snapshots, videos, and database
- MQTT: Real-time message handling for trigger-based captures
- Scheduling: Automated cleanup with node-cron
- View all sessions with metadata (type, date, size, snapshot count)
- Download timelapse videos from any session with generated videos
- Delete individual sessions or run bulk cleanup
- Storage statistics showing total usage and quotas
- Manual cleanup to remove old sessions and orphaned files
- Persistent storage - All sessions survive server restarts
- Metadata tracking - File sizes, dimensions, timestamps
- Storage quotas - Configurable limits per session and total
- Automatic cleanup - Hourly cleanup of old sessions (7-day default)
- Retention policies - Configurable cleanup intervals
- Storage quotas - Prevent disk space issues
- Orphaned file detection - Clean up unused files
- Session metadata - Track all capture details
- Broker connection - Support for any MQTT broker
- Authentication - Username/password support
- Trigger patterns - Customizable message-based capture
- Real-time status - Connection and message monitoring
POST /api/test-connection- Test RTSP stream connectivityPOST /api/start-capture- Start RTSP capture sessionPOST /api/stop-capture- Stop active capture sessionPOST /api/generate-timelapse- Generate video from snapshots
POST /api/upload-photos- Upload multiple photos with drag-and-dropPOST /api/import-from-path- Import photos from network pathGET /api/session/:id- Get session details and snapshots
POST /api/start-mqtt-capture- Start MQTT listener sessionPOST /api/stop-mqtt-capture- Stop MQTT sessionGET /api/mqtt-status/:id- Get MQTT connection status
GET /api/sessions- List all sessions with metadataDELETE /api/session/:id- Delete session and all filesGET /api/storage-stats- Get storage usage statistics
POST /api/cleanup/run- Manual cleanup of old sessionsGET /api/cleanup/stats- Get cleanup statisticsGET /api/storage/quotas- Get storage quota settingsPOST /api/storage/quotas- Set storage quotas
GET /api/download/video/:sessionId- Download timelapse video (forced download)
# MQTT Default Settings (optional)
MQTT_BROKER_URL=mqtt://broker.example.com:1883
MQTT_USERNAME=your_username
MQTT_PASSWORD=your_password
# Storage Quotas (optional)
MAX_TOTAL_STORAGE_MB=1024
MAX_SESSION_STORAGE_MB=100
DEFAULT_RETENTION_DAYS=7- Database Integration - SQLite database with session tracking
- Photo Upload - Drag-and-drop interface with thumbnails
- Network Import - Import from network paths
- MQTT Triggers - Message-based photo capture from any video source
- Storage Management - Quotas, cleanup, and session management
- Session Persistence - All data survives restarts
- Universal Video Input - USB cameras, capture cards, HTTP/RTMP streams, screen capture
- Multi-Source MQTT - MQTT triggers work with all video source types
- Multi-Camera Support - Simultaneous capture from multiple sources
- Scheduled Captures - Cron-like scheduling for automated timelapses
- Cloud Storage - S3, Google Cloud Storage integration
- Video Quality Options - Advanced encoding settings
- User Authentication - Multi-user support with accounts
This project relies on the following open source software:
- Express - MIT License
- FFmpeg - GPL/LGPL
- Fluent-FFmpeg - MIT License
- Sharp - Apache 2.0 License
- Better-SQLite3 - MIT License
- MQTT.js - MIT License
- Node-cron - MIT License
- Archiver - MIT License
- Multer - MIT License
- UUID - MIT License
- WS - MIT License
- CORS - MIT License
- React - MIT License
- Tailwind CSS - MIT License
- Lucide React - ISC License
- Web Vitals - Apache 2.0 License
- UUID - MIT License
For full license texts, see the respective project repositories.
MIT License - see LICENSE file for details.
