2025-11-18 11:03:05 +01:00
2025-10-10 21:01:34 +02:00
2025-11-18 11:03:05 +01:00
2025-10-10 21:01:34 +02:00
2025-11-18 11:03:05 +01:00
2025-11-18 11:03:05 +01:00
2025-10-10 21:01:34 +02:00
2025-11-18 11:03:05 +01:00

SDL - Stream Downloader CLI

sdl is a simple command-line tool written in Go for downloading HTTP Live Streaming (HLS) video streams.

Installation

go install ./...

This installs the sdl binary into your GOBIN (defaults to ~/go/bin). Ensure this directory is on your PATH.

Usage

sdl https://example.com/page-with-video

If the target URL is a webpage, sdl scans it for embedded HLS playlists (.m3u8) and downloads each one it finds. You can override the output filename (or prefix when multiple videos exist):

sdl -o myvideo.mp4 https://example.com/path/to/playlist.m3u8

Features

  • Follows HTTP redirects (up to 5 hops)
  • Scrapes webpages for embedded HLS playlists (<video>, <source>, data attributes, script references)
  • Supports HLS master playlists (auto-select highest bandwidth variant)
  • Produces .mp4 output via ffmpeg
  • Respects basic HTTP timeouts (30 seconds per request)

Limitations

  • Requires ffmpeg in PATH for transmuxing
  • Webpage scraping is best-effort; dynamic players that load playlists via JS APIs may not be detected
  • No retry logic beyond standard HTTP redirects

Development

go build ./...
go test ./...

Contributions and issue reports are welcome!

Description
StreamDownLoad
Readme 83 KiB
Languages
Go 100%