[ ]   [ ]   [ ]                        [ ]      [ ]   [ ]

Fascism In America - GeneP59 - Jul 18, 2025 - 11:39am
 
Gardeners Corner - GeneP59 - Jul 18, 2025 - 11:28am
 
NY Times Strands - GeneP59 - Jul 18, 2025 - 11:27am
 
NYTimes Connections - GeneP59 - Jul 18, 2025 - 11:16am
 
Protest Songs - R_P - Jul 18, 2025 - 11:16am
 
Wordle - daily game - GeneP59 - Jul 18, 2025 - 11:10am
 
Radio Paradise Comments - Jonathon - Jul 18, 2025 - 11:03am
 
Strips, cartoons, illustrations - R_P - Jul 18, 2025 - 10:48am
 
Living in America - Lazy8 - Jul 18, 2025 - 10:27am
 
Climate Change - black321 - Jul 18, 2025 - 8:46am
 
Bug Reports & Feature Requests - Coaxial - Jul 18, 2025 - 7:36am
 
Vinyl Only Spin List - lesliefran - Jul 18, 2025 - 7:35am
 
Today in History - Red_Dragon - Jul 18, 2025 - 7:20am
 
Multi-Room AirPlay using iOS app on Mac M - youngers - Jul 18, 2025 - 7:18am
 
Happy RP Anniversary! - Jonathon - Jul 18, 2025 - 6:28am
 
Trump - Coaxial - Jul 17, 2025 - 8:48pm
 
Project 2025 - R_P - Jul 17, 2025 - 7:19pm
 
New Music - R_P - Jul 17, 2025 - 6:17pm
 
Republican Party - Red_Dragon - Jul 17, 2025 - 3:47pm
 
What the hell OV? - miamizsun - Jul 17, 2025 - 3:08pm
 
Are they married yet? YES THEY ARE! - miamizsun - Jul 17, 2025 - 3:04pm
 
Movies to avoid? - buddy - Jul 17, 2025 - 12:37pm
 
Israel - R_P - Jul 17, 2025 - 12:24pm
 
Baseball, anyone? - Red_Dragon - Jul 17, 2025 - 9:43am
 
Name My Band - GeneP59 - Jul 17, 2025 - 9:28am
 
Trump Lies™ - Red_Dragon - Jul 17, 2025 - 8:57am
 
The Obituary Page - Proclivities - Jul 17, 2025 - 8:56am
 
July 2025 Photo Theme - Stone - oldviolin - Jul 17, 2025 - 7:11am
 
No Rock Mix on Alexa? - Contaminator - Jul 17, 2025 - 6:56am
 
Russia - R_P - Jul 16, 2025 - 3:15pm
 
Things You Thought Today - black321 - Jul 16, 2025 - 1:53pm
 
The Marie Antoinette Moment... - oldviolin - Jul 16, 2025 - 1:36pm
 
260,000 Posts in one thread? - oldviolin - Jul 16, 2025 - 1:31pm
 
Play the Blues - black321 - Jul 16, 2025 - 11:06am
 
But Why? - Red_Dragon - Jul 16, 2025 - 9:53am
 
Live Music - oldviolin - Jul 16, 2025 - 9:53am
 
Great Old Songs You Rarely Hear Anymore - GeneP59 - Jul 16, 2025 - 9:32am
 
Pernicious Pious Proclivities Particularized Prodigiously - R_P - Jul 15, 2025 - 10:46pm
 
Photography Forum - Your Own Photos - KurtfromLaQuinta - Jul 15, 2025 - 8:41pm
 
Radio Paradise NFL Pick'em Group - sunybuny - Jul 15, 2025 - 3:05pm
 
Beyond mix - victory806 - Jul 15, 2025 - 12:53pm
 
What Makes You Laugh? - Isabeau - Jul 15, 2025 - 12:35pm
 
Alexa Skill - buddy - Jul 15, 2025 - 12:12pm
 
Where is the airplane? - rgio - Jul 15, 2025 - 9:42am
 
Trouble with Verizon? Or Tailscale? - jarro - Jul 15, 2025 - 6:39am
 
Economix - R_P - Jul 14, 2025 - 3:27pm
 
Immigration - R_P - Jul 14, 2025 - 3:11pm
 
Artificial Intelligence - R_P - Jul 14, 2025 - 11:16am
 
Fox Spews - R_P - Jul 14, 2025 - 10:52am
 
What is the meaning of this? - rgio - Jul 14, 2025 - 10:44am
 
• • • The Once-a-Day • • •  - oldviolin - Jul 14, 2025 - 8:04am
 
Why atheists swallow, - black321 - Jul 14, 2025 - 8:00am
 
USA! USA! USA! - ColdMiser - Jul 14, 2025 - 7:57am
 
On Life as Art- heard it on KTRT 95.7 - KurtfromLaQuinta - Jul 14, 2025 - 7:56am
 
Comics! - KurtfromLaQuinta - Jul 14, 2025 - 7:53am
 
Music Videos - black321 - Jul 14, 2025 - 7:51am
 
M.A.G.A. - R_P - Jul 13, 2025 - 3:53pm
 
Infinite cat - Isabeau - Jul 13, 2025 - 11:37am
 
Dialing 1-800-Manbird - oldviolin - Jul 13, 2025 - 11:35am
 
Talk Behind Their Backs Forum - VV - Jul 12, 2025 - 9:16pm
 
Europe - R_P - Jul 12, 2025 - 6:30pm
 
Democratic Party - R_P - Jul 12, 2025 - 1:37pm
 
A motivational quote - steeler - Jul 11, 2025 - 6:58pm
 
Beyond... - GeneP59 - Jul 11, 2025 - 6:35pm
 
True Confessions - oldviolin - Jul 11, 2025 - 11:56am
 
Jess Roden - legendary UK vocalist - and "Seven Windows" ... - J_C - Jul 11, 2025 - 11:22am
 
It seemed like a good idea at the time - ptooey - Jul 11, 2025 - 6:10am
 
Country Up The Bumpkin - KurtfromLaQuinta - Jul 10, 2025 - 9:13pm
 
TV shows you watch - R_P - Jul 10, 2025 - 5:31pm
 
Wasted Money - GeneP59 - Jul 10, 2025 - 5:22pm
 
Rock mix / repitition - walk2k - Jul 10, 2025 - 4:31pm
 
How's the weather? - GeneP59 - Jul 10, 2025 - 3:21pm
 
Random Solutions - Random Advice - oldviolin - Jul 10, 2025 - 10:11am
 
Spambags on RP - KurtfromLaQuinta - Jul 10, 2025 - 9:02am
 
misheard lyrics - GeneP59 - Jul 10, 2025 - 6:30am
 
Index » Internet/Computer » Streaming/Media » Live FLAC support in Sonos API
Post to this Topic
alistair.bill



Posted: Aug 30, 2022 - 8:08am

 jarro wrote:

"Each track in the cloud queue has all the standard metadata that is needed to fetch the audio for the track. This may include either a mediaUrl (the URL to the actual audio) or a MusicObjectId. If an item contains both of these objects, Sonos ignores the mediaUrl. This is because the MusicObjectId resolves to a URL using SMAPI."

If you just provide an url  it can avoid the smapi call.





Thanks - apologies for missing that part.

I've now solved my original problem after getting an email back from the Sonos developers. The players support FLAC streams framed in fragmented MP4 and sent via HLS. Once I provided a stream in that format (doable with the latest version of Liquidsoap) the player was happy.
jarro

jarro Avatar

Location: #hcmcz
Gender: Male


Posted: Aug 18, 2022 - 2:54pm

 alistair.bill wrote:


Hello, thanks for the reply (and apologies for the follow-up, I know this is a bit off-topic!). The Sonos docs suggest that even when using Cloud Queue, SMAPI still needs to implement `getMediaURI`, the call I was surprised to see wasn't implemented - see item 11 under 'Cloud queue workflow' in https://developer.sonos.com/bu... and the diagram above.

"Each track in the cloud queue has all the standard metadata that is needed to fetch the audio for the track. This may include either a mediaUrl (the URL to the actual audio) or a MusicObjectId. If an item contains both of these objects, Sonos ignores the mediaUrl. This is because the MusicObjectId resolves to a URL using SMAPI."

If you just provide an url  it can avoid the smapi call.


alistair.bill



Posted: Aug 16, 2022 - 9:33am

 jarro wrote:

This is a bit fuzzy as implementation was quite awhile ago.   There is some overlap between smapi and cloud queue.   So you don't need to fully implement smapi for a service.  
If just for personal use,  it might be easier  to create your own web app and just work with the cloud queue.   
The docs and sample apps for that  seem to be more up to date.
https://developer.sonos.com/to...




Hello, thanks for the reply (and apologies for the follow-up, I know this is a bit off-topic!). The Sonos docs suggest that even when using Cloud Queue, SMAPI still needs to implement `getMediaURI`, the call I was surprised to see wasn't implemented - see item 11 under 'Cloud queue workflow' in https://developer.sonos.com/bu... and the diagram above.
jarro

jarro Avatar

Location: #hcmcz
Gender: Male


Posted: Aug 16, 2022 - 8:12am

 alistair.bill wrote:

Hello,

I've got a project to feed the output of my vinyl record player into a Raspberry Pi and stream it across my local network so I can listen anywhere in the house, and I'm trying to get my Sonos system to accept a (lossless) live stream. Radio Paradise seems to be one of few services which achieves this.

I was having a poke around the Radio Paradise Sonos SOAP API with the help of Sonos' developer documentation, and noticed several API calls aren't implemented, including `getMediaURI` (which sounds crucial, if you believe the docs!). Sonos devices are also quite good at sending traffic over HTTPS, so unfortunately I can't sniff the traffic to figure it out on my own.

I wonder if anyone knows about the Sonos API, and if so - please could they provide some information about the API calls implemented to make FLAC streaming work? Thanks!


This is a bit fuzzy as implementation was quite awhile ago.   There is some overlap between smapi and cloud queue.   So you don't need to fully implement smapi for a service.  
If just for personal use,  it might be easier  to create your own web app and just work with the cloud queue.   
The docs and sample apps for that  seem to be more up to date.
https://developer.sonos.com/to...


thisbody

thisbody Avatar

Location: out of space
Gender: Male


Posted: Aug 16, 2022 - 7:27am

 alistair.bill wrote:
Thanks for the reply. To clarify, I'm specifically interested in the Sonos Music API, which enables you to write your own music service (i.e. appear in the app as a music provider). This is extensively documented by Sonos here: https://developer.sonos.com/re... and seems to be only partially implemented by Radio Paradise (which prompted my question).

The library you linked wraps the Sonos Control API, which is what most people on GitHub and elsewhere are interested in. This allows you to send events to change volume, pause, play a stream etc., but not to add an entry to the app.

Ok. Thanks for the clarification. I'm sure you perused the Sonos community forum and all publicly available documentation.

Good luck with your endeavor! - And let us know when and how you succeed.

alistair.bill



Posted: Aug 16, 2022 - 1:49am

 thisbody wrote:

Not sure, how far you got digging around, but...
this link might provide some answers, along with a thorough web-search for the terms:
sonos api github (with the list of keywords potentially extended by the term flac after a serious first round of digging to learn and educate yourself on the topic).

*Cheers*



Thanks for the reply. To clarify, I'm specifically interested in the Sonos Music API, which enables you to write your own music service (i.e. appear in the app as a music provider). This is extensively documented by Sonos here: https://developer.sonos.com/re... and seems to be only partially implemented by Radio Paradise (which prompted my question).

The library you linked wraps the Sonos Control API, which is what most people on GitHub and elsewhere are interested in. This allows you to send events to change volume, pause, play a stream etc., but not to add an entry to the app.
thisbody

thisbody Avatar

Location: out of space
Gender: Male


Posted: Aug 15, 2022 - 3:56pm

 alistair.bill wrote:

Hello,

I've got a project to feed the output of my vinyl record player into a Raspberry Pi and stream it across my local network so I can listen anywhere in the house, and I'm trying to get my Sonos system to accept a (lossless) live stream. Radio Paradise seems to be one of few services which achieves this.

I was having a poke around the Radio Paradise Sonos SOAP API with the help of Sonos' developer documentation, and noticed several API calls aren't implemented, including `getMediaURI` (which sounds crucial, if you believe the docs!). Sonos devices are also quite good at sending traffic over HTTPS, so unfortunately I can't sniff the traffic to figure it out on my own.

I wonder if anyone knows about the Sonos API, and if so - please could they provide some information about the API calls implemented to make FLAC streaming work? Thanks!


Not sure, how far you got digging around, but...
this link might provide some answers, along with a thorough web-search for the terms:
sonos api github (with the list of keywords potentially extended by the term flac after a serious first round of digging to learn and educate yourself on the topic).

*Cheers*

alistair.bill



Posted: Aug 15, 2022 - 2:05pm

Hello,

I've got a project to feed the output of my vinyl record player into a Raspberry Pi and stream it across my local network so I can listen anywhere in the house, and I'm trying to get my Sonos system to accept a (lossless) live stream. Radio Paradise seems to be one of few services which achieves this.

I was having a poke around the Radio Paradise Sonos SOAP API with the help of Sonos' developer documentation, and noticed several API calls aren't implemented, including `getMediaURI` (which sounds crucial, if you believe the docs!). Sonos devices are also quite good at sending traffic over HTTPS, so unfortunately I can't sniff the traffic to figure it out on my own.

I wonder if anyone knows about the Sonos API, and if so - please could they provide some information about the API calls implemented to make FLAC streaming work? Thanks!