Created
January 6, 2022 11:19
-
-
Save yoshi314/fa7233df33223394dc674e70b1dcf6c3 to your computer and use it in GitHub Desktop.
youtube-parallel-playlist-download
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# download youtube playlist in multithreaded fashion | |
YOUTUBE_DL=yt-dlp | |
YOUTUBE_DL_ARGS="-x --audio-format mp3 --add-metadata" | |
JOBS=10 | |
tempfile=$(mktemp) | |
[ $# -gt 0 ] || exit 0 | |
url=$1 | |
echo "getting ids for the playlist" | |
$YOUTUBE_DL --get-id ${url} > $tempfile | |
parallel -j $JOBS -a $tempfile $YOUTUBE_DL $YOUTUBE_DL_ARGS | |
rm $tempfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment