Skip to content

axcdeng/hls-link-recorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HLS Recorder (GitHub Actions + Google Drive)

This repository records up to 4 HLS streams in parallel using GitHub Actions and uploads the finished chunks to Google Drive with rclone.

Use this only for streams you own or are allowed to archive. Be aware that this may go up to 100+ GB.

Files

  • .github/workflows/record.yml — the GitHub Actions workflow
  • scripts/record_one.sh — records one HLS stream and uploads chunks to Drive
  • .gitignore

1) Create a public GitHub repo

Create a new public repository, then upload these files.

2) Add GitHub Secrets

Go to Settings → Secrets and variables → Actions and add:

  • STREAM1_URL
  • STREAM2_URL
  • STREAM3_URL
  • STREAM4_URL
  • RCLONE_CONF_B64

Leave any unused STREAMx_URL secret empty if you are only using 1–3 streams.

3) Add optional GitHub Variables

Also under Settings → Secrets and variables → Actions → Variables, you can add:

  • DRIVE_BASE → default: gdrive:GitHub-HLS-Recordings
  • SEGMENT_SECONDS → default: 900
  • RECORD_SECONDS → default: 21300

If you do nothing, the defaults above are used.

4) Prepare Google Drive with rclone

On your own computer, install rclone and run:

rclone config

Create a remote named exactly:

gdrive

Test it:

rclone lsd gdrive:

Now base64-encode your rclone.conf and put the result into GitHub secret RCLONE_CONF_B64.

macOS / Linux

base64 -i ~/.config/rclone/rclone.conf | tr -d '\n'

If your Linux base64 does not support -i, use:

base64 -w 0 ~/.config/rclone/rclone.conf

Windows PowerShell

[Convert]::ToBase64String([IO.File]::ReadAllBytes("$env:APPDATA\rclone\rclone.conf"))

5) Put your HLS URLs into secrets

Add each current HLS URL into:

  • STREAM1_URL
  • STREAM2_URL
  • STREAM3_URL
  • STREAM4_URL

If your provider uses temporary signed URLs, refresh them before every run.

6) Start recording

Go to Actions → Record HLS streams → Run workflow.

Each stream runs in its own job.

Drive upload layout

Chunks are uploaded to:

gdrive:GitHub-HLS-Recordings/<stream-name>/<github-run-id>/

Defaults

  • SEGMENT_SECONDS=900 → 15-minute chunks
  • RECORD_SECONDS=21300 → 5 hours 55 minutes

Notes

  • This records one stream per GitHub runner.
  • Completed chunks are moved to Drive during the run so runner storage stays lower.
  • If an HLS URL expires mid-run, that job will stop when the source becomes invalid.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages