Created
August 27, 2024 10:42
-
-
Save eyecatchup/79ee6845772171d73d3fbda3fe44148c to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env sh | |
# Downloads the audio of all videos of the given playlist, | |
# saves as mp3 /with metadata and square(!) thumbnail. | |
# Note: yt-dlp and ffmpeg are required. | |
# Use: ./yt-dlp-playlist.sh YT_PLAYLIST_ID | |
./yt-dlp --extract-audio --audio-format mp3 --audio-quality 0 \ | |
--add-metadata --embed-thumbnail --convert-thumbnails jpg \ | |
--ppa 'EmbedThumbnail+ffmpeg_o:-c:v mjpeg -vf crop="'"'"'if(gt(ih,iw),iw,ih)'"':'"'if(gt(iw,ih),ih,iw)'"'"'"' \ | |
-o "./%(playlist_index)s - %(title)s.%(ext)s" \ | |
https://www.youtube.com/playlist?list=$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment