{"id":23802798,"url":"https://github.com/bleuzen/spotrec","last_synced_at":"2025-09-06T15:33:23.399Z","repository":{"id":32522882,"uuid":"133360109","full_name":"Bleuzen/SpotRec","owner":"Bleuzen","description":"Spotify desktop client recorder for PulseAudio","archived":false,"fork":false,"pushed_at":"2023-05-03T12:58:41.000Z","size":516,"stargazers_count":75,"open_issues_count":12,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-30T15:57:53.192Z","etag":null,"topics":["pulseaudio","spotify-desktop-client"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bleuzen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-14T12:52:01.000Z","updated_at":"2024-10-30T09:33:30.000Z","dependencies_parsed_at":"2023-02-13T23:45:25.111Z","dependency_job_id":null,"html_url":"https://github.com/Bleuzen/SpotRec","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bleuzen%2FSpotRec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bleuzen%2FSpotRec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bleuzen%2FSpotRec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bleuzen%2FSpotRec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bleuzen","download_url":"https://codeload.github.com/Bleuzen/SpotRec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232132016,"owners_count":18477060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pulseaudio","spotify-desktop-client"],"created_at":"2025-01-01T22:27:46.146Z","updated_at":"2025-01-01T22:27:46.290Z","avatar_url":"https://github.com/Bleuzen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpotRec\n\nPython script to record the audio of the Spotify desktop client using FFmpeg\nand PulseAudio\n\nAUR: https://aur.archlinux.org/packages/spotrec/\n\n\n\n## Usage\n\nIf you use the AUR package,\nyou can simply run:\n\n```\nspotrec\n```\n\nIf you have a GNU/Linux distribution with a different package manager system,\nrun:\n\n```\npython3 spotrec.py\n```\n\n\n\n### Example\n\nFirst of all run spotify.\n\nThen you can run the python script which will record the music:\n\n```\n./spotrec.py -o ./my_song_dir --skip-intro\n```\n\nCheck the  pulseaudio configuration:\n\n```\npavucontrol\n```\n\nPay attention to the red circles, everything else is muted and with volume set\nto 0%\n\n![playback tab](https://github.com/Bleuzen/SpotRec/raw/master/img/pavucontrol_playback_tab.jpeg)\n\nNote: actually \"Lavf...\" will appear after you start playing a song\n\n![recording tab](https://github.com/Bleuzen/SpotRec/raw/master/img/pavucontrol_recording_tab.jpeg)\n\n![output devices tab](https://github.com/Bleuzen/SpotRec/raw/master/img/pavucontrol_output_devices_tab.jpeg)\n\n![input devices tab](https://github.com/Bleuzen/SpotRec/raw/master/img/pavucontrol_input_devices_tab.jpeg)\n\n![configuration tab](https://github.com/Bleuzen/SpotRec/raw/master/img/pavucontrol_configuration_tab.jpeg)\n\nFinally start playing whatever you want\n\n\n## Hints\n\n- Disable volume normalization in the Spotify Client\n\n- Do not change the volume during recording\n\n- Use Audacity for post processing\n\n  * because SpotRec records a little longer at the end to ensure that nothing is missing of the song. But sometimes this also includes the beginning of the next song. So you should use Audacity to cut the audio to what you want. From Audacity you can also export it to the format you like (ogg/mp3/...).\n\n\n## Troubleshooting\n\nStart the script with the debug flag:\n\n```\n./spotrec.py --debug\n```\n\nIf one of the following scenarios happens:\n\n* you do not see something like the ffmpeg output, which should appear right\n  few seconds after the song start\n\n```\n# what you should see when ffmpeg is recording ...\nsize=56400kB time=00:00:04.15 bitrate= 130.7kbits/s speed=1x\n```\n\n* you do not see any \"Lavf...\" in the pavucontrol\n  [recording tab](https://github.com/Bleuzen/SpotRec/raw/master/img/pavucontrol_recording_tab.jpeg)\n* you get a stacktrace ending with:\n\n```\nValueError: invalid literal for int() with base 10: 'nput'\n```\n\nI would suggest you to:\n\n* quickly press the \"next song button\" and then the \"previous song button\" in\n  the spotify client\n* stop everything and start over, after some tries it usually works :)\n\n\n**Note: sometimes spotify detects when the user does not interact with the\napplication for a long time (more or less an hour) and starts looping over a\nsong, to avoid this scenario I would suggest to keep interacting with the\nspotify client.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbleuzen%2Fspotrec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbleuzen%2Fspotrec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbleuzen%2Fspotrec/lists"}