Skip to content

Instantly share code, notes, and snippets.

@noaione
Last active March 4, 2024 23:15
Show Gist options
  • Save noaione/42a8cab9e8b8152ad71e6958a8174bd6 to your computer and use it in GitHub Desktop.
Save noaione/42a8cab9e8b8152ad71e6958a8174bd6 to your computer and use it in GitHub Desktop.
wrap yt-dlp best quality download thingamagic so i can save vtuber stream agane in best quality

You need:

  • yt-dlp (duh)
  • YouTube premium
  • Cookies 🍪

Download quality:

  • YouTube: Highest VP9 (Premium?) + OPUS Audio
  • Twitch: Source quality

Instructions:

  1. Grab your browser cookies/youtube cookie with any tools
    • With yt-dlp: yt-dlp -F --cookies-from-browser --cookies cookies.txt <any video>
  2. Make a new folder structure like this:
    • [root]
      • cookies.txt
      • VTuber Name
        • archive.sh
  3. Run archive.sh: ./archive.sh <link>
#!/bin/bash
yt-dlp --cookies ../cookies.txt -f "bestvideo[ext=mp4]+bestaudio[ext=webm]/bestvideo+bestaudio/best" -o "[%(upload_date)s] %(title)s.%(ext)s" --merge-output-format mkv $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment