Skip to content

Instantly share code, notes, and snippets.

@ohiofi
Created October 8, 2023 17:06
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 ohiofi/69239cb46ff312811e98f3112cf0d309 to your computer and use it in GitHub Desktop.
Save ohiofi/69239cb46ff312811e98f3112cf0d309 to your computer and use it in GitHub Desktop.
#!/bin/sh
for each in $(cat /Volumes/WDPassport2/YouTube/channel_list.txt )
do
printf $each
printf "\n"
/opt/local/bin/yt-dlp \
--ffmpeg-location /usr/local/bin/ffmpeg \
--autonumber-start 1 \
--force-ipv4 \
-f 'bestvideo[ext=mp4][vcodec!*=av01]+bestaudio[ext=m4a]/mp4' \
--cookies youtube.com_cookies.txt \
--restrict-filenames \
--download-archive /Volumes/WDPassport2/YouTube/download_log.txt \
--max-downloads 3 \
--write-info-json \
--write-thumbnail \
--add-metadata \
--hls-prefer-native \
-o "/Volumes/WDPassport2/YouTube/%(uploader)s/%(uploader)s.S$(date '+%m')E$(date +'%d')%(autonumber)1d.ep_%(title)s [%(id)s].%(ext)s" \
$each
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment