This project is deprecated and it will no longer be maintained. This program has been rewritten in Rust located at https://github.com/clitic/vsd.
command line program to download hls video streams from websites, m3u8 files and urls. What is m3u8 ?
a compact lightweight m3u8 downloader
- auto binary merge for ts segments
- auto decrypt for aes standard cbc encrypted playlists (beta)
- auto mux for seperate video, audio and subtitle (webvtt) stream
- capturing m3u8 links and urls from a website
- custom headers, proxies, key and iv
- downloading in multiple threads
- ffmpeg conversion integration
- gui support
- master m3u8 playlist parsing
- platform independent
- realtime file size prediction (arithmetic mean) and downloading speed
- resume and retry support
- supports live stream download
If you are distributing downloaded video streams, first ensure that you have rights for those video streams or files.
Requires*
- python3.6+ and pip
- ffmpeg (optional)
- chrome and chrome web driver (optional)
pip install https://github.com/clitic/vsdownload/archive/main.zip
Or you can also find a windows executable / gui wrapper from releases.
-
Capturing m3u8 files from website and downloading hls streams
vsdownload capture <website url> --driver <driver path>
vsdownload save log.json
- Downloading hls video streams from m3u8 files
vsdownload save <m3u8 url or file> -o video.mp4
In -o/--output flag, any ffmpeg supported extension could be provided
Add --no-cleanup flag to use resume capabilities
To use gui wrapper, first install PyQt6 and then run vsdownload-gui
$ pip install PyQt6
$ vsdownload-gui
You can also integrate vsdownload save and capture command in any python program. This is useful when you have to automate or create sub website m3u8 downloaders. First you can find or parse the m3u8 uri from a website then call vsdownload.save()
function in order to download it.
- save command function
from vsdownload import vsdownload
vsdownload.save("http://videoserver.com/playlist.m3u8", output="merged.mp4")
- capture and save command functions
from vsdownload import vsdownload
log_file = "stream_log.json"
vsdownload.capture("http://streamingsite.com/stream.html", "chromedriver.exe", output=log_file)
vsdownload.save(log_file, output="merged.mp4")
- calling vsdownload through subprocess
import subprocess
command_args = [
"vsdownload", # command
"save", # sub command
"http://videoserver.com/playlist.m3u8", # input
"-o", # extra options
"a.mp4" # output file
]
try:
subprocess.run(command_args, check=True)
except subprocess.CalledProcessError as e:
print(f"error code: {e.returncode}")
© 2021-22 clitic
This repository is licensed under the MIT license. See LICENSE for details.