stream-recorder

module
v0.0.0-...-dac6061 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT

README

Stream Recorder

stream-recorder is used to listen and record audio stream when it is available(every 5 seconds), save as episodes in provided directory and naming them after calling site api.

Usage

stream-recorder is used to listen and record audio stream when it is available,
save as episodes in provided directory and naming them after calling site api

Options:
  -dir string
        Recording directory (default "./")
  -port string
        If provided app will start REST API server on the port otherwise server is disabled
  -site string
        Radio-t API (default "https://radio-t.com/site-api/last/1")
  -stream string
        Stream url (default "https://stream.radio-t.com")

Example:

make build
./streamrecorder --stream 'https://stream.radio-t.com' --port 8080 --dir ./records

Using Docker

Run using docker compose

docker-compose up --detach

Options

port

HTTP Server option allows the stream-recorder to run a server for trying out the REST API on a specified port. The server will serve the following endpoints:

  • /download/<record>: to download an episode
  • /health: to check the application's health, warning if disk capacity exceeds 80%
  • /records: to view recorded episodes
  • /: provides a Swagger UI for easier interaction with the API.
site

By default with fetch Radio-t API recieving data on the latest episode

Directories

Path Synopsis
app
Main entrypoint to run stream-recorder
Main entrypoint to run stream-recorder
recorder
Package recorder is the main functionality for listerning and recording an audio stream methods to call SiteAPI and stream
Package recorder is the main functionality for listerning and recording an audio stream methods to call SiteAPI and stream
server
Package server is a http server to view and access recorded episodes
Package server is a http server to view and access recorded episodes

Jump to

Keyboard shortcuts

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