Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.34 KB

README.md

File metadata and controls

31 lines (23 loc) · 1.34 KB

boa

boa was initially written as a service for Skyris that converted music uploaded to S3 into smaller streamable MP3s (128kbps), as well as converted lossless uploads to 320kbps MP3s to make them available for download if a user so desired. It depends on the LAME MP3 encoder. What you'll find here is a cleaned up, slightly more generalized version of this service.

It works in a few vaguely snakelike stages:

  1. Stalk - read messages off queue
  2. Hunt - download file included in message from S3
  3. Constrict - compresses file (if necessary) into the desired MP3s
  4. Digest - upload newly created files to S3, delete local copies

snake-boy

Usage:

Expects input as a JSON blob in the following format. The id is used in the S3 path to avoid issues with different audio files that have the same name.

{
  "id": "56773ff9faa58b662fc7cbb0",
  "originalUploadPath": "original-upload/56773ff9faa58b662fc7cbb0/Snake-Boy.wav",
  "streamOnly": true
}

To Do:

  1. Input validation
  2. Clean up error handling - better logging, set failure flag in Mongo if necessary
  3. Add support for other messaging queues and storage (MongoDB & RabbitMQ currently supported)
  4. Dockerize so installing the LAME dependency isn't an issue
  5. Write tests, set up CI