๐ŸŽ™๏ธ SpytoRec

June 28, 2026 ยท View on GitHub

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.


โœจ Features

  • ๐ŸŽต 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: Automatically sort by Artist/Album
  • ๐Ÿ›ก๏ธ Duplicate Detection & Auto-Skip via Blocklist
  • ๐Ÿ’ฌ Rich Terminal UI with Cross-Platform Keyboard Shortcuts
  • ๐Ÿ”” Webhook Notifications for session monitoring
  • ๐Ÿ–ฅ๏ธ Cross-Platform: Windows, macOS, Linux

๐Ÿ’ป Installation Guides

๐ŸชŸ Windows

  1. Install Python 3.7+ from python.org
  2. Install FFmpeg:
  3. Install VB-Audio Cable from vb-audio.com
  4. Clone the repo and install requirements:
    git clone https://github.com/YOUR_USERNAME/SpytoRec.git
    cd SpytoRec
    pip install -r requirements.txt
    
  5. Set Spotify output to CABLE Input, and run:
    python SpytoRec_v8.0.0.py
    

๐Ÿ macOS

  1. Install Python 3.7+ (via Homebrew or python.org)
  2. Install FFmpeg:
    brew install ffmpeg
    
  3. Install BlackHole (2ch) via BlackHole GitHub
  4. Set Spotify output to BlackHole in System Preferences > Sound > Output
  5. Clone and install dependencies:
    git clone https://github.com/YOUR_USERNAME/SpytoRec.git
    cd SpytoRec
    pip install -r requirements.txt
    
  6. Run the script:
    python SpytoRec_v8.0.0.py
    

๐Ÿง Linux (PulseAudio)

  1. Install Python 3.7+, ffmpeg, and pavucontrol:
    sudo apt update && sudo apt install python3 ffmpeg pavucontrol python3-pip
    pip install spotipy requests mutagen rich
    
  2. Load PulseAudio null sink:
    pactl load-module module-null-sink sink_name=spytorec_sink
    
  3. Set Spotify output to Monitor of spytorec_sink using pavucontrol
  4. Clone repo and run:
    git clone https://github.com/YOUR_USERNAME/SpytoRec.git
    cd SpytoRec
    python3 SpytoRec_v8.0.0.py
    

๐Ÿ› ๏ธ Usage & CLI

python SpytoRec_v8.0.0.py [COMMAND] [OPTIONS]

โ–ถ๏ธ record (or default)

Records and saves current Spotify track with metadata.

๐ŸŽ™๏ธ list-devices

Lists FFmpeg-detected audio input devices.

๐Ÿ” test-auth

Tests Spotify API credentials and shows current playback info.


๐Ÿงช Example Commands

python SpytoRec_v8.0.0.py                      # default run with config.ini
python SpytoRec_v8.0.0.py record --format flac --organize
python SpytoRec_v8.0.0.py list-devices
python SpytoRec_v8.0.0.py test-auth

๐Ÿ“ Output Features

  • 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

๐Ÿ’ก Troubleshooting

IssueSolution
No sound recordedVerify Spotify is routed to virtual device
"Device not found"Run list-devices and use the full audio device name
Beginning cut offLower --interval (e.g. 0.3 or 0.2)
Corrupted durationEnsure ffmpeg finalizer runs successfully
Ads in recordingUse Spotify Premium (eventhough Ads won't recorded in Free Subscriptions)

๐Ÿค Contributing

Pull requests and stars โญ are welcome!
Fork the repo, give it a star, and help build more useful tools for personal music archiving!


๐Ÿ™ Contributors

ContributorContribution
@electrodics-ship-itV8.0.0 optimized build โ€” real-time audio metering, state machine, watchdog, rotating logs, 24-bit FLAC, and cross-platform improvements (#6)

๐Ÿ“œ License

This project is licensed under MIT License
See LICENSE for details.


๐Ÿ‘ค Author

@Darkphoenix
GitHub: github.com/Danidukiyu