ClipForge is a web-based video clipping application that allows you to create clips from your Plex media server sessions. Monitor what's currently playing, generate precise video clips with frame-accurate trimming, and manage your video collection through an intuitive web interface.
Preview first and last frames:

Multi frame snapshot to catch that frame you're looking for

Easy cropping to get the timing just right

Quick interface to view past creations

- Live Session Monitoring: Track active Plex media server sessions in real-time
- Precise Video Clipping: Create clips with second-accurate start/end times
- Frame Preview: Visual preview of start and end frames before creating clips
- Video Editor: Built-in video trimming and editing capabilities
- Bulk Operations: Select and manage multiple clips at once
- Secure Authentication: Token-based authentication with Plex integration
- Quality Options: Multiple output quality settings (Low, Medium, High)
- Responsive Design: Works seamlessly on desktop and mobile devices
- Thumbnail Generation: Automatic thumbnail creation for video previews
- FastAPI - Modern Python web framework
- SQLAlchemy - Database ORM
- Pydantic - Data validation and settings management
- FFmpeg - Video processing and clip generation
- JWT - Authentication tokens
- Structured Logging - Comprehensive logging with correlation IDs
- Vanilla JavaScript - No heavy framework dependencies
- Video.js - Professional video player
- CSS Grid/Flexbox - Modern responsive layouts
- Service Workers - Progressive Web App capabilities
- Docker - Containerized deployment
- SQLite - Lightweight database
- File-based Storage - Direct file system storage for media
- Docker and Docker Compose
- Plex Media Server
- FFmpeg (included in Docker image)
-
Clone the repository
git clone https://github.com/your-username/clipforge.git cd clipforge -
Configure Docker Compose Create or modify
docker-compose.yml:services: clipforge: image: jonnike/clipforge:latest container_name: clipforge ports: - "8002:8002" environment: - CLIPFORGE_JWT_SECRET=generate_a_long(32char)_secure_string_for_this_value - CLIPFORGE_PLEX_SERVER_TOKEN=XXXXXXXXXXXXXXXXXXX volumes: # Persistent storage for clips, snapshots, thumbnails, and database - /volumes/clipforge:/app/static - /media:/media restart: unless-stopped healthcheck: test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:8002/api/health', timeout=5)"] interval: 30s timeout: 10s retries: 3 start_period: 40s
-
Set environment variables
# Generate a secure JWT secret (minimum 32 characters) openssl rand -base64 32 # Get your Plex server token from Plex settings # Replace these in docker-compose.yml https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token
-
Run with Docker Compose
docker-compose up -d
-
Access the application
- Open your browser to
http://localhost:8002 - Log in with your Plex credentials
- Open your browser to
-
Install Python dependencies
pip install -r requirements.txt
-
Install FFmpeg
# Ubuntu/Debian sudo apt-get install ffmpeg # macOS brew install ffmpeg
-
Run the application
python3 backend/main.py
| Variable | Description | Default |
|---|---|---|
CLIPFORGE_JWT_SECRET |
JWT signing secret (required, min 32 chars) | None |
CLIPFORGE_PLEX_SERVER_TOKEN |
Plex server authentication token (required) | None |
CLIPFORGE_PORT |
Application port | 8002 |
CLIPFORGE_HOST |
Application host | 0.0.0.0 |
/app/static- Persistent storage for clips, snapshots, thumbnails, and database/media- Mount your media files for processing (read-only recommended)
- Monitor Sessions: View active Plex sessions on the Create tab
- Set Time Range: Enter start and end times or use the current time buttons
- Preview Selection: Generate frame previews to verify your selection
- Create Clip: Process the video clip with your chosen quality settings
- Download: Access your clips through the View tab
- Open Editor: Click the edit button on any existing clip
- Set Markers: Use the video timeline to set new start/end points
- Preview Trim: Review your edits before processing
- Process: Generate the edited clip
- Enable Bulk Mode: Click "Bulk Select" in the View tab
- Select Clips: Choose multiple clips for batch operations
- Bulk Delete: Remove multiple clips at once
clipforge/
├── backend/ # FastAPI backend
│ ├── api/ # API endpoints and middleware
│ ├── core/ # Configuration and utilities
│ ├── domain/ # Domain models and interfaces
│ ├── infrastructure/ # Database and external services
│ └── services/ # Business logic services
├── frontend/ # Static web frontend
│ ├── static/
│ │ ├── css/ # Stylesheets
│ │ └── js/ # JavaScript modules
│ ├── index.html # Main application
│ └── login.html # Authentication page
├── clips/ # Generated video clips
├── docker-compose.yml # Docker configuration
└── requirements.txt # Python dependencies
# Run linting and type checking
./lint.sh
# Start development server
python3 backend/main.py
# Clean up snapshots
./cleanup_snapshots.sh-
Configure environment
# Use strong JWT secret (minimum 32 characters) CLIPFORGE_JWT_SECRET=$(openssl rand -base64 32) # Set your Plex server token (get from Plex settings) CLIPFORGE_PLEX_SERVER_TOKEN="your-plex-token-here"
-
Set up volumes
# Create persistent storage mkdir -p /data/clipforge/{clips,snapshots,thumbnails,db} # Update docker-compose.yml volumes volumes: - /data/clipforge:/app/static - /path/to/your/media:/media:ro
-
Deploy with Docker
docker-compose -f docker-compose.prod.yml up -d
The application includes:
- Health endpoint at
/api/healthfor service status - Docker health checks with automatic container restart on failure
- Configurable check intervals and retry policies
- Authentication: Secure Plex-based authentication
- Authorization: Token-based access control with media access tokens
- CSRF Protection: Built-in CSRF middleware
- Input Validation: Comprehensive request validation
- Security Headers: Proper security headers configuration
- Videos longer than a few minutes may require extra processing time
- Large file processing is handled synchronously (async queue planned)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style and architecture patterns
- Add tests for new functionality
- Update documentation for user-facing changes
- Ensure all linting checks pass
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: Report bugs and feature requests on GitHub Issues
- Community: Join discussions in GitHub Discussions
- Async task queue with Redis
- Progressive Web App (PWA) support
- Advanced editing features (text overlays, transitions, millisecond choice)
- Subtitle support
- Automated testing suite

