Documentation
Everything you need to know about VCP. From installation to advanced features, we've got you covered with comprehensive guides and examples.
Getting Started
Prerequisites
- Java 17 or higher
- Maven 3.6+
- FFmpeg (with ffprobe)
- Docker (optional)
FFmpeg Installation
# macOS (using Homebrew)
brew install ffmpeg
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install ffmpeg
# Windows (using Chocolatey)
choco install ffmpeg
Installation
# Clone the repository
git clone https://github.com/syswe/vcp.git
cd vcp
# Build the project
./mvnw clean install
# Run the application
./mvnw spring-boot:run -Dspring-boot.run.arguments=--server.port=8080
Configuration
# Server configuration
server.port=0 # Dynamic port allocation
# File upload settings
spring.servlet.multipart.max-file-size=1000MB
spring.servlet.multipart.max-request-size=1000MB
# Compression settings
vcp.output.directory=processed
vcp.upload.directory=uploads
vcp.processing.threads=2
Usage
Web Interface
Features
- Drag & drop file upload
- Multiple file selection
- Real-time compression progress
- Detailed results view
- Custom output directory selection
- Multiple resolution selection
- Quality preset configuration
- Frame rate adjustment
Steps to Use
- Open
http://localhost:8080
in your browser - Drag & drop video files or click to select
- Choose compression settings:
- Quality preset
- Target resolutions
- Frame rate
- Output format
- Click "Start Processing"
- View compression results
Desktop App
Additional Features
- Native file system dialogs
- System tray integration
- Custom window controls
- Offline processing capability
- Progress notifications
Window Controls
- Minimize: Reduces window to taskbar
- Maximize: Expands window to full screen
- Close: Exits application
API Reference
Base URL
http://localhost:8080/api/v1
Endpoints
1. Compress Video
POST /compress
Content-Type: multipart/form-data
Parameters:
- files: Video files (multipart)
- preset: Quality preset (LOW/MEDIUM/HIGH)
- resolutions: Target resolutions
- frameRate: Target frame rate
- maintainOriginalSize: Boolean
- preserveAudioQuality: Boolean
- outputFormat: Output format (mp4/webm/mkv)
Response:
{
"fileName": "string",
"resolution": "string",
"originalSize": "number",
"compressedSize": "number",
"compressionRatio": "number",
"originalResolution": "string",
"bitrate": "number",
"duration": "number",
"outputPath": "string"
}
2. Detect Resolutions
POST /detect-resolutions
Content-Type: multipart/form-data
Parameters:
- video: Video file (multipart)
Response:
["ORIGINAL", "UHD_4K", "QHD", "FHD", "HD", "SD", "LOW"]
3. Get Output Directory
GET /output-directory
Response:
{
"directory": "string"
}
4. Set Output Directory
POST /output-directory
Content-Type: application/x-www-form-urlencoded
Parameters:
- directory: Output directory path
Response:
{
"directory": "string"
}
Features
Compression Options
Quality Presets
Preset | Bitrate | Speed | CRF | Use Case |
---|---|---|---|---|
Low | 500 Kbps | slow | 28 | Size priority |
Medium | 2 Mbps | medium | 23 | Balanced |
High | 5 Mbps | veryslow | 18 | Quality priority |
Resolutions
- Original (maintain source)
- 4K UHD (3840x2160)
- 1440p QHD (2560x1440)
- 1080p FHD (1920x1080)
- 720p HD (1280x720)
- 480p SD (854x480)
- 360p Low (640x360)
- Custom (user-defined)
Custom Resolution Format
CUSTOM_WIDTHxHEIGHT
: For exact dimensions (e.g.,CUSTOM_1920x1080
)CUSTOM_WIDTHxHEIGHT_ASPECT
: To maintain aspect ratio (e.g.,CUSTOM_1920x1080_ASPECT
)
Frame Rates
Available frame rates:
- 24 FPS (Cinematic)
- 30 FPS (Standard)
- 60 FPS (High motion)
Additional options:
- Maintain original size
- Preserve audio quality
- Multiple output formats (MP4, WebM, MKV)
- Custom output naming