Skip to content

RaneKun/YT-Downloader-by-Rane

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

48 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€„~ YT-Downloader-by-Rane ~πŸ€„

πŸ’ͺ 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.

Screenshot 2025-08-29 110855

πŸ›  Tech Stack

PyQt6 ffmpeg-python yt-dlp Requests Mutagen HandBrakeCLI ffmpeg

πŸ”§ Installation & 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”)

download-python-for-windows-5

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.

Screenshot 2025-08-29 115903

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 πŸŽ‰.

How to use it? πŸ€”

1️⃣ Copy and paste all YouTube video links, not playlists, not channels, only video links into that text box, one link per line βœ…

Screenshot 2025-08-30 093800

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 😁

Screenshot 2025-08-30 093823

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 βœ”οΈ

Screenshot 2025-08-31 131838

Additional Features βž•

🟣 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. πŸ“πŸ–ΌοΈ

Screenshot 2025-08-31 124451

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. πŸͺ

Screenshot 2025-08-31 125505 Screenshot 2025-08-31 125526 Screenshot 2025-08-31 125547

-> 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 πŸ‘Œ

🟣 Bonus Tip βœ¨πŸ—’οΈ

-> 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 πŸ˜πŸ‘

Now to talk about the Video Compressor πŸ“½οΈ

Screenshot 2025-08-31 135621

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 🫠

How does the video compressor work? πŸ€”

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 βœ…πŸ“

So do I even need to use your Video Compressor or can I directly use Handbrake? πŸ€”

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 πŸ˜„

How is your Downloader and Compressor any different and why should I use it? 🀨

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 πŸ’š

Screenshot 2025-08-31 143614

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 😁

This is for the curious geeks πŸ€“

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 πŸ—‘οΈ

Addional Customization πŸŽ¨πŸ–ŒοΈ

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 βœ”οΈ

One Last Thing ⚠️

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 😁✌️

About

User-Friendly - Video, Music and Thumbnail downloader for YouTube πŸ“½οΈ

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors