SpytoRec is a powerful, CLI-based tool to record your currently playing Spotify tracks in real-time, automatically split them, embed metadata (title, artist, album, cover art), and organize them in your personal music library.
β Intended strictly for personal archival use only.
This tool is for personal, non-commercial use.
Recording copyrighted content from Spotify may violate their Terms of Service or local copyright laws.
You are solely responsible for your usage. The developers of this tool assume no liability.
- π΅ Real-Time Recording (FLAC or OGG)
- π― Track Splitting via Spotify API
- πΌ Metadata Embedding: title, artist, album, and cover art
- βοΈ Background Finalization for smooth capture
- π File Organization: Artist/Album/Track
- π§Ή Audio Header Cleanup
- π§ Config File and CLI Argument Support
- π¬ Rich Terminal UI (
rich
) - π₯οΈ Cross-Platform: Windows, macOS, Linux
- Install Python 3.7+ from python.org
- Install FFmpeg:
- Download from gyan.dev FFmpeg builds
- Extract it and add the
/bin
folder to yourPATH
- Install VB-Audio Cable from vb-audio.com
- Clone the repo and install requirements:
git clone https://github.com/YOUR_USERNAME/SpytoRec.git cd SpytoRec pip install -r requirements.txt
- Set Spotify output to CABLE Input, and run:
python spytorec.py
- Install Python 3.7+ (via Homebrew or python.org)
- Install FFmpeg:
brew install ffmpeg
- Install BlackHole (2ch) via BlackHole GitHub
- Set Spotify output to BlackHole in System Preferences > Sound > Output
- Clone and install dependencies:
git clone https://github.com/YOUR_USERNAME/SpytoRec.git cd SpytoRec pip install -r requirements.txt
- Run the script:
python spytorec.py
- Install Python 3.7+,
ffmpeg
, andpavucontrol
:sudo apt update && sudo apt install python3 ffmpeg pavucontrol python3-pip pip install spotipy requests mutagen rich
- Load PulseAudio null sink:
pactl load-module module-null-sink sink_name=spytorec_sink
- Set Spotify output to Monitor of spytorec_sink using
pavucontrol
- Clone repo and run:
git clone https://github.com/YOUR_USERNAME/SpytoRec.git cd SpytoRec python3 spytorec.py
python spytorec.py [COMMAND] [OPTIONS]
Records and saves current Spotify track with metadata.
Lists FFmpeg-detected audio input devices.
Tests Spotify API credentials and shows current playback info.
python spytorec.py # default run with config.ini
python spytorec.py record --format flac --organize
python spytorec.py list-devices
python spytorec.py test-auth
- Tracks saved in chosen format and directory
- FLAC includes embedded album art
- Duplicate checking by track ID and filename
- Metadata includes artist, album, and title
- Rewrites headers using FFmpeg post-recording
Issue | Solution |
---|---|
No sound recorded | Verify Spotify is routed to virtual device |
"Device not found" | Run list-devices and use the full audio device name |
Beginning cut off | Lower --interval (e.g. 0.3 or 0.2) |
Corrupted duration | Ensure ffmpeg finalizer runs successfully |
Ads in recording | Use Spotify Premium (eventhough Ads won't recorded in Free Subscriptions) |
Pull requests and stars β are welcome!
Fork the repo, give it a star, and help build more useful tools for personal music archiving!
This project is licensed under MIT License
See LICENSE for details.
@Darkphoenix
GitHub: github.com/Danidukiyu