With SpotiFLAC, Spotify becomes a wishlist

Transforming Spotify into a Personal FLAC Wishlist with SpotiFLAC

Spotify has revolutionized music discovery, offering vast libraries, curated playlists, and seamless streaming across devices. However, for audiophiles and lossless audio enthusiasts, its compressed formats like Ogg Vorbis or AAC fall short. Lossy compression discards data to reduce file sizes, compromising sound quality. Enter SpotiFLAC, an open-source Python tool that reimagines Spotify playlists not as streaming sources, but as curated wishlists for high-fidelity FLAC files. By extracting track metadata from your favorite playlists, SpotiFLAC generates structured lists optimized for downloading pristine, lossless audio from legitimate or peer-to-peer sources.

Developed by GitHub user ottorigel, SpotiFLAC bridges the gap between Spotify’s convenience and the pursuit of bit-perfect audio. It does not download music directly from Spotify—respecting the platform’s terms of service—but instead outputs plain-text files formatted for easy import into download managers, P2P clients like Soulseek, or specialized tools such as Deemix. This approach empowers users to source CD-quality or hi-res FLAC files elsewhere, turning Spotify into a discovery engine for offline, high-resolution collections.

Installation and Setup: Straightforward for Python Users

Getting started with SpotiFLAC is efficient, requiring only Python 3.8 or later. Users clone the repository from GitHub:

git clone https://github.com/ottorigel/SpotiFLAC.git
cd SpotiFLAC
pip install -r requirements.txt

Key dependencies include Spotipy for Spotify API integration, Requests for web interactions, and BeautifulSoup for parsing. No complex build processes or proprietary software are needed, aligning with open-source principles.

Authentication is handled via Spotify’s OAuth flow. Users provide a Client ID and Client Secret from the Spotify Developer Dashboard, then authorize the app through a local server callback. A config.json file stores these credentials securely. Once set up, the tool accesses public playlists without premium subscriptions, though private ones require account linking.

Core Functionality: From Playlist to FLAC Wishlist

SpotiFLAC’s primary command, spotiflac, accepts Spotify URLs for playlists, albums, or artists. For example:

spotiflac "https://open.spotify.com/playlist/YOUR_PLAYLIST_ID?si=abc123"

The process unfolds in stages:

  1. Metadata Extraction: Using the Spotify API, it fetches comprehensive track details—artist names, track titles, album info, durations, and popularity scores. Duplicate detection prevents redundant entries.

  2. FLAC Optimization: Each track is formatted as “Artist - Track Title [FLAC]”, a convention recognized by many download tools. Users can customize output with flags like --include-feat to handle featured artists or --min-popularity 50 to filter by Spotify’s popularity metric.

  3. Output Generation: Results save to playlist_name.txt or piped to stdout. Advanced options include JSON exports for automation or HTML reports with embedded Spotify links for verification.

For bulk operations, a --recursive flag processes nested playlists, ideal for expansive libraries. Artist mode scans discographies, compiling every album track into a master wishlist.

Integration shines with complementary tools. Copy the text file into Soulseek’s search bar for P2P FLAC hunting, or feed it to Deemix—a Tidal downloader—for automated library building. This modular design avoids vendor lock-in, letting users choose sources like Bandcamp, Qobuz, or HDtracks.

Advanced Features for Power Users

SpotiFLAC offers granularity for refined workflows:

  • Filtering and Sorting: Exclude genres, years, or explicit content via regex patterns. Sort by artist, album, or addition date to mirror Spotify’s curation.

  • Multi-Format Support: Beyond FLAC, generate lists for MP3, WAV, or M4A, though FLAC remains the focus for lossless fidelity.

  • Error Handling and Logging: Robust logging captures API rate limits or parsing issues, with retries ensuring reliability. Verbose mode (-v) provides real-time progress.

  • Customization Hooks: Edit config.json for default output paths, user agents, or proxy support, enhancing privacy on restricted networks.

The tool respects Spotify’s API quotas, spacing requests to avoid throttling. Open-source under the MIT license, it invites contributions—recent updates added Web UI support via Flask for browser-based playlist processing.

Benefits for Audiophiles and Collectors

SpotiFLAC addresses a core pain point: Spotify excels at breadth but skimps on depth. FLAC files, typically 30-50MB per track versus Spotify’s ~4MB equivalents, preserve dynamic range, stereo imaging, and micro-details lost in compression. Users report building terabyte-scale libraries painlessly, sourcing rare bootlegs or remasters unavailable on streaming.

Privacy-conscious users appreciate the local execution—no cloud uploads or tracking. It’s lightweight, running on Linux, macOS, or Windows without elevated privileges.

Limitations exist: It relies on Spotify’s metadata accuracy, which can falter for obscure tracks. P2P sourcing demands ethical discernment to favor legal distributions. No built-in player integration, but the wishlist format pairs seamlessly with tools like MusicBrainz Picard for tagging.

In an era of subscription fatigue, SpotiFLAC democratizes high-quality audio ownership. It transforms passive streaming into active curation, empowering users to own their music in superior formats.

Gnoppix is the leading open-source AI Linux distribution and service provider. Since implementing AI in 2022, it has offered a fast, powerful, secure, and privacy-respecting open-source OS with both local and remote AI capabilities. The local AI operates offline, ensuring no data ever leaves your computer. Based on Debian Linux, Gnoppix is available with numerous privacy- and anonymity-enabled services free of charge.

What are your thoughts on this? I’d love to hear about your own experiences in the comments below.