Skip to content

teklynk/owncast_stream_recorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Owncast Stream Recorder

This script monitors the /api/status endpoint every 30 seconds to check if "online": true. When the stream is detected as online, the script waits an additional 30 seconds before starting to record the stream's m3u8 URL. The recordings are saved to a specified directory. When the stream ends, the recording stops automatically.

You can set up this script as a cron job on your server, home PC, or NAS to automatically start recording whenever you go live.

Setup

  1. Modify the script for your environment
# Configuration variables
API_URL="https://<owncast-server>/api/status"
M3U8_STREAM_URL="https://<owncast-server>/hls/0/stream.m3u8"
RECORDINGS_DIR="<path-to-store-recordings>"
  1. Make the script executable:
chmod +x /path/to/owncast_stream_recorder.sh
  1. Add the script to your crontab to run on system boot:
crontab -e
  1. Add the following line to the crontab file:
@reboot /path/to/owncast_stream_recorder.sh

This configuration ensures the script runs at startup and continuously monitors the stream status, handling the recording process automatically.

About

Automatically record your Owncast stream when you go live.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages