The YouTube Video Downloader is a cross-platform desktop application that provides a graphical user interface (GUI) for downloading videos and audio from YouTube. Built with the Tkinter library and utilizing yt-dlp for media retrieval, this application simplifies the process of obtaining YouTube content without requiring command-line expertise.
-
Python 3.8 or later must be installed on your system.
-
yt-dlp will be installed automatically by the application if not already present. Alternatively, you may install it manually:
pip install yt-dlp
-
ffmpeg is recommended for merging separate video and audio streams into a single file. It can be installed via your platform’s package manager:
- Linux (Debian/Ubuntu):
sudo apt update sudo apt install ffmpeg
- macOS (Homebrew):
brew install ffmpeg
- Windows: Download and install from the official ffmpeg website and ensure the executable is available in your
PATH.
- Linux (Debian/Ubuntu):
Clone the project from GitHub:
git clone https://github.com/foxxfiles/YouTubeVideoDownloader.git
cd YouTubeVideoDownloaderIt is recommended to use a virtual environment to isolate dependencies.
- Linux/macOS:
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt - Windows (PowerShell):
Ensure
python -m venv venv .\venv\Scripts\activate pip install -r requirements.txt
requirements.txtincludes:yt-dlp
Once dependencies are installed, launch the GUI:
python ytd.pyThe main window will appear, allowing you to enter a YouTube URL, choose download options, and initiate the retrieval process.
- URL Field: Enter the full YouTube video URL (e.g.,
https://www.youtube.com/watch?v=xxxxxxxxxxx). - Save Directory: By default, the application uses your system’s
Downloadsfolder. To change, click Browse and select a new folder. - Format Selection:
- Choose between MP4 (Video) or MP3 (Audio) by selecting the corresponding radio button.
- To select a specific format or quality, click View Formats. This retrieves available media streams via yt-dlp and displays them in a dropdown. Selecting an entry populates the Custom Format field with the appropriate format code (e.g.,
137+140for 1080p video + high-quality audio) citeturn1search3.
- Download:
- Click Download to start the retrieval process. The status bar will display real-time output from yt-dlp, and the progress bar indicates completion percentage.
- If downloading an MP3, the application downloads the best M4A audio and renames it to
.mp3. - If combining separate streams, ffmpeg is invoked to merge video and audio into a single MP4 container.
- Stop:
- At any point, click Stop to terminate the ongoing download. Any incomplete files will be cleaned up automatically.
- Clear:
- Click Clear to reset all fields and progress indicators to their default state.
For additional tutorials and updates, visit our YouTube channel: