Skip to content

benwilber/hls-dl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hls-dl

Download HLS video streams for local playback

Installation

Install the dependencies in a virtualenv with:

$ pip install -r requirements.txt

Usage

$ python3 hls-dl.py --help
usage: hls-dl.py [-h] [-o OUTPUT_DIR] [--start-pdt START_PDT] url

Download an HLS stream to a local directory.

positional arguments:
  url                   URL of the master HLS stream playlist to download.

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        Local directory to save the stream. Defaults to the current directory.
  --start-pdt START_PDT
                        Set the start Program Date Time in the HLS manifest.

Examples

Basic Usage

$ python3 hls-dl.py \
  --output-dir=my-stream \
  http://example.com/video/master.m3u8

Set the #EXT-X-PROGRAM-DATE-TIME

$ python3 hls-dl.py \
  --start-pdt=2021-01-01T00:00:00Z \
  --output-dir=my-stream \
  http://example.com/video/master.m3u8

The HLS video stream will be downloaded to the directory my-stream and available for playback with ffmpeg via:

$ ffplay my-stream/master.m3u8

Releases

No releases published

Packages

No packages published

Languages