RadioParadise plugin Flac, works only for a while.

Hello Marco, I do not know if you read the post where I confirm that the metadata in RP Main Mix (FLAC API) and also in RP Mellow Mix (FLAC API) are desynchronized. I’m using the Predownload Track option in Off.
There are moments that the broadcast is abruptly cut off and another topic starts from the beginning. The metadata is not synchronized at that time either.

I have this problem. Radio Paradise audio cuts out randomly. The playback timer still works.
Config:
Raspberry Pi 3
IQaudio DAC+
Volumio v 2.586
Latest Radio Paradise plugin.

I see these messages in /var/log/mpd.log when the failue happens.

Jun 14 18:48 : player: played “https://audio-3.radioparadise.com/blocks/chan/0/3/1858874-1858877.m4a
Jun 14 18:48 : exception: Bad song index
Jun 14 18:48 : client: [7] opened from 127.0.0.1:60880

Jun 14 18:42 : exception: Not playing
Jun 14 18:42 : exception: Not playing
Jun 14 18:47 : ffmpeg/aac: Input buffer exhausted before END element found
Jun 14 18:47 : ffmpeg: decoding failed, frame skipped: Invalid data found when processing input
Jun 14 18:47 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, offset 0xe34135: partial file
Jun 14 18:47 : exception: CURL failed: GnuTLS recv error (-9): A TLS packet with unexpected length was received.
Jun 14 18:48 : player: played “https://audio-3.radioparadise.com/blocks/chan/0/3/1858874-1858877.m4a
Jun 14 18:48 : exception: Bad song index
Jun 14 18:48 : client: [7] opened from 127.0.0.1:60880
Jun 14 18:49 : client: [6] closed

Jun 14 19:20 : player: played “https://audio-3.radioparadise.com/blocks/chan/0/4/1858878-1858884.flac
Jun 14 19:20 : exception: CURL failed: GnuTLS recv error (-9): A TLS packet with unexpected length was received.
Jun 14 19:21 : player: played “https://audio-3.radioparadise.com/blocks/chan/0/4/1858886-1858892.flac
Jun 14 19:21 : exception: Bad song index
Jun 14 19:21 : client: [8] opened from 127.0.0.1:33952
Jun 14 19:22 : client: [7] closed
Jun 14 19:49 : player: played “https://audio-3.radioparadise.com/blocks/chan/0/3/1858886-1858892.m4a
Jun 14 19:53 : ffmpeg/aac: Input buffer exhausted before END element found
Jun 14 19:53 : ffmpeg: decoding failed, frame skipped: Invalid data found when processing input
Jun 14 19:53 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, offset 0xa0605b: partial file
Jun 14 19:53 : exception: CURL failed: GnuTLS recv error (-9): A TLS packet with unexpected length was received.
Jun 14 19:53 : player: played “https://audio-3.radioparadise.com/blocks/chan/0/3/1858893-1858897.m4a

I am having the same problem, but on all RP streams. I have been trying to debug this with no success. Problem:
Audio stops (sometimes after a few minutes, other times after an hour or so).

Configuration:
Raspberry Pi 3 B+
Volumio 2.587
IQaudio DAC+

Output from /var/etc/mpd.log:
Jun 15 12:35 : player: played “https://audio-3.radioparadise.com/blocks/chan/0/3/1859164-1859164.m4a
Jun 15 12:39 : ffmpeg/aac: Input buffer exhausted before END element found
Jun 15 12:39 : ffmpeg: decoding failed, frame skipped: Invalid data found when processing input
Jun 15 12:39 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, offset 0xb3e04f: partial file
Jun 15 12:39 : exception: CURL failed: GnuTLS recv error (-9): A TLS packet with unexpected length was received.
Jun 15 12:40 : player: played “https://audio-3.radioparadise.com/blocks/chan/0/3/1859165-1859172.m4a
Jun 15 12:40 : exception: Bad song index
Jun 15 12:40 : client: [2] opened from 127.0.0.1:41848
Jun 15 12:41 : client: [1] closed

For now I have given up on the application due to abrupt stopping after a few songs and just added the FLAC stream to “My Web Radios”. Can’t skip or read out the artist/songtitle, but it HAS been playing for about 8 hours straight.

Here are the metadata:
api.radioparadise.com/api/now_playing?chan=1
api.radioparadise.com/api/now_playing?chan=0

OK, the new static flac streams and the new metadata endpoint make it way easier. I implemented them and as a side effect removed lots of code which is now unnecessary.

:arrow_right: So basically all the plugin does is playing the static flac stream and updating the “Now Playing” metadata.

Installation Instructions:
If you want to give it a try, please install it manually. Before doing so, please open the Volumio UI in your web browser, navigate to Settings > Plugins > Installed Plugins and both deactivate and uninstall Radio Paradise. Afterwards open a command shell (e.g. “Terminal” in macOS), ssh into your volumio machine and execute the following commands (one by one):

  • wget https://www.dropbox.com/s/gf6irg0nr8cm0jj/radio-paradise-110.zip?dl=1 -O radio-paradise.zip
  • mkdir ./radio-paradise-110
  • miniunzip radio-paradise.zip -d ./radio-paradise-110
  • rm radio-paradise.zip
  • cd ./radio-paradise-110
  • rm -Rf /data/plugins/music_service/radio_paradise
  • volumio plugin install
  • cd ..
  • rm -Rf radio-paradise-110

In the browser, navigate to Settings > Plugins > Installed Plugins and activate Radio Paradise. Now you can start the plugin and choose one of the FLAC streams.

Side notes:
It seems to work pretty smooth. If you experience out of sync metadata, please try to call the corresponding url manually (Mellow or Main mix) and check whether the song information it delivers really is the one which is playing in the static stream you are listening to. If not, it could either be a problem with the api or maybe with the audio buffer size. If you have issues, please also post the values of your “Audio Buffer Size” and “Buffer before play” values (found in the General Playback Settings in Volumio).

Fantastic Marco, I try it tonight.

:arrow_right: Another update for the plugin: you can now set a fixed delay of the metadata (Artist, Title, etc.) in the settings of the Radio Paradise Plugin.

This is necessary because there is a delay between the real-time data of the Radio Paradise api and the playback of your Volumio machine. The reason is that Volumio is caching a certain amount of data before the playback begins. Depending on your Volumio Cache settings (Playback Settings > Audio Buffer Size and Buffer Before Play) and probably on your internet speed, the delay can be longer or shorter.

In my personal case it behaves like this:
Audio Buffer Size: 8MB, Buffer Before Play: 10% (Default) > delay is 5 seconds
Audio Buffer Size: 8MB, Buffer Before Play: 40% > delay is 19 seconds
It might be completely different for you!

It’s quite easy to retrieve the correct delay: just start a FLAC stream and watch the Browser/GUI. The playback time (minutes:seconds) will start immediately but the sound won’t. So please look at the playback seconds as soon as you can listen the sound. This is your personal delay. Please set this number (in seconds) in the Plugin settings, save it and restart the FLAC stream.

The installation instructions stay the same as mentioned above.

In my case, with the default values, it works perfect.

I found the secret! I had not realized that “time” in the metadata link is continuously updated!

Exactly! That‘s actually the good thing about this new api endpoint. This way, the metadata should always stay in sync. The only thing is to find the correct offset between the api time and the actual Volumio playback.

I think there will be no problems with this method.
The gap between start and refresh of metadata is a minor detail.
We must pray that Bill does not make changes.
It would release the final version.

What are your Playback settings for „Audio Buffer Size“ and „Buffer Before Play“?

DEfault value.

And Default means 8MB / 10%?
I‘m not sure.

Yes, those are my values. A few days ago I burned a new version, those are the default values.

Just throwing this out there, in case any one else hits it.

I had to reboot Volumio after installed the latest version to get it to work correctly. After install, but before the reboot, playing the flac stream acted like it was an mp3. It had the static RP poster, no album art, no track name, and the time counter just pulsed the outer ring, without any time showing.

Cheers.

OK, I created a merge request for version 1.1.0 which is using the static flac streams. Hopefully the problems with stream interruptions is now solved for all users.

:arrow_right: github.com/volumio/volumio-plugins/pull/340

The update should be available soon via the internal GUI update mechanism.

Hello Marco, I understand that you have not modified anything regarding the beta version. Right?

That‘s right.