Skip to content

mediainbox/sm-archiver

 
 

Repository files navigation

StreamMachine Archiver

This is an experiment that may eventually become part of StreamMachine's core functionality.

Archiver connects to StreamMachine master as a slave, but instead of serving data up to clients it writes HLS segments to disk or S3.

So far, waveform data is kept in memory and is regenerated on restart.

While running, StreamMachine Archiver can be found at http://localhost:9000(1).

Requirements

  • Node.js(2)
  • libgroove(3)
  • Docker(4)

Running

Locally

Installing

npm install

Starting

npm start -- --config config/dev.json

Debug Mode

npm run start:debug -- --config config/dev.json

With Docker

Building

docker build -t sm-archiver .

Installing

npm run docker -- npm install

Starting

npm run docker:start -- -- --config config/dev.json

Debug Mode

npm run docker:start:debug -- -- --config config/dev.json

Notes

  1. Unless running with Docker via boot2docker or docker-machine, in which case localhost should be replaced with the Docker VM's IP.
  2. Not required if running with Docker.
  3. Not required if running with Docker.
  4. Not required if running locally.

Google Cloud Stackdriver tools

Required config.json parameters:

{
  ...
  "gCloudProjectId": "project_id",
  "gCloudKeyFilename": "./config/credentials.json"
}

See also https://github.com/GoogleCloudPlatform/cloud-trace-nodejs#running-elsewhere

About

Archive StreamMachine HLS segments to disk or S3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CoffeeScript 95.0%
  • C++ 4.2%
  • Other 0.8%