Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Radio stations problem
#17
(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
Reply


Messages In This Thread
Radio stations problem - by Hydra - 09-15-2022, 12:51 PM
RE: Radio stations problem - by TheOldPresbyope - 09-15-2022, 01:08 PM
RE: Radio stations problem - by Hydra - 09-16-2022, 10:58 AM
RE: Radio stations problem - by TheOldPresbyope - 09-16-2022, 03:55 PM
RE: Radio stations problem - by TheOldPresbyope - 09-16-2022, 04:40 PM
RE: Radio stations problem - by fdealexa - 02-15-2023, 05:15 PM
RE: Radio stations problem - by Tim Curtis - 02-15-2023, 05:33 PM
RE: Radio stations problem - by fdealexa - 02-15-2023, 10:41 PM
RE: Radio stations problem - by fdealexa - 09-16-2022, 11:30 PM
RE: Radio stations problem - by fdealexa - 02-12-2023, 08:44 PM
RE: Radio stations problem - by Tim Curtis - 02-15-2023, 11:01 PM
RE: Radio stations problem - by fdealexa - 02-15-2023, 11:21 PM
RE: Radio stations problem - by Tim Curtis - 02-15-2023, 11:35 PM
RE: Radio stations problem - by fdealexa - 02-15-2023, 11:53 PM
RE: Radio stations problem - by TheOldPresbyope - 02-16-2023, 01:14 AM
RE: Radio stations problem - by fdealexa - 02-17-2023, 12:10 AM
RE: Radio stations problem - by TheOldPresbyope - 02-17-2023, 02:45 AM
RE: Radio stations problem - by fdealexa - 02-22-2023, 11:25 PM
RE: Radio stations problem - by the_bertrum - 02-23-2023, 08:32 AM
RE: Radio stations problem - by fdealexa - 02-23-2023, 11:13 AM
RE: Radio stations problem - by TheOldPresbyope - 02-23-2023, 09:54 PM
RE: Radio stations problem - by fdealexa - 02-23-2023, 11:21 PM
RE: Radio stations problem - by TheOldPresbyope - 02-24-2023, 12:47 AM
RE: Radio stations problem - by fdealexa - 02-24-2023, 07:50 AM

Forum Jump: