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

Wordle - daily game - geoff_morphini - Apr 18, 2024 - 10:43am
 
NYTimes Connections - geoff_morphini - Apr 18, 2024 - 10:42am
 
Song of the Day - oldviolin - Apr 18, 2024 - 10:22am
 
The Obituary Page - ptooey - Apr 18, 2024 - 9:57am
 
NY Times Strands - Bill_J - Apr 18, 2024 - 8:01am
 
Radio Paradise Comments - GeneP59 - Apr 18, 2024 - 7:58am
 
Remembering the Good Old Days - Proclivities - Apr 18, 2024 - 7:31am
 
Trump - rgio - Apr 18, 2024 - 7:31am
 
Israel - Isabeau - Apr 18, 2024 - 7:17am
 
Museum Of Bad Album Covers - Steve - Apr 18, 2024 - 6:58am
 
Today in History - Red_Dragon - Apr 18, 2024 - 6:39am
 
April 2024 Photo Theme - Happenstance - haresfur - Apr 17, 2024 - 7:04pm
 
Europe - haresfur - Apr 17, 2024 - 6:47pm
 
Country Up The Bumpkin - KurtfromLaQuinta - Apr 17, 2024 - 5:23pm
 
Name My Band - GeneP59 - Apr 17, 2024 - 3:27pm
 
What's that smell? - Isabeau - Apr 17, 2024 - 2:50pm
 
USA! USA! USA! - R_P - Apr 17, 2024 - 1:48pm
 
Business as Usual - black321 - Apr 17, 2024 - 1:48pm
 
Things that make you go Hmmmm..... - dischuckin - Apr 17, 2024 - 1:29pm
 
Talk Behind Their Backs Forum - VV - Apr 17, 2024 - 1:26pm
 
Russia - R_P - Apr 17, 2024 - 1:14pm
 
Science in the News - Red_Dragon - Apr 17, 2024 - 11:14am
 
Magic Eye optical Illusions - Proclivities - Apr 17, 2024 - 10:08am
 
Ukraine - kurtster - Apr 17, 2024 - 10:05am
 
Photography Forum - Your Own Photos - Alchemist - Apr 17, 2024 - 9:38am
 
Just for the Haiku of it. . . - oldviolin - Apr 17, 2024 - 9:01am
 
HALF A WORLD - oldviolin - Apr 17, 2024 - 8:52am
 
• • • The Once-a-Day • • •  - oldviolin - Apr 16, 2024 - 9:08pm
 
Little known information... maybe even facts - R_P - Apr 16, 2024 - 3:29pm
 
songs that ROCK! - thisbody - Apr 16, 2024 - 10:56am
 
260,000 Posts in one thread? - oldviolin - Apr 16, 2024 - 10:10am
 
WTF??!! - rgio - Apr 16, 2024 - 5:23am
 
Australia has Disappeared - haresfur - Apr 16, 2024 - 4:58am
 
Earthquake - miamizsun - Apr 16, 2024 - 4:46am
 
It's the economy stupid. - miamizsun - Apr 16, 2024 - 4:28am
 
TV shows you watch - Manbird - Apr 15, 2024 - 7:28pm
 
Live Music - oldviolin - Apr 15, 2024 - 2:06pm
 
Republican Party - Isabeau - Apr 15, 2024 - 12:12pm
 
Vinyl Only Spin List - kurtster - Apr 14, 2024 - 11:59am
 
Eclectic Sound-Drops - thisbody - Apr 14, 2024 - 11:27am
 
Synchronization - ReggieDXB - Apr 13, 2024 - 11:40pm
 
Other Medical Stuff - geoff_morphini - Apr 13, 2024 - 7:54am
 
What Did You See Today? - Steely_D - Apr 13, 2024 - 6:42am
 
Photos you have taken of your walks or hikes. - KurtfromLaQuinta - Apr 12, 2024 - 3:50pm
 
Things You Thought Today - Red_Dragon - Apr 12, 2024 - 3:05pm
 
Poetry Forum - oldviolin - Apr 12, 2024 - 8:45am
 
Dear Bill - oldviolin - Apr 12, 2024 - 8:16am
 
Radio Paradise in Foobar2000 - gvajda - Apr 11, 2024 - 6:53pm
 
Mixtape Culture Club - ColdMiser - Apr 11, 2024 - 8:29am
 
Joe Biden - black321 - Apr 11, 2024 - 7:43am
 
New Song Submissions system - MayBaby - Apr 11, 2024 - 6:29am
 
No TuneIn Stream Lately - kurtster - Apr 10, 2024 - 6:26pm
 
Caching to Apple watch quit working - email-muri.0z - Apr 10, 2024 - 6:25pm
 
April 8th Partial Solar Eclipse - Alchemist - Apr 10, 2024 - 10:52am
 
Bug Reports & Feature Requests - orrinc - Apr 10, 2024 - 10:48am
 
NPR Listeners: Is There Liberal Bias In Its Reporting? - black321 - Apr 9, 2024 - 2:11pm
 
Sonos - rnstory - Apr 9, 2024 - 10:43am
 
RP Windows Desktop Notification Applet - gvajda - Apr 9, 2024 - 9:55am
 
If not RP, what are you listening to right now? - kurtster - Apr 8, 2024 - 10:34am
 
And the good news is.... - thisbody - Apr 8, 2024 - 3:57am
 
How do I get songs into My Favorites - Huey - Apr 7, 2024 - 11:29pm
 
Pernicious Pious Proclivities Particularized Prodigiously - R_P - Apr 7, 2024 - 5:14pm
 
Lyrics that strike a chord today... - Isabeau - Apr 7, 2024 - 12:50pm
 
Dialing 1-800-Manbird - oldviolin - Apr 7, 2024 - 11:18am
 
Why is Mellow mix192kbps? - dean2.athome - Apr 7, 2024 - 1:11am
 
Musky Mythology - haresfur - Apr 6, 2024 - 7:11pm
 
China - R_P - Apr 6, 2024 - 11:19am
 
Artificial Intelligence - R_P - Apr 5, 2024 - 12:45pm
 
Vega4 - Bullets - nirgivon - Apr 5, 2024 - 11:50am
 
Environment - thisbody - Apr 5, 2024 - 9:37am
 
How's the weather? - geoff_morphini - Apr 5, 2024 - 8:37am
 
Frequent drop outs (The Netherlands) - Babylon - Apr 5, 2024 - 8:37am
 
share song - dkraybil - Apr 5, 2024 - 8:37am
 
Love & Hate - miamizsun - Apr 5, 2024 - 5:37am
 
iOS borked - RPnate1 - Apr 4, 2024 - 2:13pm
 
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: #guad
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: #guad
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

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

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!