A robust, high-performance video chunk processing server written in C++. ChadServr provides a flexible API for uploading, processing, and managing video chunks, making it ideal for video streaming applications, transcoding services, and media processing pipelines.
- HTTP API for video chunk upload and management
- Parallel processing using a configurable thread pool
- FFmpeg integration for video transcoding and manipulation
- Stateful chunk tracking with detailed metadata
- Configuration management via JSON files
- Comprehensive logging system
- Storage management with automatic cleanup
- C++17 compatible compiler
- CMake 3.10+
- Boost libraries (system, thread)
- FFmpeg command-line tools
- nlohmann/json library (automatically downloaded by CMake)
mkdir build && cd build
cmake ..
make
# From the build directory
./bin/chadservr
The server will start on port 8080 by default, as specified in the configuration file.
Edit config/server_config.json
to configure the server:
{
"server": {
"port": 8080,
"worker_threads": 4
},
"video_processing": {
"thread_pool_size": 2,
"storage_path": "storage/processed",
"temp_path": "storage/temp",
"max_chunks": 100
}
}
POST /api/upload?options={...}
Content-Type: video/*
Options parameter is a URL-encoded JSON string with processing parameters:
{
"resize": {"width": 1280, "height": 720},
"bitrate": "2M",
"codec": "libx264"
}
GET /api/chunks
GET /api/chunks/info?id={chunk_id}
DELETE /api/chunks?id={chunk_id}
GET /api/status
ChadServr is built with a modular architecture:
- HttpServer: Handles HTTP requests and routes
- VideoProcessor: Processes video chunks using FFmpeg
- ThreadPool: Manages parallel processing tasks
- StorageManager: Handles file storage and retrieval
- Logger: Provides application-wide logging
- Config: Manages configuration settings
MIT License
- Fork the repository
- Create a feature branch
- Submit a pull request