openencoder
Open Source Cloud Encoder for FFmpeg
A distributed and scalable video encoding pipeline to be used
as an API or web interface using your own hosted infrastructure and FFmpeg encoding presets.
⚠️ Currently a work-in-progress! Check back for updates!
Features
- HTTP API for submitting jobs to an FFmpeg worker
- Redis-backed worker
- S3-based storage (AWS and Digital Ocean)
- Web Dashboard UI for managing encode jobs
- Machines UI/API for scaling worker instances
- Database stored FFmpeg encoding presets
Develop
Requirements
- Docker
- Go 1.11+
- FFmpeg
- Postgres
- AWS S3 Credentials & Bucket
- Digital Ocean API Keys (optional)
Setup
- Start Redis and Postgres in Docker:
docker-compose up -d redis
docker-compose up -d db
Environment variables will override defaults set in config/default.yml
.
- Build & start API server:
go build -v && openencoder.exe server
go build -v && openencoder.exe worker
- Start Web Dashboard for development:
cd static && npm run serve
Example Usage
curl -X POST \
http://localhost:8080/api/jobs \
-H 'Content-Type: application/json' \
-d '{
"preset": "h264_baseline_360p_600",
"source": "s3:///src/ToS-1080p.mp4",
"dest": "s3:///dst/tears-of-steel/"
}'
See API.md for full jobs API documentation.
API
See: API.md
Scaling
You can scale workers by adding more machines via the Web UI or API.
Currently only Digital Ocean
is supported. More providers are planned.
See: API.md for Machines API documentation.
TODO
- Distributed chunked encoding
- More health-checks
License
MIT