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

Name My Band - buddy - Jun 30, 2025 - 5:54pm
 
Thanks William! - buddy - Jun 30, 2025 - 5:49pm
 
The Obituary Page - oldviolin - Jun 30, 2025 - 5:21pm
 
USA! USA! USA! - buddy - Jun 30, 2025 - 4:50pm
 
Climate Change - R_P - Jun 30, 2025 - 4:13pm
 
Country Up The Bumpkin - Red_Dragon - Jun 30, 2025 - 3:20pm
 
Living in America - R_P - Jun 30, 2025 - 3:15pm
 
M.A.G.A. - R_P - Jun 30, 2025 - 12:50pm
 
Trump - Red_Dragon - Jun 30, 2025 - 12:41pm
 
Carmen to Stones - timothy_john - Jun 30, 2025 - 12:07pm
 
Artificial Intelligence - R_P - Jun 30, 2025 - 11:34am
 
Gardeners Corner - marko86 - Jun 30, 2025 - 10:39am
 
Wordle - daily game - marko86 - Jun 30, 2025 - 10:17am
 
NY Times Strands - maryte - Jun 30, 2025 - 9:14am
 
NYTimes Connections - maryte - Jun 30, 2025 - 8:34am
 
Comics! - Red_Dragon - Jun 30, 2025 - 7:59am
 
Mixtape Culture Club - ColdMiser - Jun 30, 2025 - 7:37am
 
Today in History - Red_Dragon - Jun 30, 2025 - 7:01am
 
Birthday wishes - Coaxial - Jun 30, 2025 - 6:36am
 
Talk Behind Their Backs Forum - VV - Jun 30, 2025 - 5:39am
 
Radio Paradise Comments - Coaxial - Jun 30, 2025 - 5:32am
 
Please help me find this song - ScottFromWyoming - Jun 29, 2025 - 9:03pm
 
June 2025 Photo Theme - Arches - fractalv - Jun 29, 2025 - 8:08pm
 
Music Videos - KurtfromLaQuinta - Jun 29, 2025 - 4:09pm
 
Global Mix renaming - frazettaart - Jun 29, 2025 - 9:23am
 
Iran - R_P - Jun 28, 2025 - 8:56pm
 
Live Music - Steely_D - Jun 28, 2025 - 6:53pm
 
Bug Reports & Feature Requests - Steely_D - Jun 28, 2025 - 12:05pm
 
Israel - R_P - Jun 28, 2025 - 12:04pm
 
What Are You Going To Do Today? - ScottFromWyoming - Jun 28, 2025 - 10:17am
 
• • • The Once-a-Day • • •  - oldviolin - Jun 28, 2025 - 9:52am
 
Musky Mythology - R_P - Jun 27, 2025 - 3:00pm
 
Know your memes - oldviolin - Jun 27, 2025 - 11:41am
 
What Makes You Sad? - oldviolin - Jun 27, 2025 - 10:41am
 
Calling all Monty Python fans! - FeydBaron - Jun 27, 2025 - 10:30am
 
Strips, cartoons, illustrations - R_P - Jun 27, 2025 - 10:23am
 
SCOTUS - Red_Dragon - Jun 27, 2025 - 8:30am
 
Framed - movie guessing game - Proclivities - Jun 27, 2025 - 6:25am
 
Democratic Party - R_P - Jun 26, 2025 - 8:40pm
 
Immigration - R_P - Jun 26, 2025 - 2:22pm
 
Yummy Snack - Proclivities - Jun 26, 2025 - 1:17pm
 
Parents and Children - kurtster - Jun 26, 2025 - 11:32am
 
New Music - miamizsun - Jun 26, 2025 - 6:45am
 
What Makes You Laugh? - NoEnzLefttoSplit - Jun 25, 2025 - 9:36pm
 
PUNS- Political Punditry and so-called journalism - oldviolin - Jun 25, 2025 - 12:06pm
 
Lyrics that strike a chord today... - black321 - Jun 25, 2025 - 11:30am
 
What The Hell Buddy? - oldviolin - Jun 25, 2025 - 10:32am
 
Baseball, anyone? - ScottFromWyoming - Jun 25, 2025 - 9:09am
 
Astronomy! - black321 - Jun 25, 2025 - 8:58am
 
The Grateful Dead - black321 - Jun 25, 2025 - 7:13am
 
Outstanding Covers - oldviolin - Jun 24, 2025 - 10:24pm
 
Billionaires - R_P - Jun 24, 2025 - 4:57pm
 
Great guitar faces - Steely_D - Jun 24, 2025 - 4:15pm
 
Buying a Cell Phone - Steely_D - Jun 24, 2025 - 3:05pm
 
Anti-War - R_P - Jun 24, 2025 - 12:57pm
 
Photography Forum - Your Own Photos - Alchemist - Jun 24, 2025 - 10:40am
 
RIP Mick Ralphs - geoff_morphini - Jun 23, 2025 - 10:40pm
 
Congress - maryte - Jun 23, 2025 - 1:39pm
 
Europe - R_P - Jun 23, 2025 - 11:30am
 
Republican Party - islander - Jun 23, 2025 - 8:38am
 
the Todd Rundgren topic - ColdMiser - Jun 23, 2025 - 7:58am
 
What are you doing RIGHT NOW? - GeneP59 - Jun 21, 2025 - 6:14pm
 
Rock & Roll Facts - Coaxial - Jun 21, 2025 - 6:10pm
 
Poetry Forum - SeriousLee - Jun 21, 2025 - 5:20pm
 
And the good news is.... - Red_Dragon - Jun 21, 2025 - 3:39pm
 
Gaje Gipsy Swing - bartanandor - Jun 21, 2025 - 10:53am
 
Way Cool Video - Steely_D - Jun 21, 2025 - 8:46am
 
What Did You Have For Breakfast? - miamizsun - Jun 21, 2025 - 8:14am
 
Hockey + Fantasy Hockey - miamizsun - Jun 21, 2025 - 8:10am
 
Gotta Get Your Drink On - Antigone - Jun 21, 2025 - 7:53am
 
PUNS - The BEATLES - oldviolin - Jun 20, 2025 - 3:57pm
 
RP NEW player error - jk.richards - Jun 20, 2025 - 10:35am
 
RP App for Android - jk.richards - Jun 20, 2025 - 10:32am
 
Fascism In America - GeneP59 - Jun 20, 2025 - 8:29am
 
Food - NoEnzLefttoSplit - Jun 19, 2025 - 10:23pm
 
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!