From c5d3eb3fe2a2418cd0c048befb5773a83f073ce9 Mon Sep 17 00:00:00 2001
From: clitic
Date: Sat, 8 Oct 2022 13:50:29 +0530
Subject: [PATCH] Release v0.2.0
---
BUILD.md | 138 ++++++++++++++++
CHANGELOG.md | 12 +-
Cargo.toml | 2 +-
README.md | 333 +++++++++++++--------------------------
images/showcase.gif | Bin 0 -> 524026 bytes
src/commands/mod.rs | 4 +-
src/commands/save.rs | 9 +-
src/download.rs | 85 +++++-----
src/merger.rs | 94 +++++------
src/progress/download.rs | 81 +++++-----
vsd-on-colab.ipynb | 10 +-
11 files changed, 393 insertions(+), 375 deletions(-)
create mode 100644 BUILD.md
create mode 100644 images/showcase.gif
diff --git a/BUILD.md b/BUILD.md
new file mode 100644
index 0000000..cfd7027
--- /dev/null
+++ b/BUILD.md
@@ -0,0 +1,138 @@
+# Building From Source
+
+1. Build and install [openssl](https://github.com/openssl/openssl) for your target platform.
+All openssl static builds used by vsd are available on [google drive](https://drive.google.com/drive/folders/11DaFm8pWwQoGpgbEbL8DmHce9ozTjWqz).
+
+2. Install [Rust](https://www.rust-lang.org)
+
+3. Download or clone repository.
+
+```bash
+git clone https://github.com/clitic/vsd.git
+```
+
+4. Install any C++ compiler and run cargo build command inside vsd directory.
+
+## Windows
+
+```powershell
+$env:x86_64_PC_WINDOWS_MSVC_OPENSSL_DIR="C:\openssl-3.0.5-VC-WIN64A-static"
+$env:x86_64_PC_WINDOWS_MSVC_OPENSSL_STATIC=$true
+$env:x86_64_PC_WINDOWS_MSVC_NO_VENDOR=$true
+cargo build --release
+```
+
+## Linux / MacOS
+
+```bash
+OPENSSL_STATIC=true cargo build --release
+```
+
+## Android (On Linux 64-bit)
+
+1. Install [NDK](https://developer.android.com/ndk/downloads)
+
+```bash
+$ wget https://dl.google.com/android/repository/android-ndk-r22b-linux-x86_64.zip
+$ unzip android-ndk-r22b-linux-x86_64.zip
+$ rm android-ndk-r22b-linux-x86_64.zip
+```
+
+2. Add android target aarch64-linux-android.
+
+```bash
+$ rustup target add aarch64-linux-android
+$ printf '\n[target.aarch64-linux-android]\nlinker = "aarch64-linux-android30-clang"\n' >> ~/.cargo/config.toml
+```
+
+3. Now compile with target aarch64-linux-android.
+
+```bash
+$ PATH=android-ndk-r22b/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH \
+ AARCH64_LINUX_ANDROID_OPENSSL_DIR=openssl-v3.0.5-static-aarch64-linux-android30 \
+ AARCH64_LINUX_ANDROID_OPENSSL_STATIC=true \
+ AARCH64_LINUX_ANDROID_OPENSSL_NO_VENDOR=true \
+ cargo build --release --target aarch64-linux-android
+```
+
+
+
+
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5dc4f1e..35f881c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+## [0.2.0] - 2022-10-08
+
### Added
- *DASH* support with decryption and subtitles.
@@ -14,13 +16,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- New singular progress bar for complete download progress.
- Better variant stream selection and display order.
- Improved support for playlists using byte range.
+- Improved *capture* and *collect* subcommands.
+ - Using response recieved url when using *capture* subcommand.
+ - Using chrome response for fetching playlists when using *collect* subcommand.
### Changed
- Default command is splitted into *save*, *capture* and *collect* subcommands.
-- Improved *capture* and *collect* subcommands.
- - Using response recieved url when using *capture* subcommand.
- - Using chrome response for fetching playlists when using *collect* subcommand.
+- Resume support is removed for now.
### Fixed
@@ -40,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.1.0] - 2022-06-22
-[Unreleased]: https://github.com/clitic/vsd/compare/v0.1.2...HEAD
+[Unreleased]: https://github.com/clitic/vsd/compare/v0.2.0...HEAD
+[0.2.0]: https://github.com/clitic/vsd/compare/v0.1.2...v0.2.0
[0.1.2]: https://github.com/clitic/vsd/compare/v0.1.0...v0.1.2
[0.1.0]: https://github.com/clitic/vsd/releases/tag/v0.1.0
diff --git a/Cargo.toml b/Cargo.toml
index 868f760..d869f58 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "vsd"
version = "0.2.0"
-description = "Command line program to download HLS and DASH streams"
+description = "Download video streams served over HTTP from websites, HLS and DASH playlists"
authors = ["clitic "]
repository = "https://github.com/clitic/vsd"
documentation = "https://docs.rs/vsd"
diff --git a/README.md b/README.md
index 723b2df..57b2a50 100644
--- a/README.md
+++ b/README.md
@@ -35,36 +35,23 @@
Try Without Install
-Command line program to download HLS video from websites and m3u8 links.
-
-Know more about HLS from [howvideo.works](https://howvideo.works) and
-[wikipedia](https://en.wikipedia.org/wiki/M3U).
-
-There are some alternatives to vsd but they lack in some features like [N_m3u8DL-CLI](https://github.com/nilaoda/N_m3u8DL-CLI) is not cross platform and [m3u8-downloader](https://github.com/llychao/m3u8-downloader) has very few customizable options. There are also options like [webvideo-downloader](https://github.com/jaysonlong/webvideo-downloader) which open websites using chrome and captures the m3u8 links and then download it. A similar functionality can achieved with vsd too by using *capture* and *collect* features.
+*vsd* is short form for video stream downloader. vsd is a command line program to download video streams served over HTTP from websites, [HLS](https://howvideo.works/#hls) and [DASH](https://howvideo.works/#dash) playlists.
-
+
## Features
-- [x] Captures m3u8 network requests from websites.
-- [x] Collects .m3u8, .mpd and subtitles from websites and save them locally.
-- [x] Custom headers, proxies and cookies.
-- [x] Inbuilt web scrapper for querying HLS and DASH links.
-- [x] Human friendly resolution and bandwidth based master playlist variants parsing.
-- [x] Multiple output formats which are supported by ffmpeg.
-- [x] Mux seperate video, audio and subtitle (webvtt) stream to a single file.
-- [x] Progressive binary merging of segments.
-- [x] Realtime file size estimation.
-- [x] Select standard resolution playlists like `HD`, `FHD` etc.
-- [x] Supports `AES-128` playlist decryption.
+- [x] Capturing network requests and collecting .m3u8, .mpd and subtitles from websites and save them locally.
+- [x] Muxing streams to single video container using ffmpeg.
+- [x] Singular progress bar for complete download process like an normal file download with relatime file size estimations.
+- [x] Supports `AES-128` and `CENC` playlists decryption.
+- [x] Supports HLS and DASH
- [x] Supports downloading in multiple threads.
-- [x] Supports resume and retries.
- [ ] GUI
-- [ ] Supports Dash (soon)
- [ ] Supports [SAMPLE-AES](https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/HLS_Sample_Encryption/Encryption/Encryption.html) playlist decryption.
-- [ ] Supports live stream download. (soon)
+- [ ] Supports live stream download.
See More
@@ -77,6 +64,8 @@ Dependencies
Visit [releases](https://github.com/clitic/vsd/releases) for prebuilt binaries. You just need to copy that binary to any path specified in your `PATH` environment variable.
+If you want to build vsd from it's source then checkout [BUILD.md](https://github.com/clitic/vsd/blob/main/BUILD.md)
+
### Through Cargo
```bash
@@ -86,13 +75,13 @@ cargo install vsd
### On x86_64 Linux
```bash
-curl -L https://github.com/clitic/vsd/releases/download/v0.1.2/vsd-v0.1.2-x86_64-unknown-linux-musl.tar.gz | tar xz
+curl -L https://github.com/clitic/vsd/releases/download/v0.2.0/vsd-v0.2.0-x86_64-unknown-linux-musl.tar.gz | tar xz
```
### On Termux (Android 11+)
```bash
-curl -L https://github.com/clitic/vsd/releases/download/v0.1.2/vsd-v0.1.2-aarch64-linux-android.tar.gz | tar xz -C $PREFIX/bin
+curl -L https://github.com/clitic/vsd/releases/download/v0.2.0/vsd-v0.2.0-aarch64-linux-android.tar.gz | tar xz -C $PREFIX/bin
```
```bash
@@ -106,16 +95,16 @@ Also, see [running on android](https://github.com/clitic/vsd/blob/main/docs/runn
For quick testing purposes you may use [https://test-streams.mux.dev](https://test-streams.mux.dev) as direct input. These streams are used by [hls.js](https://github.com/video-dev/hls.js) for testing purposes.
-- Downloading HLS video from a website, m3u8 url or from a local m3u8 file.
+- Downloading and saving HLS and DASH playlists to disk.
```bash
-$ vsd -o video.mp4
+$ vsd save -o video.mp4
```
- Collecting .m3u8 (HLS), .mpd (Dash) and subtitles from a website and saving them locally.
```bash
-$ vsd --collect
+$ vsd collect
```
## Help
@@ -125,211 +114,105 @@ $ vsd --help
```
```
-vsd 0.1.2
-clitic
-Command line program to download HLS video from websites and m3u8 links.
-
-USAGE:
- vsd.exe [OPTIONS]
-
-ARGS:
- url | .m3u8 | .m3u
-
-OPTIONS:
- -a, --alternative Download alternative streams such as audio and subtitles
- streams from master playlist instead of variant video streams
- -b, --baseurl Base url for all segments. Usually needed for local m3u8 file
- -h, --help Print help information
- -o, --output