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

Artificial Intelligence - rgio - May 10, 2024 - 6:00am
 
Radio Paradise Comments - Isabeau - May 10, 2024 - 5:54am
 
Wordle - daily game - Coaxial - May 10, 2024 - 5:45am
 
Virginia News - Red_Dragon - May 10, 2024 - 5:42am
 
China - miamizsun - May 10, 2024 - 5:30am
 
NYTimes Connections - rgio - May 10, 2024 - 5:27am
 
NY Times Strands - Proclivities - May 10, 2024 - 5:04am
 
Today in History - DaveInSaoMiguel - May 10, 2024 - 4:52am
 
Outstanding Covers - Steely_D - May 10, 2024 - 12:56am
 
The 1960s - kurtster - May 9, 2024 - 7:21pm
 
Israel - R_P - May 9, 2024 - 7:03pm
 
May 2024 Photo Theme - Peaceful - KurtfromLaQuinta - May 9, 2024 - 4:31pm
 
Democratic Party - R_P - May 9, 2024 - 3:06pm
 
Bug Reports & Feature Requests - RPnate1 - May 9, 2024 - 2:50pm
 
Upcoming concerts or shows you can't wait to see - oldviolin - May 9, 2024 - 2:27pm
 
Climate Change - R_P - May 9, 2024 - 12:53pm
 
Marko Haavisto & Poutahaukat - TheKing2 - May 9, 2024 - 12:45pm
 
Things You Thought Today - oldviolin - May 9, 2024 - 12:24pm
 
What the hell OV? - oldviolin - May 9, 2024 - 12:12pm
 
RP on HomePod mini - RPnate1 - May 9, 2024 - 10:52am
 
Interesting Words - Proclivities - May 9, 2024 - 10:22am
 
Joe Biden - R_P - May 9, 2024 - 10:01am
 
• • • The Once-a-Day • • •  - oldviolin - May 9, 2024 - 9:40am
 
Name My Band - oldviolin - May 9, 2024 - 9:24am
 
Surfing! - oldviolin - May 9, 2024 - 9:21am
 
2024 Elections! - Steely_D - May 9, 2024 - 7:22am
 
Positive Thoughts and Prayer Requests - islander - May 9, 2024 - 7:21am
 
Breaking News - maryte - May 9, 2024 - 7:17am
 
Guns - Red_Dragon - May 9, 2024 - 6:16am
 
Song of the Day - miamizsun - May 9, 2024 - 5:44am
 
The Obituary Page - Coaxial - May 8, 2024 - 6:46pm
 
Spambags on RP - Steely_D - May 8, 2024 - 2:30pm
 
Suggestion for new RP Channel: Modern / Family - Ruuddie - May 8, 2024 - 11:46am
 
Vinyl Only Spin List - rgio - May 8, 2024 - 8:35am
 
Trump - ColdMiser - May 8, 2024 - 7:45am
 
Gaming, Shopping, and More? Samsung's Metaverse Plans for... - alexhoxdson - May 8, 2024 - 7:00am
 
SLOVENIA - novitibo - May 8, 2024 - 1:38am
 
Reviews and Pix from your concerts and shows you couldn't... - haresfur - May 7, 2024 - 10:46pm
 
Eclectic Sound-Drops - Manbird - May 7, 2024 - 10:18pm
 
Farts! - KurtfromLaQuinta - May 7, 2024 - 9:53pm
 
The RP YouTube (Google) Group - oldviolin - May 7, 2024 - 8:46pm
 
Dialing 1-800-Manbird - oldviolin - May 7, 2024 - 8:35pm
 
What Are You Going To Do Today? - Manbird - May 7, 2024 - 7:55pm
 
Photography Forum - Your Own Photos - Alchemist - May 7, 2024 - 4:18pm
 
Russia - R_P - May 7, 2024 - 1:59am
 
Mixtape Culture Club - KurtfromLaQuinta - May 6, 2024 - 8:51pm
 
Politically Uncorrect News - oldviolin - May 6, 2024 - 2:15pm
 
What can you hear right now? - maryte - May 6, 2024 - 2:01pm
 
Other Medical Stuff - kurtster - May 6, 2024 - 1:04pm
 
Rock Mix not up to same audio quality as Main and Mellow? - rp567 - May 6, 2024 - 12:06pm
 
Music Requests - black321 - May 6, 2024 - 11:57am
 
NASA & other news from space - NoEnzLefttoSplit - May 6, 2024 - 11:37am
 
USA! USA! USA! - R_P - May 6, 2024 - 9:52am
 
Global Warming - NoEnzLefttoSplit - May 6, 2024 - 9:29am
 
Tales from the RAFT - NoEnzLefttoSplit - May 6, 2024 - 9:19am
 
Food - DaveInSaoMiguel - May 6, 2024 - 4:17am
 
What Did You See Today? - KurtfromLaQuinta - May 5, 2024 - 5:28pm
 
The Abortion Wars - thisbody - May 5, 2024 - 3:27pm
 
Those Lovable Policemen - R_P - May 5, 2024 - 3:12pm
 
Ukraine - thisbody - May 5, 2024 - 12:33pm
 
volcano! - geoff_morphini - May 5, 2024 - 9:55am
 
Tesla (motors, batteries, etc) - miamizsun - May 5, 2024 - 6:16am
 
Favorite Quotes - Isabeau - May 4, 2024 - 5:21pm
 
Anti-War - R_P - May 4, 2024 - 3:24pm
 
Iran - Red_Dragon - May 4, 2024 - 12:03pm
 
Live Music - oldviolin - May 4, 2024 - 11:18am
 
SCOTUS - Steely_D - May 4, 2024 - 8:04am
 
The Dragons' Roost - GeneP59 - May 3, 2024 - 3:53pm
 
RightWingNutZ - islander - May 3, 2024 - 11:55am
 
Poetry Forum - oldviolin - May 3, 2024 - 9:46am
 
Lyrics that strike a chord today... - R_P - May 3, 2024 - 7:54am
 
Derplahoma! - sunybuny - May 3, 2024 - 4:56am
 
Unquiet Minds - Mental Health Forum - miamizsun - May 3, 2024 - 4:36am
 
What Makes You Laugh? - miamizsun - May 3, 2024 - 4:31am
 
Main Mix Playlist - R567 - May 3, 2024 - 12:06am
 
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!