Posts: 13,441
Threads: 305
Joined: Mar 2018
Reputation:
545
Yes, I can repro. This station stream cuts out, disconnects and is very unstable.
https://stream.and-stuff.nl:8443/riverside
I'd say it's an issue with the broadcaster.
Posts: 568
Threads: 5
Joined: Mar 2020
Reputation:
31
(02-15-2023, 11:01 PM)Tim Curtis Wrote: Yes, I can repro. This station stream cuts out, disconnects and is very unstable.
https://stream.and-stuff.nl:8443/riverside
I'd say it's an issue with the broadcaster.
Hi Tim,
thanks for the answer, but with the browser I tried for more than an hour and I didn't have any interruptions, moreover my doubt is confirmed by the fact that every 30 seconds exactly the problem occurs, and it would always seem when some information changes.
Doesn't that bother you?
Thanks again and regards,
Francesco
Posts: 13,441
Threads: 305
Joined: Mar 2018
Reputation:
545
(02-15-2023, 11:21 PM)fdealexa Wrote: (02-15-2023, 11:01 PM)Tim Curtis Wrote: Yes, I can repro. This station stream cuts out, disconnects and is very unstable.
https://stream.and-stuff.nl:8443/riverside
I'd say it's an issue with the broadcaster.
Hi Tim,
thanks for the answer, but with the browser I tried for more than an hour and I didn't have any interruptions, moreover my doubt is confirmed by the fact that every 30 seconds exactly the problem occurs, and it would always seem when some information changes.
Doesn't that bother you?
Thanks again and regards,
Francesco
It plays in Chrome just fine but not in Safari. Safari thinks its a download and wants permission :-0
MPD log shows its using the oggflac plugin so maybe its its a bug in the plugin? You could try posting in the MPD Git repo. Most stations just use MP3, AAC or FLAC. I've not run across one that uses Vorbis/OggFlac.
Feb 15 18:25 : playlist: play 71:"https://stream.and-stuff.nl:8443/riverside"
Feb 15 18:25 : decoder_thread: probing plugin vorbis
Feb 15 18:25 : decoder_thread: probing plugin oggflac
Feb 15 18:25 : decoder: audio_format=48000:24:2, seekable=false
Feb 15 18:25 : alsa_output: opened _audioout type=COPY
Feb 15 18:25 : alsa_output: buffer: size=64..65536 time=1333..1365334
Feb 15 18:25 : alsa_output: period: size=32..32768 time=666..682667
Feb 15 18:25 : alsa_output: default period_time = buffer_time/4 = 500000/4 = 125000
Feb 15 18:25 : alsa_output: format=S24_LE (Signed 24 bit Little Endian)
Feb 15 18:25 : alsa_output: buffer_size=24000 period_size=6000
Posts: 568
Threads: 5
Joined: Mar 2020
Reputation:
31
Thanks again, Tim.
Good night(have it is 1 am),
Francesco
Posts: 6,029
Threads: 177
Joined: Apr 2018
Reputation:
235
@ fdealexa
Like Tim said, this station is exercising the MPD oggflac plugin.
One trick to get more info about these radio streams is to examine the server response when connection is first made. Here's one way to do that using curl:
Code: pi@m825p3a:~ $ curl -i https://stream.and-stuff.nl:8443/riverside
HTTP/1.0 200 OK
Server: Icecast 2.4.4
Connection: Close
Date: Thu, 16 Feb 2023 01:10:10 GMT
Content-Type: application/ogg
Cache-Control: no-cache, no-store
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Pragma: no-cache
Access-Control-Allow-Origin: *
icy-br:2000
icy-description:We're your friend on the internet
icy-genre:Rock'n'roll
icy-name:Breakaway One
icy-pub:0
icy-url:http://www.breakaway.one
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file.
pi@m825p3a:~
Here I've exploited the binary-output warning/exit feature of curl to avoid actually downloading the (endless) output.
Regards,
Kent
Posts: 568
Threads: 5
Joined: Mar 2020
Reputation:
31
Thanks Kent,
I have tryed to download a couple of minutes, but I am not able to interpret the generated file. Have you any advice?
Best regards and thanks again,
Francesco
Posts: 6,029
Threads: 177
Joined: Apr 2018
Reputation:
235
(02-17-2023, 12:10 AM)fdealexa Wrote: Thanks Kent,
I have tryed to download a couple of minutes, but I am not able to interpret the generated file. Have you any advice?
Best regards and thanks again,
Francesco
I have no experience parsing an ogg container.
As a hack I captured the first 100MB of the stream and ran several LInux utilities on it.
First, just a quick look at the beginning of the captured file using the od -c command:
Code: 0000000 O g g S \0 002 \0 \0 \0 \0 \0 \0 \0 \0 � �
0000020 \a \0 \0 \0 \0 \0 � C � 223 001 3 177 F L A
0000040 C 001 \0 \0 001 f L a C \0 \0 \0 " 020 \0 020
0000060 \0 \0 \0 \0 \0 \0 \0 \v � 003 p \0 \0 \0 \0 \0
0000100 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 O
0000120 g g S \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 � � \a
0000140 \0 001 \0 \0 \0 \v 206 204 " 001 \ 204 \0 \0 X
0000160 \0 \0 \0 r e f e r e n c e l i b
0000200 F L A C 1 . 3 . 1 2 0 1 4 1
0000220 1 2 5 002 \0 \0 \0 022 \0 \0 \0 A R T I S
...
This octal dump is encouraging: it begins with the magic "OggS" as it should. (see the od docs to understand the funny glyph here.)
Let's pull out the strings. Here's the beginning output from the strings command:
Code: OggS
FLAC
fLaC
OggS
reference libFLAC 1.3.1 20141125
ARTIST=Nicki Minaj
TITLE=Beez In The TrapOggS
_^0p
NFUN
[y<fY
Q+Qw
]=>F
y`@4
...
That's beginning to look to like the format defined by the FLAC spec although not in detail.
This pattern repeats again and again in the stream, apparently before each successive track:
Code: OggS
FLAC
fLaC
OggS
reference libFLAC 1.3.1 20141125
ARTIST=...
TITLE=...OggS
My primitive analysis doesn't reveal if there are any other metadata elsewhere in the stream nor is it a practical guide to parsing the stream on the fly. For that you need the OGG and FLAC specs.
The competing ShoutCast server has an XML schema defined for metadata but I can't find a comparable document for IceCast.
Hope this brief exploration helps.
Regards,
Kent
Posts: 568
Threads: 5
Joined: Mar 2020
Reputation:
31
Hi Kent,
Thank you so much.
I researched and found 97 radio stations in FLAC: 21 of them use metadata and 15 fail.
The fail (except 1) is: when the track is changed the system (rpi) no longer plays even the "state" in the mpd status remains on PLAY. If playback is manually interrupted, the "state" changes and when it returns to play (manually) everything continues fine (with the new TITLE) until the next song change.
Below you can find a short table with the most important information. I think we need to submit an issue to the MPD github - what's your opinion?
Thanks again, sorry for the delay in responding (the search took a long time) and best regards,
Francesco
Posts: 1,870
Threads: 43
Joined: Mar 2020
Reputation:
85
(02-22-2023, 11:25 PM)fdealexa Wrote: Hi Kent,
Thank you so much.
I researched and found 97 radio stations in FLAC: 21 of them use metadata and 15 fail.
The fail (except 1) is: when the track is changed the system (rpi) no longer plays even the "state" in the mpd status remains on PLAY. If playback is manually interrupted, the "state" changes and when it returns to play (manually) everything continues fine (with the new TITLE) until the next song change.
Below you can find a short table with the most important information. I think we need to submit an issue to the MPD github - what's your opinion?
Thanks again, sorry for the delay in responding (the search took a long time) and best regards,
Francesco
That's some diligent research, well done!
----------------
Robert
Posts: 568
Threads: 5
Joined: Mar 2020
Reputation:
31
Thanks Robert,
Obviously those radio stations don't change my life, but I'm following this issue to reach a product with as few problems as possible.
Best regards and thanks again,
Francesco
|