A powerful Python application for downloading videos and extracting audio from multiple platforms including YouTube, TikTok, and MEGA.nz. The application automatically organizes downloads into separate folders and provides advanced features like anti-bot detection, hardware acceleration, and completely automated dependency management.
This tool is for educational and personal use only.
- β Respect Copyright: Only download content you own or have permission to download
- β Follow Platform Terms: Comply with YouTube, TikTok, and MEGA.nz terms of service
- β Personal Use: This tool is intended for personal, non-commercial use
- β Fair Use: Ensure your usage complies with fair use and local copyright laws
LRGEX is not responsible for misuse of this software. Users are solely responsible for ensuring their usage complies with applicable laws and platform terms of service.
- π§ Auto-Dependency Management: Script automatically downloads and configures ALL tools (FFmpeg, Megatools)
- π¦ Self-Contained: No manual installation of external tools required
- π― One-Click Operation: Just run the script - everything else is handled automatically
- π Cross-Platform: Works on Windows, macOS, and Linux with zero configuration
- β MEGA Downloads Fixed: 100% working MEGA.nz downloads using latest megatools (July 2025)
- π Proper Decryption: Files are properly decrypted and playable (no more .bin files!)
- β‘ Reliable Performance: Stable downloads with built-in retry logic
- π₯ Auto-Setup: Megatools downloads and configures automatically on first MEGA link
- π Automatic Audio Extraction: Every video automatically gets audio extracted to MP3
- π― Smart Detection: Detects video formats and processes accordingly
- ποΈ High Quality: Preserves audio quality during conversion
- π Perfect Organization: Audio files automatically organized in separate folder
- π Comprehensive Logging: All failures logged with detailed error information
- οΏ½ Graceful Recovery: Script continues with remaining links if one fails
- π‘ User Guidance: Clear error messages with suggested solutions
- π― Non-Technical Friendly: Perfect for users without technical knowledge
- π Multi-Platform Support: Download from YouTube, TikTok, and MEGA.nz
- οΏ½ ZERO SETUP REQUIRED: Automatically downloads and configures all dependencies
- οΏ½ Perfect MEGA Support: Working MEGA.nz downloads with proper decryption (v4.0 breakthrough!)
- π΅ Automatic Audio Extraction: Every video gets MP3 audio extracted automatically
- π Smart Organization: Automatically organizes files into
Videos
andAudio
folders - π‘οΈ Anti-Bot Detection: 5 fallback strategies with browser cookie extraction (Chrome/Firefox/Edge)
- βοΈ Skip Existing Files: Intelligently skips files that already exist
- π Comprehensive Error Logging: Detailed error logging in
error_log.txt
- π¨ Enhanced Interface: Colored ASCII logo and user-friendly prompts
- β‘ Hardware Acceleration: GPU-accelerated encoding (NVIDIA/AMD/Intel)
- π Enhanced URL Handling: Robust malformed URL detection and sanitization
- π οΈ Cross-Platform: Works on Windows, macOS, and Linux
- π― One-Click Operation: Perfect for non-technical users
- Python 3.10+ (Only requirement - everything else is auto-installed!)
- Internet Connection (For auto-downloading dependencies)
That's it! No manual FFmpeg installation, no MEGA tools setup, no complex configuration.
- Install Python 3.10+ (if not already installed)
- Download this script
- Run it - Everything else is automatic!
# Just run the script - it handles everything else!
python LRGEX_Video_Downloader.py
If you prefer the traditional approach:
Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone <repository-url>
cd video-downloader
uv sync
- Put your video links in
links.txt
(one per line) - Double-click or run the script
- Wait for downloads to complete
- Find your videos in
Videos/
and audio inAudio/
That's it! No configuration, no setup, no technical knowledge required.
Create a file named links.txt
in the script directory and add your video links (one per line):
Example links.txt
content:
https://youtube.com/watch?v=dQw4w9WgXcQ
https://vt.tiktok.com/ZSjQpFGHq/
https://mega.nz/file/ABC123XY#secretkey
https://youtube.com/watch?v=oHg5SJYRHA0
links.txt
file to version control as it may contain private URLs.
π― Recommended Method (Works for everyone):
python LRGEX_Video_Downloader.py
Alternative Methods:
# Using UV (if installed)
uv run python LRGEX_Video_Downloader.py
# Using pre-built executable
./LRGEX_Video_Downloader_v4.0.exe
On first run, the script will automatically:
- β Download FFmpeg (if needed)
- β Download Megatools (if MEGA links detected)
- β
Create
Videos/
andAudio/
folders - β Start downloading your videos
- πΉ Videos saved to
Videos/
folder - π΅ Audio extracted to
Audio/
folder - π Any errors logged to
error_log.txt
The application creates the following directory structure:
project-directory/
βββ Videos/ # Downloaded MP4 videos
βββ Audio/ # Extracted MP3 audio files
βββ megatools/ # Auto-downloaded MEGA tools (if needed)
βββ ffmpeg.exe # Auto-downloaded FFmpeg (Windows, if needed)
βββ links.txt # Your input file with video links
βββ error_log.txt # Failed downloads log
βββ LRGEX_Video_Downloader.py # Main application script
To create your own executable using PyInstaller:
pip install pyinstaller
# or with UV:
uv add pyinstaller
# Basic build
pyinstaller --onefile --name="LRGEX Video Downloader v4.0" LRGEX_Video_Downloader.py
# With custom icon and optimizations
pyinstaller --onefile \
--exclude-module=pathlib \
--icon="path/to/your/icon.ico" \
--name="LRGEX Video Downloader v4.0" \
LRGEX_Video_Downloader.py
Platform | Support | Notes | v4.0 Status |
---|---|---|---|
YouTube | β Full | Includes shorts, playlists, live streams | β Enhanced |
TikTok | β Full | Direct video downloads, photo posts | β Improved |
MEGA.nz | β FIXED | Working downloads with proper decryption | π₯ BREAKTHROUGH |
- β 100% Working: Complete rewrite using latest megatools (July 2025)
- π Proper Decryption: Files are fully decrypted and playable
- π₯ Auto-Setup: Tools download automatically on first MEGA link
- β‘ Reliable: Stable downloads with built-in error handling
- π― Zero Setup: No manual configuration required
The application automatically detects and uses available hardware acceleration:
- NVIDIA: NVENC encoding
- AMD: AMF encoding
- Intel: Quick Sync Video
1. "Python not found" Error
- Install Python 3.10+ from python.org
- Ensure Python is added to your system PATH
2. MEGA Downloads (SOLVED IN V4.0)
- β MEGA downloads now work perfectly!
- β Auto-setup handles everything automatically
- β Files are properly decrypted and playable
3. No Audio Files Generated
- β Fixed in v4.0: Audio extraction is now automatic for all videos
- The script automatically detects video files and extracts MP3 audio
4. "FFmpeg Not Found" (SOLVED IN V4.0)
- β Auto-download: Script automatically downloads FFmpeg on first run
- β Cross-platform: Works on Windows, macOS, and Linux
5. Script Won't Run
- Ensure you have Python 3.10+ installed
- Check that you have an internet connection (for auto-downloads)
- Run with:
python LRGEX_Video_Downloader.py
All failed downloads are logged in error_log.txt
with detailed error messages:
- Network issues: Connection problems, timeout errors
- Invalid links: Expired or private content
- Platform errors: Service unavailability
- File system errors: Disk space, permissions
- Check
error_log.txt
for detailed error information - Verify your links are valid and accessible
- Ensure internet connection for auto-downloads
- Try running as administrator if permission issues occur
The script automatically manages all dependencies:
yt-dlp
: For YouTube and TikTok downloadsrequests
: For HTTP requests and downloadsmega.py
: For MEGA.nz API (fallback support)
- FFmpeg: Video/audio processing (Windows: auto-download, Linux/Mac: system install)
- Megatools: MEGA.nz downloads with proper decryption
[project]
name = "lrgex-video-downloader"
version = "4.0.0"
dependencies = [
"yt-dlp>=2023.12.30",
"requests>=2.31.0",
"mega.py>=1.0.8"
]
- π COMPLETE AUTOMATION: Zero setup required - script handles everything
- π₯ MEGA.nz BREAKTHROUGH: 100% working MEGA downloads with proper decryption
- π§ Auto-Dependency Management: Automatic FFmpeg and Megatools download/setup
- π΅ Enhanced Audio Processing: Automatic MP3 extraction for all videos
- π‘οΈ Bulletproof Error Handling: Comprehensive logging and graceful failure recovery
- π― Non-Technical Friendly: Perfect one-click operation for everyday users
- π¦ Self-Contained: No external tool installation required
- Enhanced URL handling, improved download compatibility, fixed malformed URL issues
- Added MEGA.py integration, fixed PyInstaller compatibility
- Enhanced error handling, improved UI
- Multi-platform support implementation
- Added hardware acceleration support
- Improved cross-platform compatibility
Feature | v3.9 | v4.0 |
---|---|---|
MEGA Downloads | β Broken | β Perfect |
Setup Required | β Zero Setup | |
Audio Extraction | β Automatic | |
User Experience | π§ Technical | π― One-Click |
Dependency Management | β Auto-Managed | |
Error Recovery | β Bulletproof |
V4.0 transforms this from a "technical tool" into a "just works" solution for everyone!
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
For support and questions:
- Create an issue on GitHub
- Check the troubleshooting section above
- Review the error logs in
error_log.txt
Developed by LRGEX | Empowering digital content management