Spotify Recorder

Moderator: Forum moderators

Post Reply
User avatar
fredx181
Posts: 3248
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 407 times
Been thanked: 1411 times
Contact:

Spotify Recorder

Post by fredx181 »

Record tracks, separately titled, numbered and tagged, from Spotify Web Player: https://open.spotify.com/ to mp3 @320 . It will check for if running the system with pulseaudio (or pipewire) or just 'plain' alsa.
This is for when you have a "Free" Spotify account (as far as I know :?: , with "Premium" you can download tracks, but these are DRM protected (restricted to be able to play only with the Spotify program (client), I think))
Record from soundcard (what-u-hear) and the recorded tracks will be titled, numbered and tagged, this works with 'dbus-send' scanning for 'org.mpris.MediaPlayer2.Player', that provides the info for e.g. title, album, artist.
Audio ads will be skipped from recording (btw, when using a browser like Brave or Librewolf (with builtin adblocker) these ads are skipped from playing anyway)
Attached: spotifytomp3-1.0.0-noarch.pet (includes gtkdialog/shell script spotifytomp3 in /usr/local/bin/)

Update 2024-09-21: v2.0.0, attached spotifytomp3-2.0.0-noarch.pet, see for changes info: https://forum.puppylinux.com/viewtopic. ... 61#p131461

spotifytomp3-2.0.0-noarch.pet
spotifytomp3 .pet package updated to v2.0
(8.99 KiB) Downloaded 34 times

Tested on BookwormPup64 (pipewire running, lame required to have installed), F96-CE (pulseaudio running (on my version), lame required to have installed) and FossaPup64 (with just 'plain' alsa running, requires ffmpeg installed edit: v2.0 uses arecord and lame instead of ffmpeg).
edit: and tested with some browsers, e.g. brave, firefox, librewolf. Running a browser with run-as-spot may not work as expected (see Help) (works ok on BookwormPup64 from what I tested).

More info: Contents of 'Help' (Help button from GUI):

*** Record tracks, titled, numbered and tagged from https://open.spotify.com/ ***

Recommended is to click '"'Record'"' first (after done making settings),
then AFTER that start the Spotify Web Player and play a track so it will be detected.
Next track played will be recorded then.
Be sure that no other mediaplayer is running, as it may conflict.

When the '"'Album Mode'"' box checked, recorded tracks will be saved (and tagged) in:
<outputdir>/<artist>/<album>/<title>

If not, recordings will be saved in:
<outputdir>/Recordings/<artist> - <album> - <title>

The latter is more suitable for collections e.g. Various artists.

When the '"'Browser runs as spot'"' box checked,
it will work only if a D-Bus session bus had been started for this user.
(otherwise '"'dbus-send'"' cannot find the title/album info)

For audio advertisements (if there are), recording will be skipped.

Screenshots:

Screenshot.png
Screenshot.png (80.11 KiB) Viewed 663 times
Screenshot(5).png
Screenshot(5).png (271.47 KiB) Viewed 663 times
User avatar
fredx181
Posts: 3248
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 407 times
Been thanked: 1411 times
Contact:

Re: Spotify Recorder

Post by fredx181 »

2024-09-21 Updated to version 2.0

User avatar
fredx181
Posts: 3248
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 407 times
Been thanked: 1411 times
Contact:

Spotify Recorder v2.0

Post by fredx181 »

Updated to v2.0, new attachment at First post
Changes are mostly focused on precision of track duration e.g. for when sound system is just 'plain' Alsa, arecord (and lame) will be used for capturing instead of ffmpeg (duration of the recorded tracks was often far from exact with ffmpeg). So not dependent anymore on ffmpeg.
And recording directly to the final filename e.g. <tracknumber>-<title> instead of recording to a temporary file first (also to improve duration precision, but may be different by a fraction of a second, also depends on the browser used, I have the most exact results with firefox for that).

Post Reply

Return to “Multimedia”