Support & Community Forum
Get answers from our staff and other members of the XSplit community!

"NowPlaying" from Spotify, the easy way

Simple and Advanced guides about Broadcaster.
Forum rules This section is for Guides & Tutorials only. Don't post your questions and bug reports here please (or else it will be deleted).

"NowPlaying" from Spotify, the easy way

by numrii » Mon May 14, 2012 1:08 am

Let's begin by getting the legal mumbo-jumbo out of the way.
This program is provided as is, I take no responsibility for damage caused directly or indirectly from using this application. Use at your own risk.

While looking around i noticed there's alot of plug-ins for adding your current playing song to your stream for both Winamp and Foobar. But getting the same functionality out of Spotify seemed to be alot more of a hassle.

However, I wrote a nifty little application in AutoIt that will provide this single function at a minimal resource cost.

If you do not trust pre-compiled binaries please compile your own from the source. (You'll need to download AutoIt for that.)

Source: Click Here (Source is also available in au3 format in the ZIP archive below.)

x86 Binaries: Click Here
md5 hash: 2f958db18a12129ad7f13eb626cf1d9a

To make sure the integrity of the archive has not been tampered with compare the md5 checksum of the archive with the hash above.
If there is the slightest mismatch in the checksum PM me ASAP and under no circumstances use the application.


Installation:
1. Download the binaries above or compile your own from the source.
2. Extract the files "nowplaying.exe" and "spotify.txt" to a folder where you have write-access (e.g. c:\users\$user$\documents\nowplaying\)
3. Run nowplaying.exe

Configuring Xsplit:
Xsplit user ViciousXUSMC has made a fantastic video tutorial of how to the add your textfile to the stream. I suggest you check out his thread here. The configurations relevant to us are covered at 3:00 to 3:50.

Notes:
To exit the application just right-click the application in the system tray and select "Exit"

Troubleshooting:
Q: My stream only shows || ||
A: The application cannot find the spotify window or there is no song playing, try restarting Spotify or restarting the track.

Q: My stream only shows the text DEFAULT
A: The application cannot write to spotify.txt, thus default value is shown. Make sure that "nowplaying.exe" and "spotify.txt" is in the same directory and that "spotify.txt" is write-accessible.

Q: My song info has a delayed update
A: To keep the resources from racing the application only fetches track information every 10 seconds. This combined with xsplit's 10 second refresh interval can in worst case cause a delay of upto 20 seconds before the text updates for your viewers.

Bug reporting:
If you happen to find any bugs or have any tips on how to improve performance even further please let me know!
There's you and there's Lionel Richie.
Streaming on http://twitch.tv/numrii
numrii
XSplit User
Posts: 12
Joined: Wed May 09, 2012 7:17 pm
Location: Sweden
CPU: AMD FX-8120
RAM: Corsair Vengeance 1600mhz 16GB
Graphics Card: Sapphire Radeon HD7970 3GB
Operating System: Windows 7 Ultimate 64-bit
Internet Connection: 100/100

Re: "NowPlaying" from Spotify, the easy way

by WellOfWishes » Sun May 20, 2012 12:20 am

I've also wrote my own application that I use for displaying tracks being played within Spotify.

You can download it here:
https://impas.se/snp_v1.0.7z

VirusTotal report on the .exe file

It's written in C# and compiled under AnyCPU (runs as 32-bit native on 32-bit systems and 64-bit on 64-bit systems). It requires .NET Framework v4.0 and probably only works on Vista/Win7 and newer.

Here's the readme.txt

Spotify: Now Playing - SNP v1.0
by David Rudie (d.rudie@gmail.com)

This is a small application that sits in the system tray.

It will watch for the Spotify process, read the title of the currently playing
track, and write it out to a text file in the same directory as SNP.exe called
snp.txt.

There are also some hotkeys implemented that can be used to do various things:
Next Track: Ctrl, Alt, ]
Previous Track: Ctrl, Alt, [
Volume Up: Ctrl, Alt, +
Volume Down: Ctrl, Alt, -
Mute Track: Ctrl, Alt, M
Play/Pause Track: Ctrl, Alt, Enter
Stop Track: Ctrl, Alt, Backspace
WellOfWishes
Focus Group
Posts: 21
Joined: Thu Jul 28, 2011 6:52 pm
Location: Well of Wishes
CPU: Intel Core i7 2600k (Turbo 4.5GHz)
RAM: 8GB Corsair 7-7-7-17-1T PC1600
Graphics Card: 2 x NVIDIA GTX 470
Operating System: Windows 7 Ultimate x64
Capture Card: Blackmagic Intensity Pro
Internet Connection: Comcast Business 50MB/30MB

Re: "NowPlaying" from Spotify, the easy way

by junktrunk » Wed Jun 20, 2012 8:13 pm

No text displays for me, I'm not sure what the problem is.
junktrunk
XSplit User
Posts: 2
Joined: Tue Jun 19, 2012 7:20 pm

Re: "NowPlaying" from Spotify, the easy way

by numrii » Thu Jun 21, 2012 2:48 pm

Could you elaborate what you mean with no text displays?

Are you using my application or WellOWishes?

My application only fetches spotify info and places it into a textfile, you also have to set up a title that reads from the textfile and runs it on screen. See the thread in "configuring xsplit" section in my first post if you have any trouble with that.

Best of luck to you, Let me know if I can help.
There's you and there's Lionel Richie.
Streaming on http://twitch.tv/numrii
numrii
XSplit User
Posts: 12
Joined: Wed May 09, 2012 7:17 pm
Location: Sweden
CPU: AMD FX-8120
RAM: Corsair Vengeance 1600mhz 16GB
Graphics Card: Sapphire Radeon HD7970 3GB
Operating System: Windows 7 Ultimate 64-bit
Internet Connection: 100/100

Re: "NowPlaying" from Spotify, the easy way

by 321jurgen » Sun Jul 01, 2012 12:32 pm

Your awsome dud I love your work. This was so easy lol. My viewers love it to thank you very much.
321jurgen
XSplit User
Posts: 2
Joined: Wed Feb 08, 2012 3:11 pm

Re: "NowPlaying" from Spotify, the easy way

by Atylios » Tue Jul 03, 2012 11:35 pm

Is it possible to change the "|TEXT HERE|" lines? To smth like "Now playing: TEXT HERE"
Atylios
XSplit User
Posts: 4
Joined: Sat Jul 09, 2011 8:22 pm

Re: "NowPlaying" from Spotify, the easy way

by YoungTweezy » Sat Jul 14, 2012 2:36 am

Thanks so much! viewers love it!
YoungTweezy
XSplit User
Posts: 1
Joined: Sat Jul 14, 2012 2:30 am

Re: "NowPlaying" from Spotify, the easy way

by myESTV » Sat Jul 14, 2012 6:14 pm

Is it possible to change the "|TEXT HERE|" lines? To smth like "Now playing: TEXT HERE"


I want this too.
myESTV
XSplit User
Posts: 1
Joined: Mon Jan 09, 2012 2:08 pm

Re: "NowPlaying" from Spotify, the easy way

by Lazdaa » Fri Jul 20, 2012 1:37 pm

I've tried adding the file to tittles in XSplit and it just starts reading the text file.

What did i do wrong? :P
Lazdaa
XSplit User
Posts: 18
Joined: Sun Jul 15, 2012 1:26 pm
Location: Denmark
CPU: Intel Core I5-3570K @ 4.58 GHz
RAM: 2x4 GB Corsair Vengeance 1600 Mhz
Graphics Card: MSI 7850 Power Edition OC
Operating System: Windows 7 Proffesional x64
Internet Connection: http://speedtest.net/result/1927931127.png

Re: "NowPlaying" from Spotify, the easy way

by Press.F1 » Fri Jul 20, 2012 8:29 pm

Nice guide, thanks! :D
Press.F1
XSplit User
Posts: 1
Joined: Fri Jul 20, 2012 8:27 pm

Re: "NowPlaying" from Spotify, the easy way

by numrii » Fri Jul 20, 2012 9:12 pm

Hey guys! sorry I've been a bit out of it lately. Thanks alot for the awesome feedback :D Warms my heart to hear that I finally did something that wasn't useless.

Atylios and myESTV: Uhm, I could probably compile you a version that says "now playing" instead.... I just did the | | to separate the names a bit, as i had "Now playing" written in my artwork :)

Laz: What do you mean? You got the textfile to be read by xsplit? That's half the job, the other half is running the nowplaying.exe (or whatever I called it) application, try switching track in spotify, open up the file and see if the file updated.
There's you and there's Lionel Richie.
Streaming on http://twitch.tv/numrii
numrii
XSplit User
Posts: 12
Joined: Wed May 09, 2012 7:17 pm
Location: Sweden
CPU: AMD FX-8120
RAM: Corsair Vengeance 1600mhz 16GB
Graphics Card: Sapphire Radeon HD7970 3GB
Operating System: Windows 7 Ultimate 64-bit
Internet Connection: 100/100

Re: "NowPlaying" from Spotify, the easy way

by Lazdaa » Fri Jul 20, 2012 10:36 pm

Guess i just messed something up or something. Anyways it's working like a charm! :D

Thanks!
Lazdaa
XSplit User
Posts: 18
Joined: Sun Jul 15, 2012 1:26 pm
Location: Denmark
CPU: Intel Core I5-3570K @ 4.58 GHz
RAM: 2x4 GB Corsair Vengeance 1600 Mhz
Graphics Card: MSI 7850 Power Edition OC
Operating System: Windows 7 Proffesional x64
Internet Connection: http://speedtest.net/result/1927931127.png

Re: "NowPlaying" from Spotify, the easy way

by numrii » Sat Jul 21, 2012 1:41 am

Uhm I can't edit my post? :(

Here's the latest version anyway.

Changes to 1.1:
Added an external configuration file so that you can easily customize what's infront of the artist - track, Please refrain from using quotation-marks (") in the config-file.

Default is "Now playing: " if you want to revert it to the old format edit config.ini to key=" | | "

Binaries: Click here
md5 hash: 88d0f98f71659b4b7ab5bfcbe3918b90

Source: http://pastebin.com/9SiJDC3F

Enjoy :)
There's you and there's Lionel Richie.
Streaming on http://twitch.tv/numrii
numrii
XSplit User
Posts: 12
Joined: Wed May 09, 2012 7:17 pm
Location: Sweden
CPU: AMD FX-8120
RAM: Corsair Vengeance 1600mhz 16GB
Graphics Card: Sapphire Radeon HD7970 3GB
Operating System: Windows 7 Ultimate 64-bit
Internet Connection: 100/100

Re: "NowPlaying" from Spotify, the easy way (COPYRIGHT warni

by MadamHist » Tue Jul 24, 2012 6:39 am

It should also be noted that people must be careful streaming music from services such as Spotify. You may not have the necessary licence to do so and it can result in legal action from the music's copyright holders.

If you livestream to services such as Twitch.tv it can result in your channel being permanently removed by Twitch if they get angry letters from the music types. At the very least, you may be temporarily banned from streaming for a period of time.

It's a bit of a 'luck of the draw' type of situation, as someone who owns the copyright has to stumble across your stream in order to then say, "Hey! That's mine! Gimmie!". It's a risk, so decide for yourself if streaming music is worth the possible backlash. I've seen both large and small livestreamers get a slap on the wrist.

Having said that, this sort of idea seems particularly great for Creative Commons music as a way to include artist attribution where required.

http://creativecommons.org/legalmusicforvideos
MadamHist
XSplit User
Posts: 6
Joined: Mon Jul 23, 2012 12:31 am

Re: "NowPlaying" from Spotify, the easy way

by Lazdaa » Tue Jul 24, 2012 11:04 am

But if you just use the local files there should be no problem right? :)
Lazdaa
XSplit User
Posts: 18
Joined: Sun Jul 15, 2012 1:26 pm
Location: Denmark
CPU: Intel Core I5-3570K @ 4.58 GHz
RAM: 2x4 GB Corsair Vengeance 1600 Mhz
Graphics Card: MSI 7850 Power Edition OC
Operating System: Windows 7 Proffesional x64
Internet Connection: http://speedtest.net/result/1927931127.png

Re: "NowPlaying" from Spotify, the easy way

by MSgtGunny » Tue Jul 24, 2012 11:07 am

Lazdaa wrote:But if you just use the local files there should be no problem right? :)

Legally no, You need a broadcaster's license to legally stream music. Not that that has stopped pretty much anyone.
Where you can follow me:
ImageImageImage
MSgtGunny
Gunny Badge
Posts: 1888
Joined: Mon Jun 06, 2011 3:40 am
CPU: Core i7 920 C0/C1 stepping
RAM: 18 gb ddr3 running at 1333mhz, 7-7-7-20
Graphics Card: 1 GTX 560 Ti
Operating System: Windows 7 x64
Capture Card: Blackmagic Intensity Pro
Internet Connection: FiOS at home, T3 line at school

Re: "NowPlaying" from Spotify, the easy way

by numrii » Tue Jul 24, 2012 1:30 pm

Or the consent of the artist :)
This is a perfect moment to promote your friends bands!

This is indeed a very valid point. Personally I hadn't thought about it until you mentioned it.
There's you and there's Lionel Richie.
Streaming on http://twitch.tv/numrii
numrii
XSplit User
Posts: 12
Joined: Wed May 09, 2012 7:17 pm
Location: Sweden
CPU: AMD FX-8120
RAM: Corsair Vengeance 1600mhz 16GB
Graphics Card: Sapphire Radeon HD7970 3GB
Operating System: Windows 7 Ultimate 64-bit
Internet Connection: 100/100

Re: "NowPlaying" from Spotify, the easy way

by MSgtGunny » Tue Jul 24, 2012 1:36 pm

numrii wrote:Or the consent of the artist :)
This is a perfect moment to promote your friends bands!

This is indeed a very valid point. Personally I hadn't thought about it until you mentioned it.


You wouldn't be asking if you already had permission ;)
Where you can follow me:
ImageImageImage
MSgtGunny
Gunny Badge
Posts: 1888
Joined: Mon Jun 06, 2011 3:40 am
CPU: Core i7 920 C0/C1 stepping
RAM: 18 gb ddr3 running at 1333mhz, 7-7-7-20
Graphics Card: 1 GTX 560 Ti
Operating System: Windows 7 x64
Capture Card: Blackmagic Intensity Pro
Internet Connection: FiOS at home, T3 line at school

Re: "NowPlaying" from Spotify, the easy way

by SwiftWave » Sun Aug 19, 2012 4:21 pm

Excellent post and very well done.

I'd like to share with you that I have used your code in this topic.
I've adjusted it slightly to make it work for GrooveShark, which is an online music "center", I've given you full credit and felt like it'd be fair to give you a heads up.
High/Advanced Experience with:
- AVerMedia Live Gamer HD
- BlackMagic Intensity Pro
- Input-output, splitters, virtual/physical setups
- XSplit
- Single-PC Setup & Dual PC-Setup

My Guides:
- Bitrates & Presets
- GrooveShark XSplit Overlay
- AVerMedia Live Gamer HD Guide
SwiftWave
Premium User and Moderator
Posts: 568
Joined: Tue Jul 24, 2012 4:06 pm
Location: The Netherlands
CPU: i7-3930k
RAM: 8GB DDR3 1600Mhz
Graphics Card: MSI GTX 680 Lightning
Operating System: Windows 7 64Bit
Capture Card: Avermedia Live Gamer HD
Internet Connection: 120/10

Re: "NowPlaying" from Spotify, the easy way

by grandslamjmh » Sat Aug 31, 2013 7:56 pm

is there any way to change the way it outputs?

I would like to have the song first and the artist second. i would also like to put the song in quotes.

Example:
"song" - artist
grandslamjmh
XSplit User
Posts: 24
Joined: Fri Oct 28, 2011 7:46 pm
Location: US
CPU: Intel Core i7 950
RAM: 12gb DDR3
Graphics Card: Nvidia GeForce GTX 560
Operating System: Win 7 64bit
Capture Card: Elgato
Internet Connection: 70/20