Spotify vMix Integration

The quickstart:

Create the App:

Our apps:

Well that codebase is outdated, but it was a good intro. Also tested some Curl requests, which you can generate via their console.

I think that this Python library, Spotipy will be our tool of choice. It’s open source on GitHub.

Here’s our endpoint reference:

Aadd our App Authorization creds to the (newly created vENV) environment into which we have installed Spotipy:

export SPOTIPY_CLIENT_ID='your-spotify-client-id'
export SPOTIPY_CLIENT_SECRET='your-spotify-client-secret'
export SPOTIPY_REDIRECT_URI='your-app-redirect-url'

Now let’s try running a demo script:

"collaborative": false,
"description": "Your daily update of the most played tracks in Germany right now.",
"external_urls": {
"spotify": ""
# etc…
"type": "playlist",
"uri": "spotify:playlist:37i9dQZEVXbJiZcmkrIHGU"

vMix will dynamically read from TXT, CSV, RSS, XML, Google Sheets files. What we want vMix to display is details about the current song like image, current cue location, total time, time left, etc…

To test continuously updating a file, I came up with:

import itertools
for i in itertools.count(start=0, step=1):
    f = open('info.txt', 'w')

Which doesn’t work because it leaves the output file (‘info.txt’) in frequent states of instability. Someone on Stack Overflow suggested this:

import os
import shutil
import itertools
for i in itertools.count(start=0, step=1):
    f = open('tmp', 'w')
    shutil.move('tmp', 'info.txt')

My guess is that this isn’t the approach we will ultimately use. Next thing I really need to do it develop a simple roadmap.

Leave a Reply

Your email address will not be published. Required fields are marked *