sgithidownloader
A Python tool to download YouTube videos and audio in various high-quality formats with embedded thumbnails and metadata.
Features
- 🎬 Download individual YouTube videos or entire playlists
- 🎵 Support for multiple video formats (MP4, WebM, AVI, MKV)
- 🎧 Convert and download audio in various formats (Opus, MP3, FLAC, AAC, etc.)
- 🔄 Convert existing local audio and video files between supported formats
- 🖼️ Automatically embed video thumbnails as album art
- 📋 Include metadata (title, artist, album, date, description) in supported formats
- ✂️ Crop thumbnails to square format for better display
- 📊 Beautiful progress bars and colored output
- 🚀 Intuitive subcommand-based CLI interface
- 🌐 User-friendly web interface with real-time progress tracking
Installation
Prerequisites
- Python 3.8 or higher
- FFmpeg (for audio processing)
Install FFmpeg
On Ubuntu/Debian:
sudo apt update
sudo apt install ffmpeg
On macOS:
brew install ffmpeg
On Windows: Download from ffmpeg.org and add to PATH.
Install the Package
pip install sgithidownloader
For development:
git clone https://github.com/AceCJM/SgithiDownloader.git
cd SgithiDownloader
pip install -e .
Usage
The CLI uses a modern subcommand structure for clarity:
Download a Single Video
sgithidownloader video "https://www.youtube.com/watch?v=VIDEO_ID" -o /path/to/output/
Download Audio
sgithidownloader audio "https://www.youtube.com/watch?v=VIDEO_ID" -f opus -o /path/to/output/
Download a Playlist
sgithidownloader playlist "https://www.youtube.com/playlist?list=PLAYLIST_ID" -t audio -f mp3 -o /path/to/output/
List Available Formats
sgithidownloader formats
Convert A Local File
sgithidownloader convert ./input.wav -f mp3
sgithidownloader convert ./clip.mp4 -f webm -o ./converted/
Get Help
# General help
sgithidownloader --help
# Help for specific command
sgithidownloader video --help
sgithidownloader audio --help
sgithidownloader playlist --help
Web Interface
For users who prefer a graphical interface, SgithiDownloader includes a beautiful web UI:
sgithidownloader webui
This will start a local web server at http://localhost:5000 where you can:
- 📱 Use an intuitive form-based interface
- 📊 Monitor download progress in real-time
- 📁 Browse and download completed files
- 🎯 Select formats with visual options
- 🔄 Upload and convert existing local media files
- 📂 Choose custom output directories
Web UI Features
- Real-time Progress: Watch downloads progress with live updates
- Format Selection: Easy dropdown menus for video/audio formats
- Download History: View and download previously completed files
- Responsive Design: Works on desktop and mobile devices
- Background Processing: Downloads run in the background without blocking the UI
Command Reference
sgithidownloader video
Download a single YouTube video.
sgithidownloader video URL [OPTIONS]
Options:
-o, --output DIR: Output directory (default: current directory)-f, --format FORMAT: Video format (mp4, webm, avi, mkv) (default: mp4)
sgithidownloader audio
Download audio from a YouTube video.
sgithidownloader audio URL [OPTIONS]
Options:
-o, --output DIR: Output directory (default: current directory)-f, --format FORMAT: Audio format (best, aac, alac, flac, m4a, mp3, opus, vorbis, wav) (default: best)
sgithidownloader playlist
Download all videos from a YouTube playlist.
sgithidownloader playlist URL [OPTIONS]
Options:
-o, --output DIR: Output directory (default: current directory)-t, --type TYPE: Download type (video or audio) (default: video)-f, --format FORMAT: Format (depends on type - video: mp4/webm/avi/mkv, audio: opus/mp3/etc.) (default: mp4)
sgithidownloader formats
Display all available video and audio formats with descriptions.
sgithidownloader convert
Convert a local media file into another supported format.
sgithidownloader convert INPUT [OPTIONS]
Options:
-f, --format FORMAT: Target format (audio: aac, alac, flac, m4a, mp3, opus, vorbis, wav; video: mp4, webm, avi, mkv)-o, --output PATH: Output directory or output file path (default: alongside the input file)
sgithidownloader webui
Start the web interface for graphical downloads.
sgithidownloader webui
Description: Launches a local web server at http://localhost:5000 with a user-friendly interface for downloading YouTube content.
Examples
# Download a single video in MP4 format
sgithidownloader video "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -f mp4
# Download audio in high-quality Opus format
sgithidownloader audio "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -f opus -o ~/Music/
# Download an entire playlist as MP3 files
sgithidownloader playlist "https://www.youtube.com/playlist?list=PLrAXtmRdnEQy4qtr5G1G8jQGzq9j9j9j" -t audio -f mp3 -o ~/Music/Playlist/
# Download a playlist of videos
sgithidownloader playlist "https://www.youtube.com/playlist?list=PLrAXtmRdnEQy4qtr5G1G8jQGzq9j9j9j" -o ~/Videos/
# List all available formats
sgithidownloader formats
Supported Formats
Audio Formats
- best: Auto-select best quality (recommended)
- opus: High quality, supports metadata
- mp3: Universal compatibility, supports metadata
- flac: Lossless, high quality
- aac: Good quality, wide support
- m4a: AAC in MP4 container
- alac: Apple Lossless
- vorbis: Open source, good quality
- wav: Uncompressed
Video Formats
- mp4: Most compatible format
- webm: Open format, good compression
- avi: Legacy format
- mkv: Advanced container format
Note: Metadata embedding is only supported for opus and mp3 formats.
Dependencies
- yt-dlp: For downloading and extracting media
- mutagen: For embedding metadata in audio files
- pytube: For playlist handling
- rich: For beautiful console output
- tqdm: For progress bars
- pillow: For image processing
- requests: For downloading thumbnails
- flask: For the web interface
License
MIT License - see LICENSE file for details.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Disclaimer
This tool is for personal use only. Respect YouTube's terms of service and copyright laws. The author is not responsible for misuse.
Metadata
Release files for SgithiDownloader 2.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sgithidownloader-2.1.3.tar.gz | 20.0 kB | Without provenance | Details for sgithidownloader-2.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sgithidownloader-2.1.3-py3-none-any.whl | Python 3 | none | any | Details for sgithidownloader-2.1.3-py3-none-any.whl |
Total release size: 44.4 kB
Release files / sgithidownloader-2.1.3.tar.gz
| Download URL | sgithidownloader-2.1.3.tar.gz |
|---|---|
| Size | 20.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
559ee9133315fc3d3e16c1b0dbca5390a6a50aee2c2cfc3799dd811f6c852886
|
|
BLAKE2b-256 checksum How to use checksums |
9970a11cc68dc9ebfbf7aac0d49fdbda2b0f1de8724a6d42352700c662327cd4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / sgithidownloader-2.1.3-py3-none-any.whl
| Download URL | sgithidownloader-2.1.3-py3-none-any.whl |
|---|---|
| Size | 24.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ade6880b9da33957f6df6a395a7f6e27faebe73019a53d06841a8b9d89752bc
|
|
BLAKE2b-256 checksum How to use checksums |
95d5ec62927e2c34561e44dc6572972bafe4a7b9db3f3ff1f01e57c5e8302235
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for SgithiDownloader 2.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.