Categorygithub.com/alfg/openencoder
modulepackage
0.0.4
Repository: https://github.com/alfg/openencoder.git
Documentation: pkg.go.dev

# README

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!

Build Status GoDoc Go Report Card Docker Automated build Docker Pulls

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
  • Create DB and run scripts/schema.sql to set up schema.

  • Set environment variables in docker-compose.yml:

Environment variables will override defaults set in config/default.yml.

  • Build & start API server:
go build -v && openencoder.exe server
  • Build & start worker:
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

# Packages

No description provided by the author
No description provided by the author