Closed rogercorrea closed 5 years ago
None :) I've write my own shairport-sync metadata 'visualizer' using node (to read metadata) + socket.io + chromium.
But (as always) it depends - on what platform? But you could use eg. http://moodeaudio.org I suppose. It has built-in shairport-sync support as I can remember.
I use in Raspbian Jessie. Do you can share your code? The Moode Audio is a good option but not work for me. I think that not exist manual install, only the image complete. My system was mounted of the zero and I need of the app to show the music that shairport it play.
@roblan Now I can read the metadata using Python. Now I go create the web interface using Flask and HTML5 for show the music in my CarPC.
#!/usr/bin/python
import subprocess
cmd = "shairport-sync-metadata-reader < /tmp/shairport-sync-metadata"
proc = subprocess.Popen(cmd,stdout=subprocess.PIPE,shell=True)
while True:
line = proc.stdout.readline()
if line != '':
wordKeys = ["Artist", "Title", "Album"]
lineNow = line.rstrip()
for key in wordKeys:
if key in lineNow:
print lineNow
else:
break
But my metadata reader not return all informations always. Sometimes he return the artist, sometimes album or title... I don't understand, but I'm use Spotify in iPhone with bluetooth connection at my Raspberry Pi with the Shairport.
Anyone help?
Please, someone can help me? @mikebrady Do you can help me?
@rogercorrea You can use node + socket.io + https://github.com/roblan/shairport-sync-reader if you are using HTML5
Thanks, @roblan . I used Python and work but not is always that music is listed in the socket. Can occur of the I change the music in my phone and the music not show in the sync-reader.
That's correct? Do it occur with you also?
Thanks for help.
When album artwork is enabled then metadata stream seems to be unstable sometimes. But without artwork everything works fine.
@rogercorrea
`#!/usr/bin/python3 import os import time import subprocess import sys
cmd = "shairport-sync-metadata-reader < /tmp/shairport-sync-metadata" proc = subprocess.Popen(cmd,stdout=subprocess.PIPE,shell=True)
while True: line = proc.stdout.readline().decode()
if line != '':
wordKeys = ["Artist", "Title", "Album", "pbeg", "pend"]
lineNow = line.rstrip()
lineNow = lineNow.replace('"', '').strip()
lineNow = lineNow.replace('.', '').strip()
head, sep, tail = lineNow.partition(': ')
for key in wordKeys:
if key in lineNow:
if key == "pbeg": print ("Playing music", flush=True)
elif key == "pend": print ("Stopping music", flush=True)
elif key != ("pbeg", "pend"): print (head + " = " + tail.replace(':', '').strip(), flush=True)
`
Hi!
I'm developing a metadata parser which provides track information. Also, it contains the web based example app. If you use Raspberry Pi 2 / 3, there are available easy instration steps. Hope this helps.
https://github.com/idubnori/shairport-sync-trackinfo-reader
Grateful for shairport-sync and Mike!
Thanks for this contribution. Closing this as an issue. Please open a new one if necessary.
Please,
My shairport work fine! Thanks for its fantastic solution! But I need show the metadata of the musics in execution. What music player I can use? I'm using in my multimedia car with a display 7" and he work in background only, without nothing indicator.
Thanks for help!