Skip to content

πŸŽ™οΈ Real-time Spotify recorder with automatic track splitting, metadata tagging, and high-quality FLAC/OGG output. ⚠️ For personal use only.

License

Notifications You must be signed in to change notification settings

Danidukiyu/spytorec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ™οΈ SpytoRec – Spotify Track Recorder

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.


⚠️ Legal Disclaimer

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: Artist/Album/Track
  • 🧹 Audio Header Cleanup
  • πŸ”§ Config File and CLI Argument Support
  • πŸ’¬ Rich Terminal UI (rich)
  • πŸ–₯️ 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.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.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.py

πŸ› οΈ Usage & CLI

python spytorec.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.py                      # default run with config.ini
python spytorec.py record --format flac --organize
python spytorec.py list-devices
python spytorec.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

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)

🀝 Contributing

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


πŸ“œ License

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


πŸ‘€ Author

@Darkphoenix
GitHub: github.com/Danidukiyu

About

πŸŽ™οΈ Real-time Spotify recorder with automatic track splitting, metadata tagging, and high-quality FLAC/OGG output. ⚠️ For personal use only.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages