janbar / noson-app

The essential to control music from your SONOS devices on Linux platforms
GNU General Public License v3.0
340 stars 28 forks source link

noson cli: problems with PLAYURL #208

Open RanTalbott opened 1 year ago

RanTalbott commented 1 year ago

PLAYURL appears to work correctly for .flac files. It would be nice to have a QUEUEURL command, though. I don't see tags, but they don't have any because I made them by using ffmpeg to do a format conversion from the oggs that I usually use for PC playing.

For mp3 files, it uses the x-rincon-mp3radio protocol instead of http. It transfers the file, but doesn't show the duration or the tags, and the file plays continuously until STOPped or replaced by another PLAYURL.

For oggs, it also uses x-rincon-mp3radio. The files don't play, and the status of the player status is ERROR_NO_PLAYABLE_CONTENT. I suspect this is because the mp3radio protocol driver is trying to interpret the ogg as an mp3, but that's only a guess based on the name. Playing the same files through the GUI works correctly, including having the duration and tags show up in the response to a cli STATUS command. Sonos online docs say they support ogg and mp3 via HTTP, but don't say whether they interpret the tags. But "no tags" would definitely be an improvement over "no sound". ;-)

If you tell me where the protocol gets assigned, I can try a patch to see whether it cures the problem.

janbar commented 1 year ago

It doesn't need a patch because the noson gui handles that already. The playurl from cli is first intented to play a radio stream. The sample I explained before was made to demonstrate how this app works. But the Sonos device needs more meta than a simple url to play a media. Look in the code of the file player.cpp.