Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Latest commit

 

History

History
34 lines (22 loc) · 1.44 KB

README.md

File metadata and controls

34 lines (22 loc) · 1.44 KB

BigLog

BigLog is a Record of Transmission system that, basically, dumps an Icecast stream to a file. These files can be incremented hourly.

In fact, it can support recording a large number of Icecast streams into files. How many is a good question we don't have an answer to.

Usage

import Rotter from './lib/rotter';
import path from 'path';

const options = {
	directory: path.resolve('./logs') + '/%S-%D',
	format: '%S-%X.mp3'
}

new Rotter('http://your.streaming.url/monitor.mp3', 'station-name', options);

Alternatively, edit biglog.json and biglog.js to your streams and preferred file format. Bonus, it'll automatically reload its configuration if you add/remove values in the config file.

Formatting

  • %S - the station ID
  • %D - YYYY-MM-DD
  • %X - YYYY-MM-DD_HH
  • %U - UNIX timestamp

Stability

BigLog appends complete MP3 frames to a file in a chunked format. This means that once restarted, it'll immediately start appending fresh data to any pre-existing file for the current hour. It will create a new file (and directory, if needed) at the end of the hour, and write the next MP3 frame to the newly created file. This also means you can easily concatenate files without losing any data.

However, the project hasn't been extensively tested. Use at your own risk (but hopefully not for any broadcast critical compliance logging, get hardware!). Really, don't use this for broadcast critical compliance logging.