openencoder

command module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2019 License: MIT Imports: 1 Imported by: 0

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
net

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL