Skip to content

Instantly share code, notes, and snippets.

@ohhdemgirls
Last active March 24, 2017 17:00
Show Gist options
  • Save ohhdemgirls/914e5993c364ea1395ac0814a167f219 to your computer and use it in GitHub Desktop.
Save ohhdemgirls/914e5993c364ea1395ac0814a167f219 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
set -u
yt_list="$1"
jbs="$2"
if [ ! -f "$yt_list" ]; then
echo "File $yt_list is missing"
exit 1
fi
cat $yt_list | parallel --jobs $jbs 'youtube-dl -ciw --restrict-filenames -o "%(upload_date)s-%(id)s-%(title)s.%(ext)s" --add-metadata --write-description --write-annotations --write-info-json --all-subs --write-thumbnail -f "bestvideo[height<=720]+bestaudio/best[height<=720]" --merge-output-format "mkv" {}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment