This repository contains a simple YouTube video downloader with a graphical user interface (GUI) built using Python. The application allows you to download YouTube videos by providing the video URL, selecting the desired video format, and quality. It utilizes the yt_dlp
library for downloading YouTube videos.
- Python: Make sure you have Python installed on your system.
- Libraries: Install the required libraries using the following command:
pip install Pillow customtkinter yt-dlp
- Run the Script: Execute the script in your preferred Python environment.
- Enter URL: Enter the YouTube video URL in the provided input field.
- Thumbnail Display: The thumbnail of the video will be displayed.
- Format and Quality Selection: Choose the video format (mp4 or mkv) and quality (144p, 240p, 360p, 480p, 720p, 1080p).
- Start Download: Click the "Download" button to initiate the download process.
os
: Provides a way of using operating system-dependent functionality.io
: Provides the Python interfaces to stream handling.re
: Regular expression operations.customtkinter
: A custom tkinter library.PIL
: Python Imaging Library for working with images.urllib.request
: Library for opening URLs.threading
: Provides thread-based parallelism.yt_dlp
: YouTube video downloader library.
reset_error_msg
: Resets the error message on the GUI.reset_thumbnail_msg
: Resets the thumbnail message on the GUI.reset_progress_label
: Resets the progress label on the GUI.place_thumbnail_image
: Downloads and displays the thumbnail image on the GUI.get_entry_url
: Extracts video information without downloading and displays the thumbnail.get_thumbnail
: Initiates the process of getting the thumbnail in a separate thread.on_progress
: Updates the progress bar and label during the download process.download
: Downloads the YouTube video based on the specified format and quality.download_video
: Initiates the video download process in a separate thread.app
: Sets up the GUI using custom tkinter elements and runs the main application.
- The downloaded videos will be saved in the "downloads" folder within the script directory.
- Ensure that the required libraries are installed before running the script.
- The GUI is designed using a custom dark theme for a better user experience.