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

TEXAS - Red_Dragon - Jul 9, 2025 - 5:57pm
 
July 2025 Photo Theme - Stone - Zep - Jul 9, 2025 - 5:43pm
 
Trump - Red_Dragon - Jul 9, 2025 - 5:13pm
 
Baseball, anyone? - ScottFromWyoming - Jul 9, 2025 - 4:11pm
 
Live Music - R_P - Jul 9, 2025 - 1:52pm
 
Name My Band - GeneP59 - Jul 9, 2025 - 1:16pm
 
Israel - R_P - Jul 9, 2025 - 1:04pm
 
Democratic Party - rgio - Jul 9, 2025 - 12:45pm
 
misheard lyrics - kcar - Jul 9, 2025 - 11:54am
 
DQ (as in 'Daily Quote') - black321 - Jul 9, 2025 - 11:33am
 
Beyond mix - reneng - Jul 9, 2025 - 10:40am
 
Bug Reports & Feature Requests - wossName - Jul 9, 2025 - 10:34am
 
Fascism In America - ColdMiser - Jul 9, 2025 - 10:23am
 
Spambags on RP - GeneP59 - Jul 9, 2025 - 10:20am
 
NY Times Strands - GeneP59 - Jul 9, 2025 - 10:18am
 
NYTimes Connections - GeneP59 - Jul 9, 2025 - 10:11am
 
Wordle - daily game - Isabeau - Jul 9, 2025 - 10:07am
 
Radio Paradise Comments - GeneP59 - Jul 9, 2025 - 10:01am
 
Photography Forum - Your Own Photos - Isabeau - Jul 9, 2025 - 9:51am
 
Climate Change - R_P - Jul 9, 2025 - 8:06am
 
Republican Party - Red_Dragon - Jul 9, 2025 - 7:50am
 
Economix - oldviolin - Jul 9, 2025 - 7:45am
 
What the hell OV? - oldviolin - Jul 9, 2025 - 7:26am
 
• • • The Once-a-Day • • •  - oldviolin - Jul 9, 2025 - 7:21am
 
Today in History - Red_Dragon - Jul 9, 2025 - 7:05am
 
Outstanding Covers - oldviolin - Jul 8, 2025 - 9:29pm
 
Trump Lies™ - R_P - Jul 8, 2025 - 7:14pm
 
Musky Mythology - R_P - Jul 8, 2025 - 5:43pm
 
Great Old Songs You Rarely Hear Anymore - KurtfromLaQuinta - Jul 8, 2025 - 4:57pm
 
USA! USA! USA! - R_P - Jul 8, 2025 - 2:40pm
 
What is the meaning of this? - islander - Jul 8, 2025 - 10:11am
 
Love & Hate - oldviolin - Jul 8, 2025 - 8:15am
 
Artificial Intelligence - Red_Dragon - Jul 8, 2025 - 6:45am
 
Anti-War - R_P - Jul 7, 2025 - 6:45pm
 
Environment - R_P - Jul 7, 2025 - 5:38pm
 
(Big) Media Watch - R_P - Jul 7, 2025 - 12:04pm
 
The Grateful Dead - black321 - Jul 7, 2025 - 11:17am
 
M.A.G.A. - Red_Dragon - Jul 7, 2025 - 9:26am
 
Music Videos - black321 - Jul 7, 2025 - 9:00am
 
Mixtape Culture Club - KurtfromLaQuinta - Jul 7, 2025 - 8:59am
 
Immigration - black321 - Jul 7, 2025 - 8:02am
 
Russia - Red_Dragon - Jul 7, 2025 - 7:39am
 
Triskele and The Grateful Dead - geoff_morphini - Jul 6, 2025 - 10:33pm
 
Hey Baby, It's The 4th O' July - GeneP59 - Jul 6, 2025 - 9:42pm
 
Customize a shirt with my favorite album - 2644364236 - Jul 6, 2025 - 7:20pm
 
Those Lovable Policemen - R_P - Jul 6, 2025 - 10:56am
 
Beer - SeriousLee - Jul 6, 2025 - 6:54am
 
Iran - R_P - Jul 5, 2025 - 9:01pm
 
What are you doing RIGHT NOW? - Coaxial - Jul 5, 2025 - 6:48pm
 
New vs Old RP App (Android) - mhamann123 - Jul 5, 2025 - 5:41am
 
Britain - R_P - Jul 4, 2025 - 1:41pm
 
Ukraine - R_P - Jul 4, 2025 - 11:10am
 
Best Song Comments. - 2644364236 - Jul 3, 2025 - 11:32pm
 
Country Up The Bumpkin - KurtfromLaQuinta - Jul 3, 2025 - 3:49pm
 
The Obituary Page - ScottFromWyoming - Jul 3, 2025 - 11:27am
 
Documentaries - Proclivities - Jul 3, 2025 - 9:31am
 
Annoying stuff. not things that piss you off, just annoyi... - Steely_D - Jul 3, 2025 - 8:36am
 
Copyright and theft - black321 - Jul 3, 2025 - 6:48am
 
Protest Songs - R_P - Jul 2, 2025 - 2:20pm
 
Fox Spews - islander - Jul 2, 2025 - 10:39am
 
New Music - ScottFromWyoming - Jul 2, 2025 - 7:30am
 
Carmen to Stones - KurtfromLaQuinta - Jul 1, 2025 - 7:44pm
 
President(s) Musk/Trump - VV - Jul 1, 2025 - 8:10am
 
June 2025 Photo Theme - Arches - Alchemist - Jun 30, 2025 - 9:10pm
 
Please help me find this song - LazyEmergency - Jun 30, 2025 - 8:42pm
 
Forum Posting Guidelines - rickylee123 - Jun 30, 2025 - 6:17pm
 
Thanks William! - buddy - Jun 30, 2025 - 5:49pm
 
Living in America - R_P - Jun 30, 2025 - 3:15pm
 
Gardeners Corner - marko86 - Jun 30, 2025 - 10:39am
 
Comics! - Red_Dragon - Jun 30, 2025 - 7:59am
 
Birthday wishes - Coaxial - Jun 30, 2025 - 6:36am
 
Talk Behind Their Backs Forum - VV - Jun 30, 2025 - 5:39am
 
Global Mix renaming - frazettaart - Jun 29, 2025 - 9:23am
 
What Are You Going To Do Today? - ScottFromWyoming - Jun 28, 2025 - 10:17am
 
Know your memes - oldviolin - Jun 27, 2025 - 11:41am
 
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!