[GH-ISSUE #444] Add option to specify audio playback device #245

Open
opened 2026-03-02 23:45:53 +03:00 by kerem · 3 comments
Owner

Originally created by @aurismat on GitHub (May 3, 2024).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/444

Is your feature already implemented in the latest master?
Not that I am aware of; please correct me if that's the case.

Is your feature request related to a problem? Please describe.
I've been using spotify-player for a couple weeks now and it has been excellent for daily use, except for one issue that I have run into on my Windows system - I cannot specify the playback device to output to my virtual audio cables(which I use for leveling audio for specific app groups: music, games, other programs etc).

librespot, which from what I understand spotify-player depends on as a library, has this option built-in (-d flag), and I think it'd be useful to implement something to that extent to spotify-player.

I have attempted to specify the audio device in the config file via device = "Playback device's name", but it had no effect(from what I glanced over the source, only seems to parse options listed in docs/config.md#device-configurations?)

Describe the solution you'd like
I'd like to see one of these implementations added:

  • CLI option to specify the output device(similar to librespot, a -d flag) to override the playback device from the OS default;
  • Config option in the [device] block to specify the playback device, e.g. device = "Different playback audio device";
  • (Windows-specific) Allow Windows specified output(via "App volume and device preferences" menu) to specify which playback device should be used.

Describe alternatives you've considered
My current botched solution to this is to launch librespot in the background with my specified audio device and then point spotify-player's config to that, and kill librespot when I'm done with spotify_player but IMO that is not exactly an elegant solution when spotify-player already has librespot as a library, hence me creating this FR. Below is the script that I use to do this, it is a Powershell script(and a very crude one), but it does the job for my use case.

librespot -n "librespot" -F computer --device "Virtual audio cable device" -q -u <redacted> -p <redacted> &
$job_id = Get-Job | Where-Object { $_.Command -match "librespot" } | Select-Object -ExpandProperty Id
spotify_player
Remove-Job $job_id -Force

Additional context
I am not familiar with Rust myself, and I am aware that Windows support is probably low-priority, but I hope this FR will be considered. Thank you for your great work on this project!

Originally created by @aurismat on GitHub (May 3, 2024). Original GitHub issue: https://github.com/aome510/spotify-player/issues/444 **Is your feature already implemented in the latest `master`?** Not that I am aware of; please correct me if that's the case. **Is your feature request related to a problem? Please describe.** I've been using `spotify-player` for a couple weeks now and it has been excellent for daily use, except for one issue that I have run into on my Windows system - I cannot specify the playback device to output to my virtual audio cables(which I use for leveling audio for specific app groups: music, games, other programs etc). `librespot`, which from what I understand `spotify-player` depends on as a library, [has this option built-in](https://github.com/librespot-org/librespot/wiki/Options) (`-d` flag), and I think it'd be useful to implement something to that extent to `spotify-player`. I have attempted to specify the audio device in the config file via `device = "Playback device's name"`, but it had no effect(from what I glanced over the source, only seems to parse options listed in [docs/config.md#device-configurations](https://github.com/aome510/spotify-player/blob/master/docs/config.md#device-configurations)?) **Describe the solution you'd like** I'd like to see one of these implementations added: - CLI option to specify the output device(similar to `librespot`, a `-d` flag) to override the playback device from the OS default; - Config option in the `[device]` block to specify the playback device, e.g. `device = "Different playback audio device"`; - (Windows-specific) Allow Windows specified output(via "App volume and device preferences" menu) to specify which playback device should be used. **Describe alternatives you've considered** My current botched solution to this is to launch `librespot` in the background with my specified audio device and then point `spotify-player`'s config to that, and kill `librespot` when I'm done with `spotify_player` but IMO that is not exactly an elegant solution when `spotify-player` already has `librespot` as a library, hence me creating this FR. Below is the script that I use to do this, it is a Powershell script(and a very crude one), but it does the job for my use case. ```ps librespot -n "librespot" -F computer --device "Virtual audio cable device" -q -u <redacted> -p <redacted> & $job_id = Get-Job | Where-Object { $_.Command -match "librespot" } | Select-Object -ExpandProperty Id spotify_player Remove-Job $job_id -Force ``` **Additional context** I am not familiar with Rust myself, and I am aware that Windows support is probably low-priority, but I hope this FR will be considered. Thank you for your great work on this project!
Author
Owner

@paintthinnerrage commented on GitHub (May 4, 2024):

This can be done on windows. See: https://winaero.com/audio-output-device-apps-individually-windows-10/

<!-- gh-comment-id:2094103589 --> @paintthinnerrage commented on GitHub (May 4, 2024): This can be done on windows. See: https://winaero.com/audio-output-device-apps-individually-windows-10/
Author
Owner

@aurismat commented on GitHub (May 4, 2024):

Normally, under Windows it can be done and I'm well aware of it; except it doesn't do anything at all in the case of spotify-player, and I have verified this with OBS by capturing that specific virtual audio cable's output between what spotify-player does on it's own vs what is supposed to happen by utilizing librespot and pointing it to that audio device.

Current behaviour, where spotify-player does not remap to the virtual cable
image

What it should be doing, portrayed by having a librespot open and pointed to VB-Audio's Cable C Input. Note that Windows 10's audio device preferences has no effect over this.
image

<!-- gh-comment-id:2094116047 --> @aurismat commented on GitHub (May 4, 2024): Normally, under Windows it *can* be done and I'm well aware of it; except it doesn't do anything at all in the case of `spotify-player`, and I have verified this with OBS by capturing that specific virtual audio cable's output between what `spotify-player` does on it's own vs what is supposed to happen by utilizing `librespot` and pointing it to that audio device. Current behaviour, where `spotify-player` does **not** remap to the virtual cable ![image](https://github.com/aome510/spotify-player/assets/25552404/392c2048-6299-4c37-ac1f-411d16d8ced8) What it *should* be doing, portrayed by having a `librespot` open and pointed to VB-Audio's Cable C Input. Note that Windows 10's audio device preferences has no effect over this. ![image](https://github.com/aome510/spotify-player/assets/25552404/1f113f13-f635-4a36-ad35-6ea9a973032b)
Author
Owner

@instinctualjealousy commented on GitHub (Feb 10, 2025):

https://github.com/hrkfdn/ncspot/issues/925 spotify_player needs a backend-agnostic option to specify "backend_device" in its expected format like ncspot has. The name format of your audio devices can and will change depending on the backend you are using, but it's not hard to figure out rodio's format.

<!-- gh-comment-id:2648830663 --> @instinctualjealousy commented on GitHub (Feb 10, 2025): https://github.com/hrkfdn/ncspot/issues/925 spotify_player needs a backend-agnostic option to specify "backend_device" in its expected format like ncspot has. The name format of your audio devices can and will change depending on the backend you are using, but it's not hard to figure out rodio's format.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#245
No description provided.