Skip to content

LRGEX/Video-links-downloader

Repository files navigation

Logo

LRGEX Video Downloader v4.0

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.

⚠️ Important Legal Notice

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.

πŸ†• What's New in v4.0 - REVOLUTIONARY RELEASE

πŸš€ COMPLETE AUTOMATION - ZERO SETUP REQUIRED

  • πŸ”§ 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.nz BREAKTHROUGH

  • βœ… 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

🎡 Enhanced Audio Processing

  • πŸ”„ 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

πŸ›‘οΈ Robust Error Handling

  • πŸ“ 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

✨ Features

  • 🌐 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 and Audio 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

πŸ”§ Requirements

  • 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.

πŸ“¦ Installation - SIMPLIFIED IN V4.0

πŸš€ Super Simple Setup (Recommended)

  1. Install Python 3.10+ (if not already installed)
  2. Download this script
  3. Run it - Everything else is automatic!
# Just run the script - it handles everything else!
python LRGEX_Video_Downloader.py

πŸ“‹ Traditional Setup (Optional)

If you prefer the traditional approach:

1. Install UV Package Manager

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

2. Clone the Repository

git clone <repository-url>
cd video-downloader

3. Install Dependencies

uv sync

πŸš€ Usage - SIMPLIFIED IN V4.0

🎯 For Non-Technical Users (Most Common)

  1. Put your video links in links.txt (one per line)
  2. Double-click or run the script
  3. Wait for downloads to complete
  4. Find your videos in Videos/ and audio in Audio/

That's it! No configuration, no setup, no technical knowledge required.

πŸ“ Step-by-Step Guide

1. Prepare Your Links

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

⚠️ Privacy Note: Never commit your links.txt file to version control as it may contain private URLs.

2. Run the Application

🎯 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

3. Automatic Setup (First Run)

On first run, the script will automatically:

  • βœ… Download FFmpeg (if needed)
  • βœ… Download Megatools (if MEGA links detected)
  • βœ… Create Videos/ and Audio/ folders
  • βœ… Start downloading your videos

4. Enjoy Your Downloads

  • πŸ“Ή Videos saved to Videos/ folder
  • 🎡 Audio extracted to Audio/ folder
  • πŸ“ Any errors logged to error_log.txt

πŸ“‚ Output Structure

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

πŸ› οΈ Building Executable

To create your own executable using PyInstaller:

1. Install PyInstaller

pip install pyinstaller
# or with UV:
uv add pyinstaller

2. Build the Executable

# 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

πŸ”§ Configuration

Supported Platforms

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

πŸ”₯ MEGA.nz - The V4.0 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

Hardware Acceleration

The application automatically detects and uses available hardware acceleration:

  • NVIDIA: NVENC encoding
  • AMD: AMF encoding
  • Intel: Quick Sync Video

πŸ› Troubleshooting

Common Issues

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

πŸ“ Error Logging

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

πŸ†˜ Getting Help

  1. Check error_log.txt for detailed error information
  2. Verify your links are valid and accessible
  3. Ensure internet connection for auto-downloads
  4. Try running as administrator if permission issues occur

πŸ“ Dependencies - AUTO-MANAGED IN V4.0

The script automatically manages all dependencies:

πŸ”„ Auto-Installed Python Packages:

  • yt-dlp: For YouTube and TikTok downloads
  • requests: For HTTP requests and downloads
  • mega.py: For MEGA.nz API (fallback support)

πŸ”§ Auto-Downloaded Tools:

  • FFmpeg: Video/audio processing (Windows: auto-download, Linux/Mac: system install)
  • Megatools: MEGA.nz downloads with proper decryption

πŸ“¦ pyproject.toml:

[project]
name = "lrgex-video-downloader"
version = "4.0.0"
dependencies = [
    "yt-dlp>=2023.12.30",
    "requests>=2.31.0",
    "mega.py>=1.0.8"
]

πŸ”„ Version History

v4.0.0 - REVOLUTIONARY RELEASE (January 2025)

  • πŸš€ 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

v3.9.0 (Previous)

  • Enhanced URL handling, improved download compatibility, fixed malformed URL issues
  • Added MEGA.py integration, fixed PyInstaller compatibility

v3.8.0

  • Enhanced error handling, improved UI
  • Multi-platform support implementation

v3.7.0

  • Added hardware acceleration support
  • Improved cross-platform compatibility

🎯 What Makes V4.0 Special?

Feature v3.9 v4.0
MEGA Downloads ❌ Broken βœ… Perfect
Setup Required ⚠️ Manual FFmpeg βœ… Zero Setup
Audio Extraction ⚠️ Manual βœ… Automatic
User Experience πŸ”§ Technical 🎯 One-Click
Dependency Management ⚠️ Manual βœ… Auto-Managed
Error Recovery ⚠️ Basic βœ… Bulletproof

V4.0 transforms this from a "technical tool" into a "just works" solution for everyone!

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ž Support

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