Skip to content

clitic/vsd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

802 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vsd

Github Downloads Crate Downloads Crate Version Build Status Docs Status Crate License Repo Size

Video Stream Downloader is a command-line utility and rust library for downloading streams from DASH .mpd manifests and HLS .m3u8 playlists.

Features

  • DASH & HLS Support: Supports both DASH .mpd manifests and HLS .m3u8 playlists.
  • DRM Support: Decrypt protected content using keys acquired from Widevine and PlayReady license servers.
  • Subtitles Extraction: Extract subtitle tracks from fragmented mp4 streams.
  • Multi-threaded Downloads: Fetch media segments concurrently with customizable thread counts to maximize bandwidth.
  • Rust Library Support: Integrate vsd directly into your rust projects as a library.
  • Live Stream Downloading: Live stream downloading is not yet supported.

Dependencies

  • ffmpeg (optional, recommended) required for transmuxing streams.
  • chrome / chromium (optional) needed only for the capture sub-command.

Pre-built Binaries

Visit the releases page for pre-built binaries or grab the latest CI builds. Extract the binary and add its path to your system's PATH.

Packaging Status

Install via Cargo

You can also install vsd using cargo.

cargo install vsd

Additional Resources

Usage

Detailed usage examples are available on the usage page. For a complete list of commands and options, see the cli reference.

The main entry point is the save sub-command. It downloads streams from a DASH or HLS playlist. By providing an output path, you can optionally mux them into a single file using ffmpeg.

vsd save "https://media.axprod.net/TestVectors/Hls/not_protected_hls_1080p_h264/manifest.m3u8" -o output.mp4
Stream [vid] 1920x1080 | 4140k | avc1.640028… |   ? fps
Stream [vid]  1280x720 | 2982k | avc1.64001f… |   ? fps
Stream [vid]  1024x576 | 1799k | avc1.64001f… |   ? fps
Stream [vid]   640x360 | 1272k | avc1.64001e… |   ? fps
Stream [vid]   512x288 |  738k | avc1.640015… |   ? fps
Stream [vid]   384x216 |  617k | avc1.64000d… |   ? fps
Stream [aud]        en |     ? |            ? |   2 ch
Stream [aud]    en-low |     ? |            ? |   2 ch
Stream [aud]   en-high |     ? |            ? |   2 ch
Stream [sub]        fr |    ?k |            ? |
Stream [sub]        en |    ?k |            ? |
Stream [sub]        de |    ?k |            ? |
DownLd [vid] 1920x1080 4140k avc1.640028… ?fps
Saving [vid] vsd-vid-f3f2d26
[#(1/3) 258.3MiB/~258.3MiB(100%) PT:184/184 DL:1.2MiB ETA:0s]
Concat [vid] vsd-vid-f3f2d26.ts
DownLd [aud] en ? ? 2ch
Saving [aud] vsd-aud-8053bac
[#(2/3) 16.8MiB/~16.8MiB(100%) PT:184/184 DL:1.4MiB ETA:0s]
Concat [aud] vsd-aud-8053bac.ts
DownLd [sub] fr ?k ?
Saving [sub] vsd-sub-c7fc10a.vtt
[#(3/3) 15.7KiB/~15.7KiB(100%) PT:184/184 DL:2.0KiB ETA:0s]
Muxing [exe] ffmpeg -hide_banner -y -i vsd-vid-f3f2d26.ts -i vsd-aud-8053bac.ts -i vsd-sub-c7fc10a.vtt -map 0 -map 1 -map 2 -metadata:s:a:0 language=en -metadata:s:s:0 language=fr -disposition:a:0 default -disposition:s:0 default -c:v copy -c:a copy -c:s mov_text output.mp4

Library

Add this to your Cargo.toml file.

[dependencies]
vsd = { version = "0.5", default-features = false, features = ["rustls-tls"]}

Or add from command line.

cargo add vsd --no-default-features --features rustls-tls

See docs and examples to know how to use it.

Donate

This project is developed and maintained in my free time. Donations help cover development time, testing, and future improvements. If this tool saved you time or helped your workflow, consider supporting it.

License

Dual Licensed

About

A command-line utility and library for downloading streams from DASH .mpd manifests and HLS .m3u8 playlists.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors