Skip to content

vothub/media-converter-api

Repository files navigation

Media Converter

media-converter.vothub.com Issues Build status MIT License

This service transcodes media files from one format to another.

It uses server and worker components to manage concurrency.

TL;DR: ffmpeg as a service.

Development still at an early stage.

Quickstart

# Clone the repo
git clone https://github.com/vothub/media-converter-api.git
cd media-converter-api

# Install dependencies
npm install

# Start the app
npm start

This starts the application at http://localhost:3000 with a single worker thread and a single server thread.

Configuration

Media Converter is configured by environment variables.

You can use a .env file to set the necessary values.

Database (both processes)

  • POSTGRES_HOST (defaults to localhost)
  • POSTGRES_PORT (defaults to 5432)
  • POSTGRES_USER (defaults to empty string)
  • POSTGRES_PASS (defaults to empty string)
  • POSTGRES_DBNAME (defaults to vhmc)

API

  • APP_PORT (defaults to 3000)
  • APP_BASE_URL (defaults to localhost:3000)

Worker

  • POLLING_FREQUENCY_MS (defaults to 3000)

TODO

  • Retry logic
  • Add persistent backing storage (scaling restriction)
  • Improve documentation - schemas, statuses, data flow, presets, etc.