TheSecretJuice

๐ŸŽฌ yt-dlp-enhance

Interactive PowerShell wrapper for yt-dlp with cookie support, download archive, VLC streaming, and smart controls.

Script file: yt-dlp-enhance.ps1

๐Ÿ†• Whatโ€™s New (v2.0)

๐Ÿš€ Quick Start

# Interactive mode (easiest)
yt-dlp

# With URL
yt-dlp "https://youtube.com/watch?v=..."

# Quick download (best video)
yt-video "URL"

# Quick audio extraction
yt-audio "URL"

# Download playlist with archive (NEW)
yt-playlist "PLAYLIST_URL"

# Download with browser cookies (NEW)
yt-cookies "URL" chrome

# Show help (NEW)
yt-help

๐Ÿ“‹ Menu Options

Option Feature What it does
1 Best Video Downloads highest quality MP4
2 Audio Only Extracts and converts to MP3
3 Choose Quality Select from 360p to 4K
4 Playlist Video Downloads entire playlist
5 Playlist Audio Downloads playlist as MP3s
6 List Formats Shows all available formats
7 With Subtitles Embeds subtitles in video
8 With Thumbnail Embeds thumbnail image
9 Fast Download Quick 720p download
10 ๐Ÿ†• Stream to VLC Stream video to VLC player
11 Advanced Speed limit, dates, metadata, proxy, IP
12 Custom Command Enter your own yt-dlp flags

Before downloading, you can now configure cookies and user-agent to bypass blocks:

  1. No cookies - Default, no authentication
  2. Chrome cookies - Extract from Chrome browser
  3. Firefox cookies - Extract from Firefox browser
  4. Edge cookies - Extract from Edge browser
  5. Cookie file - Use existing cookies.txt file
  6. Export cookies - Save browser cookies to file for reuse

User-Agent Options:

  1. Default - yt-dlpโ€™s user-agent
  2. Chrome - Recommended for most sites
  3. Firefox - Alternative browser UA
  4. Custom - Enter your own UA string

When to Use Cookies:

๐Ÿ“š Download Archive (NEW)

Track downloaded videos to avoid re-downloading:

# Enable during interactive mode
yt-dlp "PLAYLIST_URL"
# Select archive option: 2

# Or use the quick alias
yt-playlist "PLAYLIST_URL"

How it works:

๐ŸŽฏ Common Usage

Download Best Video

yt-dlp "URL"
# Select option 1

Extract Audio

yt-audio "URL"
# Or: yt-dlp "URL" โ†’ option 2

Download with Cookies (Blocked Content)

# Method 1: Interactive
yt-dlp "URL"
# Select cookie option (2-4)
# Select user-agent (2 for Chrome)

# Method 2: Quick alias
yt-cookies "URL" chrome

Custom Filename

yt-dlp "URL"
# When prompted: Choose option 2 for custom naming
# Enter: "my-video-name"

Download Playlist

# With archive (recommended)
yt-playlist "PLAYLIST_URL"

# Or interactive
yt-dlp "PLAYLIST_URL"
# Enable archive: option 2
# Option 4: Video playlist
# Option 5: Audio playlist

Stream to VLC (NEW)

yt-dlp "URL"
# Option 10: Stream to VLC
# Plays instantly without downloading

Choose Quality

yt-dlp "URL"
# Option 3 โ†’ Select quality:
# 1080p, 720p, 480p, etc.

๐Ÿ”ง Advanced Features

Speed Limiting

yt-dlp "URL"
# Option 11 โ†’ 2
# Enter: 500K (or 1M, 2M, etc.)

Download by Date

yt-dlp "PLAYLIST_URL"
# Option 11 โ†’ 3
# Enter start date: 20240101
# Enter end date: 20241231

Custom Format Code

yt-dlp "URL"
# Option 6 to list formats
# Note format code (e.g., "137+140")
# Option 11 โ†’ 1
# Enter: 137+140

Full Metadata (Enhanced)

yt-dlp "URL"
# Option 11 โ†’ 4
# Downloads with thumbnail + metadata + subtitles embedded

Use Proxy (NEW)

yt-dlp "URL"
# Option 11 โ†’ 5
# Enter: http://proxy.example.com:8080

Specify Source IP (NEW)

yt-dlp "URL"
# Option 11 โ†’ 6
# Enter: 192.168.1.100
# Useful for multi-IP systems

๐Ÿ“ Default Locations

Downloads save to:

Download archive:

Exported cookies:

yt-dlp.exe auto-detected from:

โ“ Troubleshooting

โ€œyt-dlp.exe not foundโ€

Install yt-dlp first:

Invoke-WebRequest -Uri "https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe" -OutFile "$env:USERPROFILE\Downloads\yt-dlp.exe"

โ€œHTTP Error 403: Forbiddenโ€ (NEW)

This means the site is blocking yt-dlp. Solution:

yt-dlp "URL"
# Select cookie option: 2 (Chrome) or 3 (Firefox)
# Select user-agent: 2 (Chrome)
# Try download again

The script will auto-detect 403 errors and suggest this fix!

โ€œHTTP Error 429: Too Many Requestsโ€ (NEW)

Rate limited. Solutions:

  1. Wait 5-10 minutes and retry
  2. Use browser cookies (they have higher limits)
  3. Enable speed limiting (Option 11 โ†’ 2)
  4. Use download archive to avoid re-downloading

โ€œDownload failedโ€

Custom path not working

Audio conversion fails

yt-dlp needs ffmpeg for conversion:

# Download ffmpeg and add to PATH
# Or use option 2 which handles it automatically

The script will auto-detect ffmpeg issues and suggest installation!

VLC streaming not working (NEW)

# Install VLC Media Player
# Download from: https://www.videolan.org/
# Script will auto-detect VLC location

๐Ÿ’ก Tips & Tricks

Batch Downloads:

# Create a text file with URLs (one per line)
Get-Content urls.txt | ForEach-Object { yt-audio $_ }

Playlist Sync (NEW):

# First time: downloads all
yt-playlist "PLAYLIST_URL"

# Next time: only new videos
yt-playlist "PLAYLIST_URL"

Quick Playlist Audio:

yt-dlp "PLAYLIST_URL"
# Enable archive: 2
# Option 5 for all as MP3

Preview Before Download:

yt-dlp "URL"
# Option 6 to see all formats
# Then exit and decide

Best Quality Everything:

yt-video "URL"  # Fastest way

Download Age-Restricted Videos (NEW):

# Login to YouTube in your browser first
yt-cookies "URL" chrome

Stream Without Disk Space (NEW):

yt-dlp "URL"
# Option 10: Stream to VLC
# Watch instantly, no storage needed

Bypass Cloudflare (NEW):

yt-dlp "URL"
# Cookie: 2 (Chrome)
# User-Agent: 2 (Chrome)
# This combo works best for Cloudflare

๐ŸŽจ Color Guide

๐Ÿ“ Examples

Music Video Download:

yt-dlp "https://youtube.com/watch?v=..."
# Option 2 (Audio Only)

Tutorial Playlist:

yt-dlp "https://youtube.com/playlist?list=..."
# Archive: 2 (to skip already downloaded)
# Option 4 (Playlist Video)

Quick News Clip:

yt-dlp "URL"
# Option 9 (Fast Download)

Age-Restricted Video (NEW):

yt-cookies "https://youtube.com/watch?v=..." chrome

Blocked Region Video (NEW):

yt-dlp "URL"
# Cookie: 2 (Chrome)
# User-Agent: 2 (Chrome)
# Advanced โ†’ 5 (Use proxy)
# Enter proxy URL

Live Stream Recording (NEW):

yt-dlp "LIVE_STREAM_URL"
# Option 10: Stream to VLC (watch live)
# Or Option 1: Download (saves to file)

๐Ÿš€ Performance Tips

๐Ÿ›ก๏ธ Privacy & Security

Cookie Safety:

Best Practices:

๐Ÿ”— Quick Reference Card

yt-dlp              # Interactive mode
yt-video <url>      # Best video
yt-audio <url>      # Extract MP3
yt-playlist <url>   # Playlist with archive
yt-cookies <url>    # With browser cookies
yt-help             # Show all commands

Need help? Open an issue at github.com/mini-page/TheSecretJuice