YT-DLP GUI - Graphical Interface for yt-dlp¶
A modern and user-friendly graphical interface for yt-dlp on Linux, developed in Python with Tkinter.
🚀 Features¶
- Integrated search: Search videos directly on YouTube from the application
- Temporary playback: Download and play videos without saving them permanently
- Permanent download: Save videos and audio to your downloads folder
- Information display: Shows thumbnails, duration, channel, views, and upload date
- Multiple formats: Supports video, audio-only (MP3), and automatic
- Persistent configuration: Saves your preferences between sessions
- Embedded console: Shows all yt-dlp output in real-time
- Sanitized names: Automatically converts spaces and special characters to safe filenames
- Customizable icon: Use your own 64x64 pixel icon
📋 Requirements¶
- Python 3.6 or higher
- yt-dlp
- PIL (Pillow) for displaying thumbnails
- tkinter (included in most Python installations)
- A multimedia player compatible with xdg-open
🔧 Installation¶
-
Install yt-dlp:
bash pip install yt-dlp -
Install Pillow:
bash pip install Pillow -
Download the file:
bash wget https://raw.githubusercontent.com/your-user/your-repo/main/yt_dlp_gui.py chmod +x yt_dlp_gui.py -
Run the application:
bash python3 yt_dlp_gui.py
🎯 Usage¶
Search Videos¶
- Type search terms in the text field
- Click "🔍 Search"
- Select a video from the results list
Get Information¶
- Enter a URL or search for a video
- Click "ℹ️ Info" to view video details
- A window will display thumbnail, duration, channel, views, and date
Download Videos¶
- Enter the URL or select a video from search
- Choose the format (Video, Audio Only, Automatic)
- Click "⬇️ Download" to save permanently
Temporary Playback¶
- Enter the video URL
- Click "▶️ Play (temporary)"
- The video downloads temporarily and plays automatically
- The temporary file is deleted after playback
Play Last Downloaded¶
- Click "🎬 Play Last" to play the last permanently downloaded file
⚙️ Configuration¶
The application automatically creates a configuration folder at ~/.config/yt-dlp-gui/ containing:
config.json: Application configurationultimo_descargado.txt: Last downloaded file informationicono.png: Custom icon (optional, 64x64 pixels)
Change Download Folder¶
- Click "📂 Change folder"
- Select the new destination folder
- Configuration is saved automatically
Custom Icon¶
To use your own icon:
1. Save a 64x64 pixel PNG file as icono.png
2. Place it in ~/.config/yt-dlp-gui/icono.png
3. Restart the application
🔧 Available Formats¶
- Video: Downloads the best available video quality
- Audio Only: Extracts only audio in MP3 format
- Automatic: Let yt-dlp choose the best format
🎨 Advanced Customization¶
JSON Configuration File¶
The config.json file in ~/.config/yt-dlp-gui/ can be manually edited to customize:
{
"carpeta_descarga": "/path/to/your/folder",
"formato_predeterminado": "video",
"calidad_maxima": "1080p",
"extraer_subtitulos": true,
"idioma_subtitulos": "en",
"prefijo_nombres": "",
"usar_proxy": false,
"proxy_url": ""
}
Visual Customization¶
- Custom icon: Place
icono.png(64x64px) in the configuration folder - Color theme: Modify color variables in the source code
- Window size: Automatically remembered between sessions
Modify yt-dlp Commands¶
You can customize commands by adding parameters in the code:
# For better audio quality
cmd = ["yt-dlp", "-f", "bestaudio", "--audio-quality", "0"]
# To include subtitles
cmd = ["yt-dlp", "--write-sub", "--sub-lang", "en,es"]
# To limit speed
cmd = ["yt-dlp", "--limit-rate", "1M"]
File Naming¶
The sanitizar_nombre() function can be modified to change how files are renamed:
- Default:
Video Title.mp4→Video-Title.mp4 - Customizable: Add dates, numbers, prefixes, etc.
📊 Usage Information and Limitations¶
Limits and Considerations¶
File sizes:
- 4K videos can exceed several GB
- High-quality audio: 100-300 MB per hour
- The application doesn't limit sizes, but consider disk space
Download speed:
- Depends on your internet connection
- Some sites limit download speed
- Popular videos usually download faster
Resource usage:
- CPU: Minimal during downloads, more usage during audio conversion
- RAM: 100-500 MB depending on video size
- Disk: Temporary files double the space needed during processing
Specific Formats and Qualities¶
Available video qualities:
- 4K (2160p) - Requires lots of space and bandwidth
- Full HD (1080p) - Ideal quality/size balance
- HD (720p) - Smaller size, good quality
- SD (480p, 360p) - For slow connections
Audio formats:
- MP3: More compatible, lower quality
- AAC: Better quality, smaller size
- FLAC: Maximum quality, large files
- OGG: Open source, good compression
Specific Use Cases¶
Work with live streams:
- Some streams can be downloaded while active
- Final quality depends on stream stability
- Files may be cut if stream is interrupted
Download only audio from music videos:
1. Select "Audio Only"
2. The resulting file will be MP3
3. Metadata like title and artist are preserved automatically
Large file management:
- 4K videos can take hours to download
- The application shows real-time progress
- You can close the application; downloads continue in background
Common Usage Troubleshooting¶
Video not available:
- Verify the URL is correct
- Some videos have geographic restrictions
- Private or deleted content is not accessible
Audio out of sync:
- Restart the download
- Try "Automatic" format
- Some videos have source issues
Very slow downloads:
- Switch to lower quality
- Check your internet connection
- Some sites limit speed by IP
Very large files:
- Use "Audio Only" for music
- Select lower qualities (720p instead of 1080p)
- Regularly clean temporary files
📁 File Structure¶
~/.config/yt-dlp-gui/
├── config.json # Application configuration
├── ultimo_descargado.txt # Last downloaded file
└── icono.png # Custom icon (optional)
🛠️ Troubleshooting¶
Error: yt-dlp not found¶
pip install --upgrade yt-dlp
Error: PIL not found¶
pip install Pillow
Error: Cannot play file¶
Install a compatible multimedia player:
# Ubuntu/Debian
sudo apt install vlc
# Fedora
sudo dnf install vlc
# Arch Linux
sudo pacman -S vlc
Files won't play¶
Verify that you have a multimedia player configured as default for the file type.
🎨 Technical Features¶
- Name sanitization: Automatically converts spaces and special characters to hyphens
- Separate threads: Download operations don't block the interface
- Memory management: Thumbnails are loaded asynchronously
- Temporary files: Temporary playback automatically cleans up files
- JSON configuration: Human-readable and manually editable configuration
📝 Key Differences¶
- Download: Saves the file permanently to your downloads folder
- Play: Downloads temporarily, plays, and automatically deletes the file
- Only permanent downloads are recorded in "Play Last"
🤝 Contributions¶
Contributions are welcome. Please:
1. Fork the project
2. Create a branch for your feature
3. Submit a pull request with a clear description
📄 License¶
This project uses the same licenses as the underlying software (yt-dlp, Python, PIL).
🔗 Related Links¶
Version: 2.1
Compatibility: Linux
Requirements: Python 3.6+, yt-dlp, PIL