Skip to content

Instantly share code, notes, and snippets.

@ivanstepanovftw
Created November 17, 2022 07:08
Show Gist options
  • Save ivanstepanovftw/c2c9ad5f24be1c8aab19b0a8a9ab5bd1 to your computer and use it in GitHub Desktop.
Save ivanstepanovftw/c2c9ad5f24be1c8aab19b0a8a9ab5bd1 to your computer and use it in GitHub Desktop.

My youtube-dl scripts

  • video-dl - download videos via yt-dlp using aria2c with multiple connections.
  • playlist-dl - download playlist into folder using video-dl.

Works in WSL2.

Installation:

curl https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
sudo mv yt-dlp /usr/bin
sudo apt install -y python-aria2c ffmpeg
#!/usr/bin/env bash
ROOT_DIR=$( (cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P) )
"$ROOT_DIR/video-dl" -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" "$@"
#!/usr/bin/env bash
yt-dlp --external-downloader=aria2c \
--external-downloader-args '--min-split-size=1M --max-connection-per-server=16 --max-concurrent-downloads=16 --split=16' \
--no-part --write-thumbnail --embed-chapters \
"$@"
@ivanstepanovftw
Copy link
Author

ivanstepanovftw commented Apr 19, 2023

aria2c --min-split-size=1M --max-connection-per-server=16 --max-concurrent-downloads=16 --split=16 "$@"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment