Created
March 12, 2021 16:00
-
-
Save zekroTJA/aa0a38d2550e9850fde2786107385ba7 to your computer and use it in GitHub Desktop.
Small bash script to download a whole YouTube playlist via youtube-dl and convert it to a desired format using ffmpeg.
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
FORMAT="ogg" | |
[ -z $2 ] || FORMAT=$2 | |
youtube-dl -citx $1 | |
mkdir out | |
for F in *; do | |
case "$F" in | |
(*.bash | *.sh) continue;; | |
*) | |
FNAME="${F%.*}" | |
ffmpeg -i "$F" "out/$FNAME.$FORMAT" | |
;; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment