πͺ A simple yet powerful YouTube downloader built around yt-dlp.
π This tool lets you download videos, audio, and thumbnails from YouTube with ease, while preserving proper metadata for all supported formats (.mp4, .opus, .webp).
π It also supports batch processing, so you can queue multiple links and let the tool handle everything automatically.
π½οΈ In addition, it comes bundled with a video compressor tool powered by HandBrakeCLI.
This is especially useful if you want to reduce the size of downloaded videos without losing much quality! β¨
π¦Ύ Whether you want clean audio files, original thumbnails, or smaller compressed video files, this project provides a streamlined workflow with minimal setup.
Follow these steps to set up the project on your system.
1οΈβ£ Install Python
This project requires Python 3.10 or above.
βοΈ Make sure Python is added to PATH βοΈ
(For that, during installation make sure to check the box that says:
β βAdd Python to PATHβ)
Verify installation by running:
python --version
You should see something like Python 3.11.6.
2οΈβ£ Clone the Repository
Make sure you have Git installed.
First select where you want to clone the project (Example - Make a new folder in Desktop, name it YT Downloader + Compressor and then open the folder, shift+right-click on it and click on Open in Terminal) and then run these commands in your terminal π»
Clone this repository
git clone https://github.com/RaneKun/YT-Downloader-by-Rane.git
3οΈβ£ Install Python Dependencies
This project uses a requirements.txt file for all dependencies. Run:
pip install -r requirements.txt
This will automatically install:
-> PyQt6 β GUI framework
-> ffmpeg-python β Python wrapper for FFmpeg
-> yt-dlp β YouTube downloader backend
-> requests β HTTP requests handling
-> mutagen β Metadata/tag editing
4οΈβ£ Install FFmpeg
This project requires FFmpeg (for video/audio processing).
πͺ Windows
Download a build for your specific OS from https://github.com/BtbN/FFmpeg-Builds/releases.
Extract the folder (e.g., ffmpeg-2025-win64) somewhere permanent (like C:\ffmpeg).
Add the bin folder to PATH:
Press Win + R β type sysdm.cpl β Advanced β Environment Variables.
Under System variables, select Path β Edit β New.
Add:
C:\ffmpeg\bin
Click OK on all windows.
Verify installation:
ffmpeg -version
π macOS (Homebrew)
brew install ffmpeg
π§ Linux (Debian/Ubuntu)
sudo apt update
sudo apt install ffmpeg
5οΈβ£ Install HandBrakeCLI (for optional video compression)
πͺ Windows
Download HandBrakeCLI from the official site: https://handbrake.fr/downloads2.php
Extract the folder (e.g., C:\HandBrake).
Add the folder containing HandBrakeCLI.exe to PATH (same steps as FFmpeg).
π macOS (Homebrew)
brew install handbrake
π§ Linux (Debian/Ubuntu)
sudo apt update
sudo apt install handbrake-cli
Verify installation:
HandBrakeCLI --version
6οΈβ£ Install Deno (JS runtime required by yt-dlp π¦)
yt-dlp needs a JavaScript runtime to solve YouTubeβs challenges and access all available formats. Without it, youβll get a warning and some formats may go missing in the future!
πͺ Windows β open PowerShell (not CMD!) and run:
irm https://deno.land/install.ps1 | iex
π macOS
brew install deno
π§ Linux
curl -fsSL https://deno.land/install.sh | sh
After installing, close and reopen your terminal, then verify with:
deno --version
You should see something like deno 2.x.x β
β and that warning will be gone for good π€π
If YouTube Downloader.pyw and Video Compressor.pyw opens successfully, youβre good to go π.
1οΈβ£ Copy and paste all YouTube video links, not playlists, not channels, only video links into that text box, one link per line β
2οΈβ£ Select download type, weather you wanna download video, audio or thumbnail or you can download all three at once, just clcik on the checkbox βοΈ
3οΈβ£ Select your output directory, default is C:\Users\Public\Videos (as shown in the screenshot below)
4οΈβ£ Finally hit the start button and wait for it to finish π
5οΈβ£ All of the necessary information, like the download progress, remaining files, file size, file name, eta, etc will be displayed at the bottom of the downloader in the Status part βοΈ
π£ Preview Links πποΈ
-> You can click on the Preview Link button to preview links before downloading them, this is especially useful during bulk downloading to check the links out before hitting download. ππ
-> It will show all the useful necessary information like thumbnail, title and channel name. ππΌοΈ
Note that after clicking this button, the UI will freeze temporarily until it is done processing everything in the background and then return back to normal πβοΈ
π£ Load Cookies πͺπ₯
-> You can click on the load cookies button to load your cookie file which will then allow you to download private/restricted content from youtube βπ
-> To get your cookie file you will need to download this very extention (note that other similar extentions also do work but the file name might need to be modified, the default file name that is accepted by this downloader is - www.youtube.com_cookies.txt) π°
-> Now to use this extention, simply open YouTube and then clcik on extentions -> Get cookies.txt LOCALLY and then hit Export which will then download the www.youtube.com_cookies.txt file. πͺ
-> You will need to load this cookie file into the downloader, but remember that this cookie file will expire within 15-30 minutes so you will need to repeat the process every now and then, and I have tried to make it permanent but this is a yt-dlp limitation and besides, there's a risk of getting your account banned if the cookie file never expires, so this is better anyways and don't worry, this is 100% safe, I have tried it with my very own account βπ
again, remember that there's no need of this step and this is completely optional if you're just downloading casual stuff from YouTube
π£Update yt-dlp β¬οΈπΊ
There is a handy-dandy button to update the yt-dlp fork which is the backbone of this downloader! You may need to update this once every 2 weeks because YouTube keeps modifying things to prevent downloaders from working and at the same time yt-dlp keeps updating so that downloaders do keep working... the classic cat and mouse chase π
-> To update yt-dlp with one click, simply click on the Check for yt-dlp update button and let it do it's thing! (_you can see the info inside the terminal and then close it manually when done _β
)
π Note: The update button always uses pip install -U "yt-dlp[default]" under the hood, which also keeps the yt-dlp-ejs scripts in sync with your yt-dlp version automatically β so you never have to worry about that separately π
-> If you want to grab all the links of a playlist or a channel and then copy paste them onto my downloader, then get this extention (or something similar) which will allow you to grab all the links of any playlist/channel. Thank me later ππ
I know, not many people are gonna be needing it really but I made it regardless because of two reasons
1οΈβ£ I needed it for my personal use, just like the downloader β
2οΈβ£ There is no option in my downloader to select the quality of the video file π«
Well am glad you asked! So most of it works the same way as the downloader, you just need to browse the input files (which are the downloaded files of off my downloader) and then hit Start to start the compression βοΈ
-> To tweak the compression swettings you will need to go to this directory first YT Downloader + Compressor by Rane\Main Files\Configs\Video Compressor and find the file called handbrake preset.json and edit it β
Easy way to do that is by installing handbrake, creating a custom preset there for your requirement, and then exporting that as a .json file β
π
Well good question lad! You can ofc use Handbrake here directly which has a far better UI than mine, (but not a cultured one π) but this compressor uses Handbrake CLI as mentioned before And another very important part handbrake won't retain metadata which is the whole reason why I started this project in the first place π€ But my compressor will retain all metadata just like how the downloader does π
--> And also my current handbrake preset.json config file is already a good balance between quality and file size which is good for both daily use and in use with my downloader π
Beacuse my downloader and compressor retains meta-data which other downloaders/compressors don't! (atleast all the ones which I have tried so far) π
Example π
My downloader and compressor is User-Friendly, Cultured (without any force π€£) and also has a built in Compressor that just works and is good for even everyday use π
If you wanna see what's happening in the background, everything, line-by-line, then just rename the extentions .pyw to .py and then run them on the terminal and check out all the debugging lines in detail βοΈ
Temp folder location - C:\Windows\Temp ποΈ
You can change the background (if you're shy π³ or wanna spice things up a little more π
) by going onto this directory - YT Downloader + Compressor by Rane\Main Files\Assests\YouTube Downloader and replacing the default_background.jpg file with something of your choice βοΈ
Aspect ratio won't really matter much as the UI is scalable but something 4:3 might still be better, just make sure the file name remains the same βοΈ
Go ahead and tweak these files however you like for personal use! Just please donβt re-upload or share my work elsewhere without credit. I couldβve made this closed-source, but I really believe in open-sourceβso letβs keep that spirit alive. π
Ad Astra Abyssosque people and Happy Downloading πβοΈ
