[Icecast] Best method of grabbing Now Playing metadata with PHP?

Robert Jeffares jeffares.robert at gmail.com
Sun Sep 15 21:31:53 UTC 2019


Hi Thomas,

I use a program called streamgrabber which will record an mp3 stream and 
produce a .cue file which contains the data you seek.

The .cue is a basic text file. This is a sample..

TRACK 01 AUDIO
     TITLE "xxx"
     PERFORMER "xxx"
     INDEX 01 00:00:00
   TRACK 02 AUDIO
     TITLE "xxxS"
     PERFORMER "xxx"
     INDEX 01 04:15:00
   TRACK 03 AUDIO
     TITLE "xxx"
     PERFORMER "xxx"
     INDEX 01 05:56:00

Once you have the metadata you can manage it as you wish.

I run it from a shell script which is set up to record an hour at a time.

I don't use streamgrabber to get the metadata, I use it for a logger, 
the cue file is a by product.

You may need to run it on your stream to make sure it gets the data you 
seek.

I run on a Ubuntu server it also runs on Windows

https://sourceforge.net/projects/streamgrabber/


hopefully it solves your problem.

regards

Robert




More information about the Icecast mailing list