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 README + Full Visual Walkthrough
- ๐ฎ 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.
It now also initializes output configuration once (crystalmedia_config.json) and defaults downloads/logs to CrystalMedia_output/ unless you choose a custom path.
๐งช Interactive README + Full Visual Walkthrough
Before install, you can explore a modern clickable mini site + complete visual docs:
- Interactive README (glass UI):
docs/interactive-readme.html - Pre-install demo:
docs/interactive-demo.html - PyPI page: https://pypi.org/project/crystalmedia/
On Windows, open
docs\interactive-readme.htmldirectly in your browser.
Full Screenshot Gallery (Setup + Functions + Troubleshooting)
Setup
Core UI
YouTube Functions
Spotify Functions
When You Get Stuck
๐ฎ 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 (all animated with the starfield):
- 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:
- Animated splash header: CrystalMedia logo + live starfield + 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_output/ # default root (configurable once at startup)
โโโ downloads/
โ โโโ YT VIDEO/
โ โ โโโ Single/
โ โ โโโ Playlist/
โ โโโ YT MUSIC/
โ โ โโโ Single/
โ โ โโโ Playlist/
โ โโโ SPOTIFY/
โ โโโ Single/
โ โโโ Playlist/
โโโ logs/
โโโ log.txt
โโโ crash.txt
โโโ deps.txt
crystalmedia_config.json # persists custom output_root
๐ Requirements
- Python 3.8+
- Internet connection
- FFmpeg (install via your OS package manager, or use Docker below)
๐ณ Docker (no host Python/FFmpeg install required)
If you prefer not to install Python/FFmpeg directly on your machine, run CrystalMedia in Docker:
docker build -t crystalmedia .
Linux/macOS:
docker run --rm -it \
-v "$(pwd)/CrystalMedia:/app/CrystalMedia" \
-v "$(pwd)/csv:/app/csv" \
crystalmedia
Windows PowerShell:
docker run --rm -it `
-v "${PWD}/CrystalMedia:/app/CrystalMedia" `
-v "${PWD}/csv:/app/csv" `
crystalmedia
This keeps your host clean while still running the full TUI flow.
โ 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.
- No Affiliation CrystalMedia is an independent, unofficial, community-developed project with no affiliation, endorsement, or partnership with YouTube, Google LLC, Spotify AB, or any related entities. Dependency Notices
- This project uses third-party libraries including yt-dlp and relies on user-provided data/credentials. The authors do not control, modify, or distribute these dependencies in any infringing manner. Takedown Compliance
- If you are a rights holder and believe content related to this project infringes your rights, contact [your email or GitHub issues] with a proper DMCA/copyright notice. We will comply with valid legal requests, including removal of repo access if required.
- Indemnification Clause (if you wanna go full corporate-scary)
- By using CrystalMedia, you agree to indemnify and hold harmless the authors, contributors, and any associated parties from any claims, damages, losses, liabilities, costs, or expenses (including attorneys' fees) arising from your use or misuse of the software.
CrystalMedia does not circumvent digital rights management (DRM).
It relies on publicly available interfaces and third-party libraries.
๐งฏ 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. - On unrecoverable errors, CrystalMedia shows a fatal error panel, writes details to
CrystalMedia/logs/crash.txt, and exits cleanly.
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-4.0.0.tar.gz.
File metadata
- Download URL: crystalmedia-4.0.0.tar.gz
- Upload date:
- Size: 60.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa9d480719fe1963bb21606ce47de9b019937c2fab73f5ce863d0376ac1130df
|
|
| MD5 |
472509a2cd31537e353282441898f568
|
|
| BLAKE2b-256 |
4dc3cc2824ea0c8aa69800fe988e18dd28831ccda27fc8bf8df56bdfa7ee0fb9
|
File details
Details for the file crystalmedia-4.0.0-py3-none-any.whl.
File metadata
- Download URL: crystalmedia-4.0.0-py3-none-any.whl
- Upload date:
- Size: 40.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 |
e977469336131075c9ea2157be982523b526d4b03696672e2f770c5b9695769d
|
|
| MD5 |
a38e1a0ca27137301216e8e22e5606a8
|
|
| BLAKE2b-256 |
a2c9ebfa673ef370f92fb00d1db22ed2b61f7d5b2c9f1463a9b547fb23beeff6
|