Skip to content

Instantly share code, notes, and snippets.

@kowalcj0
Created November 27, 2019 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kowalcj0/076d4c0d73fd8a8bb4412885902c6698 to your computer and use it in GitHub Desktop.
Save kowalcj0/076d4c0d73fd8a8bb4412885902c6698 to your computer and use it in GitHub Desktop.
Download all songs from a YT playlist in parallel and convert to 192kbps mp3
function dlistmp3() {
youtube-dl -j --flat-playlist "${1}" |\
jq -r '.id' |\
sed 's_^_https://www.youtube.com/watch?v=_' |\
parallel -j4 'youtube-dl -f bestaudio --extract-audio --audio-format mp3 --audio-quality 192K --embed-thumbnail --add-metadata --no-post-overwrites --ignore-errors {}'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment