Download YouTube videos and audio easily with this free, open-source graphical user interface (GUI) application. Built with Python and PyQt6, it leverages the powerful yt-dlp
library to provide a simple way to save YouTube content directly to your computer (Windows, macOS, Linux).
- Easy URL Input: Paste YouTube video URLs directly.
- Fetch Formats: Retrieve available video and audio formats before downloading.
- Format Selection:
- Choose to download the best available video quality (muxed with best audio).
- Select specific video-only formats (will be muxed with best audio).
- Choose to download the best available audio-only format.
- Select specific audio-only formats.
- Audio/Video Download: Download either the full video or just the audio stream.
- Cookie Support: Option to use cookies from Firefox or Chrome to download age-restricted or private videos (requires browser login).
- Custom Download Location: Choose where to save your downloaded files.
- Progress Display: Real-time progress bar showing download percentage, speed, and size.
- Open Download Folder: Quickly open the folder containing your downloads.
- Cross-Platform: Should work on Windows, macOS, and Linux (executable provided for Windows).
-
Download the latest
.exe
file from the Releases page. -
Double-click the downloaded
.exe
file to run the application. No installation is required.Note on Virus Detection: Executables created with tools like PyInstaller are sometimes flagged as potentially unwanted programs (PUPs) or viruses by antivirus software. This can happen because the executable bundles Python and its libraries, which might trigger heuristic detection. The use of modules like
os
andsubprocess
for file system interaction (like opening the download folder) can also contribute. The code is open-source, so you can inspect it yourself. If you encounter a warning, you may need to add an exception in your antivirus software.
-
Prerequisites:
- Python 3.13 or later (as specified in
pyproject.toml
). uv
(Python package installer and virtual environment manager). You can install it following the instructions here.ffmpeg
(Required byyt-dlp
for merging formats). Make sure it's installed and accessible in your system's PATH, or place theffmpeg.exe
(and related.dll
files) in theffmpeg/bin
subdirectory alongsidedownloader.py
if running from source, or ensure the PyInstaller build includes it correctly.
- Python 3.13 or later (as specified in
-
Clone the repository:
git clone https://github.com/SSujitX/youtube-downloader.git cd youtube-downloader
-
Create a virtual environment and install dependencies:
It's recommended to use a virtual environment.
uv
can create one and sync dependencies frompyproject.toml
anduv.lock
in one step:# Create a virtual environment named .venv (if it doesn't exist) # and install dependencies from pyproject.toml/uv.lock uv sync
-
Run the application:
Activate the virtual environment first (the command depends on your shell, e.g.,
.venv\\Scripts\\activate
on Windows Command Prompt/PowerShell, orsource .venv/bin/activate
on Linux/macOS/Git Bash). Then run:# Or, run directly using uv without activating the environment uv run python youtube_gui.py
If you want to build the executable yourself:
-
Ensure
uv
is installed and you have synced the environment (uv sync
). -
Install PyInstaller into your environment:
uv run pip install pyinstaller
-
Ensure
ffmpeg
binaries are correctly placed (e.g., in anffmpeg/bin
folder). -
Ensure the icon file (
yt.ico
oryt.png
) is present. -
Run PyInstaller using
uv run
(adjust paths and options as needed):# Example using yt.ico uv run pyinstaller --onefile --windowed --icon=yt.ico --add-data "ffmpeg;ffmpeg" --add-data "yt.ico;." youtube_gui.py # Example using yt.png # uv run pyinstaller --onefile --windowed --icon=yt.png --add-data "ffmpeg;ffmpeg" --add-data "yt.png;." youtube_gui.py
--onefile
: Creates a single executable file.--windowed
: Prevents the console window from appearing.--icon
: Sets the application icon.--add-data "ffmpeg;ffmpeg"
: Bundles theffmpeg
directory.--add-data "yt.ico;."
or--add-data "yt.png;."
: Bundles the icon file.
The executable will be located in the
dist
folder.
Contributions are welcome! If you have suggestions for improvements or find any bugs, please feel free to open an issue or submit a pull request directly against the master
branch.
- Fork the Project
- Make your changes
- Commit your Changes (
git commit -m 'feat: Add some AmazingFeature'
) - Push to your Fork (
git push origin master
) - Open a Pull Request targeting the
master
branch of this repository.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- yt-dlp: The core library used for interacting with YouTube and downloading videos. (yt-dlp GitHub)
- PyQt6: The GUI framework used to build the application interface. (PyQt Website)
- Rich: Used for enhanced logging in the backend. (Rich GitHub)