vsd

Installation    |    Usage    |    Try Without Install

video stream downloader is a command line program to download video streams served over HTTP from websites, HLS and DASH playlists.

Features

See More

Installation

Dependencies

Visit releases for prebuilt binaries. Download and extract archive and copy vsd binary to any path. Now add that path to your PATH environment variable. Build instructions can be found here.

| Host | Architecture | Download | Install | |----------------------|--------------|------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------| | Android 11+ (Termux) | aarch64 | .tar.gz | command | | Linux | x8664 | .tar.gz | command | | MacOS 12.3+ | x8664 | .tar.gz | command | | Windows | x86_64 | .zip | |

Usage

For quick testing purposes you may use https://test-streams.mux.dev as direct input. These streams are used by hls.js for testing purposes.

bash $ vsd save <url> -o video.mp4

bash $ vsd collect <url>

Help

bash $ vsd --help

``` Download video streams served over HTTP from websites, HLS and DASH playlists

Usage: vsd.exe

Commands: capture Capture requests made to fetch playlists collect Collect playlists and subtitles from a website and save them locally decrypt Decrypt encrypted streams using keys extract Extract subtitles embedded inside an mp4 file merge Merge multiple segments to a single file save Download and save HLS and DASH playlists to disk help Print this message or the help of the given subcommand(s)

Options: -h, --help Print help information (use --help for more detail) -V, --version Print version information ```

bash $ vsd save --help

``` Download and save HLS and DASH playlists to disk

Usage: vsd.exe save [OPTIONS]

Arguments: http(s):// | .m3u8 | .m3u | .mpd | .xml

Options: -a, --alternative Download alternative audio or subtitles stream from playlist instead all streams. For downloading video stream only, use --skip flag --baseurl Base url for all segments. Usually needed for local m3u8 file -d, --directory Change directory path for temporarily downloaded files. By default current working directory is used -k, --key <|(base64:)KEY> Decryption keys for decrypting CENC encrypted streams. Key value should be specified in hex. Use base64: prefix if key is in base64 format. Streams encrypted with a single key can use --key base64:MhbcGzyxPfkOsp3FS8qPyA== like key format. Streams encrypted with multiple keys can use `--key eb676abbcb345e96bbcf616630f1a3da:100b6c20940f779a4589152b57d2dacb like key format. This option can be used multiple times -o, --output Mux all downloaded streams to a video container (.mp4, .mkv, etc.) using ffmpeg. Note that existing files will be overwritten and downloaded streams will be deleted --prefer-audio-lang Preferred language when multiple audio streams with different languages are available. Must be in RFC 5646 format (eg. fr or en-AU). If a preference is not specified and multiple audio streams are present, the first one listed in the manifest will be downloaded --prefer-subs-lang Preferred language when multiple subtitles streams with different languages are available. Must be in RFC 5646 format (eg. fr or en-AU). If a preference is not specified and multiple subtitles streams are present, the first one listed in the manifest will be downloaded -q, --quality Automatic selection of some standard resolution streams with highest bandwidth stream variant from playlist. possible values: [144p, 240p, 360p, 480p, 720p, hd, 1080p, fhd, 2k, 1440p, qhd, 4k, 8k, highest, max, select-later] [default: select-later] --raw-prompts Raw style input prompts for old and unsupported terminals --retry-count Maximum number of retries to download an individual segment [default: 15] -s, --skip Skip downloading and muxing alternative streams -t, --threads Maximum number of threads for parllel downloading of segments. Number of threads should be in range 1-16 (inclusive) [default: 5] -h, --help Print help information

Client Options: --cookies Enable cookie store and fill it with some existing cookies. Example --cookies "foo=bar; Domain=yolo.local" https://yolo.local. This option can be used multiple times --enable-cookies Enable cookie store which allows cookies to be stored --header Custom headers for requests. This option can be used multiple times --proxy-address Set http or https proxy address for requests --user-agent Update and set custom user agent for requests [default: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36"] ```

Alternatives

List of alternatives to vsd:

  1. N_m3u8DL-RE is the best alternative to vsd. It also supports live playlist which vsd doesn't. It doesn't come with features like capture and collect. Also, CENC encrypted playlist decryption is slow.
  2. N_m3u8DL-CLI is good but it is not cross platform.
  3. m3u8-downloader is also good but it has very few customizable options.
  4. webvideo-downloader opens websites using chrome and captures the m3u8 links and then downloads it. A similar functionality can achieved with vsd too by using capture and collect subcommands.
  5. dash-mpd-cli is very good for downloading DASH playlists. Also most of the vsd functionalities for parsing and downloading DASH playlists is taken for it's main project.

License

Dual Licensed