Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Enabling Airplay Metadata ?
#1
Hi guys, being the UpMPDcli library not anymore usable to stream Tidal (using the built-in Moode autentication), and waiting for a definitive solution (even if I'm fear that will not happen..), one of the possible alternative is to use Airplay to stream TIDAL content to Moode directly using the TIDAL app (on iOS or Android both). The result streaming is a lossless 16/44.1, so it's OK for me.
My problem is that in my streamer, I'm running a Python script to show on an OLED display all the info related to track, author, title,quality, kbps  and static info when in pause (e.g. IP Address, Temperature, ..).
The script, during playing,  catch the info from the underlying MPD service, so if I use Airplay the display is not anymore updated (also the Moode Web UI, but this is an acceptable drawback).

Is there any chance to retrieve this info from the RPi? I've read an article about a so-called shareport-sync library that could use to do it, but I don't understand  how is work (here's the link https://appcodelabs.com/show-artist-song...spberry-pi).
AFAIK the service is able to retrieve data from Airplay, sending it to a pipe, that can be read with a "decoder" that parse the metadata and get track info. 
In the same page there's also a link to a decoder, but is written in C language and not in Python.
My idea is, but this is what I'm basically asking for:
1) Download the shareport-sync service, allowing it to run during Moode boot (adding a line in the famous RC.Local file, where I already start automatically the Python script to update the display)
2) Extend (or run in parallel to the existing one) the Python Script with the Airplay "decoder". In my script there's already a branch (currently empty) to be run when "player= 'AirPlay". Anybody knows if there's something similar? Too hard for me to translate from C to Python....

Hope that I hadn't been too confused....

thanks in advance if somebody could collaborate to this mini-project.

Andrea

P.S. Obviously, it should be fantastic if in the future this could be a standard Moode feature (similar to the metadata catching for MPD)
Reply
#2
moOde used to have an Airplay metadata reader/parser but it was unreliable and so it was dropped. The other issue was the complex code required to manage metadata from both MPD and Airplay.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
A firts update !!!
Following the instructions, I've built the shairport service, and now I'm able to stream music from my iPhone towards Moode (or better... towards the RPi), generating a metadata file on the /tmp folder. Now I try to run the "decoder" (even if in C") to see what will be the result of the decoding.
It works! The problem is that the Moode Airplay renderer is not used anymore.
My impression, but I'm a newbie in Linux, is that probably couldn't be too hard to make integrate it (or part of it) into the AirPlay renderer, in order to generate the same metadata and to "decode" them in a file similar to "currentsong.txt"....
Reply
#4
I don't disagree with Tim's remarks. OTOH I think this is a doable DIY project for someone who wants to drive a minimal display, similar to the PydPiper projects.

There's no need to attempt to eat the elephant in one sitting.


You already have a Python script for extracting data from MPD and formatting it for your OLED display.

Have a look at the Python script in the appcodelabs article you linked to. In just a few lines the author parses the output from the shairport-sync/shairport-sync-metadata-reader pipeline in 2 simple functions "extract" and "update". You can see how the author then feeds the results to "render". You can instead try this extract/update process in your own code.


Besides the appcodelabs article, there's the good documentation MikeBrady provides in the github repos for his two projects: shairport-sync and shairport-sync-metadata-reader.

Regards,
Kent
Reply
#5
Thanks Tim and Kent. I'll try to go in the direction you've suggested.
Reply
#6
(05-30-2020, 02:40 PM)mancio61 Wrote: Thanks Tim and Kent. I'll try to go in the direction you've suggested.

FYI, the shairport-sync component in moOde 6.5.2 is built with the --with-metadata option enabled. I played a bit last night with the shairport-sync > shairport-sync-media-player pipeline. So far, it seems to be working as advertised. It's rather chatty but I don't think you should have any trouble with it. I'll probably post any other thoughts on the thread I started.

Regards,
Kent
Reply


Forum Jump: