Skip to content

Instantly share code, notes, and snippets.

@theimpostor
Last active July 29, 2021 07:11
Show Gist options
  • Save theimpostor/8c35f6b602950ba5153043b444a29196 to your computer and use it in GitHub Desktop.
Save theimpostor/8c35f6b602950ba5153043b444a29196 to your computer and use it in GitHub Desktop.
download a youtube-dl playlist in parallel
PLAYLIST_URL=https://www.youtube.com/playlist?list=PLC89682017B43845D
PARALLEL=4
ARGS=" -f bestaudio -x --audio-format mp3"
youtube-dl -J $PLAYLIST_URL | jq -r '.entries[].webpage_url' | xargs -n 1 -P $PARALLEL youtube-dl $ARGS
# optional trim silence:
find . -maxdepth 1 -type f -name \*.mp3 -print0 | xargs -0 -n 1 -P 8 mp3splt -q -r -p min=2 -d trimmed -o '@f'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment