Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] FoxxMD - cron-streamripper

Featured Replies

Application Name: cron-streamripper
Application Site: http://streamripper.sourceforge.net/

Docker Hub: https://hub.docker.com/r/dax333/cron-streamripper

Template Repo: https://github.com/FoxxMD/unraid-docker-templates

 

Overview 

 

streamripper is an open source application for recording streaming audio, usually associated with online radio. streamripper can be use manually from inside the container but this container is mainly setup to be used with the cron scheduler to enable a user to schedule ripping.

 

How To Use

 

  1. Mount a host directory to the container directory /etc/cron.d and create a new, valid cron file named station-cron inside that directory. streamripper can be run directly from the cron file
    1. The template provides /mnt/user/appdata/cron-streamripper/cron as a default host directory
  2. Mount another host directory into the container where output files can be saved
    1. The template provides container directory /home/streamripper/streams mounted to the host directory /mnt/user/appdata/cron-streamripper/streams as a default
  3. The container will automatically check station-cron on startup, happy ripping!

 

Optionally, create executable scripts for simplifying streamripper usage and store these in a mounted host directory, then refer to these in station-cron. A default mount is provided in the template

 

 

For your convenience here are my station-cron and script files for more in depth examples:

 

stream.sh

#!/bin/sh

# A POSIX variable
OPTIND=1         # Reset in case getopts has been used previously in the shell.

# Initialize our own variables:
duration=60
name=""
station=""
url=""
date=$(date)

while getopts "n:d:s:u:" opt; do
    case "$opt" in
    n)
        name=$OPTARG
        ;;
    d)
        duration=$OPTARG
        ;;
    s)
        station=$OPTARG
        ;;
    u)
        url=$OPTARG
        ;;
    :)
        echo "Option -$OPTARG requires an argument." >&2
        exit 1
        ;;
    esac
done

# Timestamping execution in log and stdout for unraid logs
echo "Starting to rip at ${date}"

# output directory will be the name given for station
output_dir=/home/streamripper/streams/${station}

# output filename will be the name given for the stream and the date
output_filename=${name}--%d

# -s => don't create directory for each stream
# -t => Truncate completed tracks in incomplete directory
# -o => always overwrite tracks in complete directory (not an issue since output file always has unique timestamp)
# -a => rip to single file (instead of separating into individual tracks based on silience detection)

streamripper "$url" -d "$output_dir" -l $duration -a "$output_filename" -s -T -o always

# newline for readability in log/stdout
echo ""

 

station-cron

# cron test
# prints "Hello World" to the cron.log file every minute
#* * * * * echo "Hello world" >> /var/log/cron.log 2>&1

# streamripper test
# will output a 40-second long ripped stream to /home/streamripper/streams/wabe every 2 minutes
*/2 * * * * /home/streamripper/programs/stream.sh -n testStream -d 40 -s wabe -u https://pba-ice.wabe.org/wabe.aac

 

  • 4 weeks later...

i found a copy on windows

Edited by lockntross

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.