Skip to content

A Windows batch script that uses yt-dlp to download videos from YouTube and other supported platforms.

Notifications You must be signed in to change notification settings

jrcramos/video_downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Video Downloader

A Windows batch script that uses yt-dlp to download videos from an M3U playlist or directly from a website link.

Workflow

Prerequisites

Before using this script, you need to have the following installed:

  1. yt-dlp: Download from https://github.com/yt-dlp/yt-dlp
  2. ffmpeg: Download from https://ffmpeg.org/download.html
    • Extract ffmpeg to C:\ffmpeg so binaries are in C:\ffmpeg\bin

Setup Steps

Setup

Folder Structure

The following folder structure is recommended:

Folder Structure

Configuration

  1. Edit the downloader.bat file and update the following paths to match your system:
set "ytDlp=C:\Users\username\Videos\yt-dlp-master"     :: Path where yt-dlp.exe is located
set "cookies=C:\Users\username\Videos\yt-dlp-master"   :: Path where chrome cookie file is located
set "saveLocation=C:\Users\username\Videos"            :: Path where videos will be saved
set "ffmpeg=C:\ffmpeg"                               :: Path where ffmpeg is installed (binaries in bin subfolder)
  1. (Optional) If you want to use browser cookies for authentication:
    • Place your Chrome cookies file in the cookies directory
    • The script expects a file named chrome in the cookies path

Usage

  1. Double-click downloader.bat to run the script
  2. When prompted, enter:
    • Video URL (required): The URL of the video you want to download
    • File name (optional): Custom name for the output file. Press Enter to use the video's original title
    • Referer URL (optional): Only needed for some sites that require a referer header. Press Enter to skip

Script Interface

Script Interface

Example

================================
 YouTube Downloader Script
================================

Enter video URL: https://www.youtube.com/watch?v=example
Enter file name (optional, press Enter to use video title): my_video
Enter Referer URL (optional, press Enter to skip):

Features

  • Downloads best quality video and audio, then merges them
  • Downloads all available subtitles
  • Remuxes video to MP4 format
  • Supports multiple audio streams
  • Uses Chrome cookies for authenticated downloads
  • Allows custom output filenames
  • Supports sites requiring Referer headers
  • Continuous mode: Can download multiple videos without restarting the script

Troubleshooting

"yt-dlp is not recognized"

  • Verify the ytDlp path in the script points to the correct location of yt-dlp.exe

"ffmpeg not found"

  • Ensure ffmpeg is installed at C:\ffmpeg with binaries in C:\ffmpeg\bin
  • Or update the ffmpeg path in the script to your installation location

Download fails with authentication error

  • Make sure the chrome cookie file exists in the cookies directory
  • Try extracting fresh cookies from your browser

License

This project is provided as-is for personal use.

About

A Windows batch script that uses yt-dlp to download videos from YouTube and other supported platforms.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •