RadioParadise plugin Flac, works only for a while.

If something seems really buggy, report it here!

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

RadioParadise plugin Flac, works only for a while.

Postby danielfelix » Sun Aug 18 2019 23:15

Hi Marco, are stuttering and cuts taking place in RP Flac, did you notice? Maybe it's a regional problem.
I am testing the different icy-4 servers to icy-8 to see if there are any more stable ones.
We may need the option to choose the server...
regard
Daniel
RaspberryPi3 + Allo Boos DAC + Amp. Kenwood KA-400 + Focal Chorus 726 + Turntable Dual 504 + Cartdrige Shure M91E + Linear Power Unit DIY
User avatar
danielfelix
Golden Ear
Golden Ear
 
Posts: 501
Joined: Wed Feb 08 2017 16:24

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


RadioParadise plugin Flac, works only for a while.

Postby jcyr » Tue Aug 20 2019 17:35

marco79cgn wrote:As I already mentioned in the plugin thread, it's running for hours here without a problem (Pi Zero W with HiFi Berry DAC and the latest Volumio 2.522).

The RP API and the plugin basically work like this:
You get one flac file which contains up to 7 or 8 songs, so the result of the api is one flac url and the additional metadata for all the songs inside this one flac file (=name of each song, artist, length, etc.). Here's an example:
https://audio-3.radioparadise.com/blocks/chan/0/4/1798613-1798619.flac?src=alexa
As you can already see looking at the url, this one flac file contains seven songs (1798613-1798619). Actually in this exact case there are six songs and a spoken part at the end with id 1798619. You can play this whole flac file manually e.g. using VLC or even on your Pi. Be aware that it won't work without the "?src=alexa" url parameter at the end though.

So all that my plugin does is extracting the metadata, start playing the flac file (=first song) and then it's setting a simple timer with the length of the first song in order to switch the song metadata when the second song starts - still inside this same one flac file. Then there will be a new timer with the length of the second song and so on... While a timer is running, the plugin does nothing but sleeping. Now as soon as the last song of the first flac file starts, the plugin asks the RP API for the next flac file (incl. its metadata). Then it will start from the beginning and so on.

What this means:
In the meantime the plugin is doing nothing but sleeping until the next song starts. After each sleep it's refreshing the song metadata in the ui with the already pre-cached songs but Volumio/MPD just keeps playing this same flac file (!). Think of this as two independent processes: on the one hand volumio that just plays one file all the time and while this is happening a completely independent task updates the metadata in the ui during this playback. There is absolutely no communication with Radio Paradise except of course for this flac stream that is currently running. So if your playback stops in the middle of a song then the only possible reasons are either:
  • the connection to the stream is somehow lost/broken
  • a bug in volumio/mpd
Be aware that Volumio/MPD just streams the flac file, it is not downloaded completely beforehand so a stable internet connection is needed during the whole listening process. If the connection breaks, the stream will stop after a certain cache limit is reached (probably some seconds of playback).

If you look inside the log files of volumio (ssh and then "sudo journalctl -f") you can see how many songs there are inside one api event. You can see an output like this one:
Code: Select all
[RadioParadise] received new event with id 1798613 containing 6 songs.

and then
Code: Select all
[RadioParadise] set to consume mode, adding url: https://audio-3.radioparadise.com/blocks/chan/0/4/1798613-1798619.flac?src=alexa

For Volumio/MPD it looks like this is one single file/song/playlist item even though there are 6 songs inside!

I just submitted a pull request for a bugfix update but this update won't fix the situation you described if the stream is interrupted in the middle of a song. Because I don't have this problem and can't reproduce it.


It actually streams with the latest versions, but floods the logs with error messages. 2 or 3 per second!!!
Random avatar
jcyr
Fresh off the boat
Fresh off the boat
 
Posts: 8
Joined: Sun Aug 11 2019 19:20


RadioParadise plugin Flac, works only for a while.

Postby marco79cgn » Thu Aug 22 2019 13:17

Well, must be related to recent changes in Volumio 2.599. It didn't happen before (I was still on 2.555 until today) and I didn't change anything.

I'll ask Michelangelo.
User avatar
marco79cgn
Audiophile
Audiophile
 
Posts: 110
Joined: Sun Aug 27 2017 22:12
Location: Cologne, Germany

Previous

Return to Bug reports

Who is online

Users browsing this forum: No registered users and 0 guests