2021-12-29 15:44:16 +00:00
# gst-plugins-spotify
This is a [GStreamer ](https://gstreamer.freedesktop.org/ ) plugin to read content from
[Spotify ](https://www.spotify.com/ ).
Make sure that your application follows [Spotify's design guidelines ](https://developer.spotify.com/documentation/general/design-and-branding/ )
to respect their legal/licensing restrictions.
## Spotify Credentials
2024-03-11 08:09:18 +00:00
This plugin requires a [Spotify Premium ](https://www.spotify.com/premium/ ) account.
If your account is linked with Facebook, you'll need to setup
a [device username and password ](https://www.spotify.com/us/account/set-device-password/ ).
2021-12-29 15:44:16 +00:00
2024-03-11 08:09:18 +00:00
Those username and password are then set using the `username` and `password` properties.
2021-12-29 15:44:16 +00:00
You may also want to cache credentials and downloaded files, see the `cache-` properties on the element.
## spotifyaudiosrc
The `spotifyaudiosrc` element can be used to play a song from Spotify using its [Spotify URI ](https://community.spotify.com/t5/FAQs/What-s-a-Spotify-URI/ta-p/919201 ).
```
gst-launch-1.0 spotifyaudiosrc username=$USERNAME password=$PASSWORD track=spotify:track:3i3P1mGpV9eRlfKccjDjwi ! oggdemux ! vorbisdec ! audioconvert ! autoaudiosink
2022-10-17 15:09:16 +00:00
```
The element also implements an URI handler which accepts credentials and cache settings as URI parameters:
```console
gst-launch-1.0 playbin3 uri=spotify:track:3i3P1mGpV9eRlfKccjDjwi?username=$USERNAME\&password=$PASSWORD\&cache-credentials=cache\&cache-files=cache
2021-12-29 15:44:16 +00:00
```