Cross-platform media downloader for YouTube and Spotify
Project description
๐ CrystalMedia
A hyper-interactive terminal downloader for YouTube MP4/MP3 with a live Rich UI.
โก Jump To
- ๐ 30-Second Quick Start
- ๐ฎ Interactive Walkthrough
- โจ๏ธ Controls Cheatsheet
- ๐ง Download Modes
- ๐ฅ๏ธ Live UI Preview
- ๐ Output Structure
- ๐ Requirements
- โ MIT License + Legal Warning
๐ 30-Second Quick Start
# From PyPI (recommended)
pip install crystalmedia
crystalmedia
# From source
git clone https://github.com/Thegamerprogrammer/CrystalMedia.git
cd CrystalMedia
pip install .
crystalmedia
On first launch, CrystalMedia runs a dependency preflight/status check and self-healing diagnostics. Runtime auto-install of dependencies is disabled for packaging safety; install/update dependencies through pip.
๐ฎ Interactive Walkthrough
When the app starts, the flow is designed to feel game-like and guided:
- Splash appears (
CrystalMedialogo + version) - Main menu opens (YouTube Video / YouTube Music / Spotify / Exit)
- You choose:
- Single item or playlist
- URL
- MP4 quality or MP3 bitrate
- JavaScript runtime preference (Auto / Deno-first / Node-first)
- Live UI kicks in:
- Header panel with current context
Progresspanel (single progress bar)Download Logpanel (bounded recent yt-dlp events)
- On completion, timeout prompt waits for input (or auto-returns)
โจ๏ธ Controls Cheatsheet
| Action | Key |
|---|---|
| Move up/down in menu | โ / โ |
| Select menu item | Enter |
| Skip wait timer / continue now | Any key or Enter |
| Interrupt current flow | Ctrl + C |
๐ง Download Modes
๐ฌ YouTube Video (MP4)
- Quality presets: low โ best available
- Single or playlist
- Remux/postprocess handling with ffmpeg
๐ต YouTube Music (MP3)
- Bitrate presets: 96 โ 320 kbps
- Single or playlist
- Audio extraction postprocessing
๐ง Spotify (Exportify-first Playlist Mode)
- Single track: reads Spotify metadata and downloads via
yt-dlpsearch (with automatic browser-cookie fallback for age-restricted YouTube matches). - Playlist/album: Exportify CSV is the primary path.
- Open your playlist URL in CrystalMedia.
- CrystalMedia opens
vendor/exportify/index.htmlhelper + Exportify in browser. - Export the same playlist and save CSV in
./csv(next toCrystalMedia.py). - Filename matching is used as a hint; CrystalMedia will still try the newest CSV if names do not match.
- CrystalMedia reads that CSV and downloads each song via
yt-dlpsearch.
If no CSV is found, CrystalMedia attempts direct Spotify page scraping fallback.
๐ช Age-restricted YouTube matches (Spotify fallback)
- CrystalMedia now auto-tries
yt-dlp --cookies-from-browserprofiles when YouTube returns age/sign-in restrictions. - For best results, sign in to YouTube in your normal (non-incognito) browser profile first.
- If browser-cookie extraction still fails, export a Netscape cookies file and pass it manually in yt-dlp workflows.
๐ฅ๏ธ Live UI Preview
CrystalMedia uses a fixed Rich layout to keep output readable:
- Header panel: logo + current download context
- Progress panel: one progress bar (download/processing/merging)
- Download Log panel: compact rolling logs with truncation + color tags
This minimizes noisy terminal spam and keeps the interface focused.
๐ Output Structure
CrystalMedia/
โโโ downloads/
โ โโโ YT VIDEO/
โ โ โโโ Single/
โ โ โโโ Playlist/
โ โโโ YT MUSIC/
โ โ โโโ Single/
โ โ โโโ Playlist/
โ โโโ SPOTIFY/
โ โโโ Single/
โ โโโ Playlist/
โโโ logs/
โโโ log.txt
โโโ crash.txt
โโโ deps.txt
๐ Requirements
- Python 3.8+
- Internet connection
- FFmpeg (app can help bootstrap if missing)
โ MIT License + Legal Warning
CrystalMedia is released under the MIT License (see LICENSE).
Important warning
- The MIT License allows broad use/modification/distribution of this software.
- It does not grant rights to download copyrighted media without permission.
- You are solely responsible for how you use this tool and for compliance with local laws/platform terms.
Use responsibly and only with content you are authorized to download.
๐งฏ Troubleshooting
- If terminal rendering looks off after a resize, return to the main menu and start the download again.
- Check
CrystalMedia/logs/crash.txtfor error traces andCrystalMedia/logs/deps.txtfor dependency snapshots after startup.
PRs are welcome for UI polish, reliability improvements, and Spotify-mode recovery when upstream ecosystem changes stabilize.
๐งพ Exportify CSV (Playlist) Quick Notes
- CSV files must be in
./csv(relative to where you runCrystalMedia.py). - Leave filename blank in prompt to auto-detect latest CSV in
./csvthat matches playlist name. - Playlist title is auto-derived from the Spotify playlist link and used for fuzzy CSV matching.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crystalmedia-3.1.9.tar.gz.
File metadata
- Download URL: crystalmedia-3.1.9.tar.gz
- Upload date:
- Size: 46.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
384956abd635ce452b7a1bf4fa373eae7c3bf61635d26fb6975f0d1804816cbd
|
|
| MD5 |
91bc86979527dad072a7b3b5bfc06c82
|
|
| BLAKE2b-256 |
06ddd70d5599993a5eb6fa1917792037721f74e7833194dd64e28bfb2d6b6869
|
File details
Details for the file crystalmedia-3.1.9-py3-none-any.whl.
File metadata
- Download URL: crystalmedia-3.1.9-py3-none-any.whl
- Upload date:
- Size: 33.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f66a6c1f0efd41244bd98b97469ed4f62ef8e3be79d0b2ab2d0c700e00e255ce
|
|
| MD5 |
bb0db8fd651065179e41eeaf1a2a8af9
|
|
| BLAKE2b-256 |
2c532d69054d8d45bc9013441af25ea008cadd75f68082d6f4135db145f4dacf
|