Jump to content

Music stream metadata encoding


Recommended Posts

I have scripts that read the metadata from streams (forwarded by Firestorm) and there are occassions when the data has clearly been coded , but not in a way that I can make sense of.

For example, I receive

    Enrico Pieranunzi/Thomas Fonnesb%3*%1-k/Andr%3* Ceccarelli - The Heart of a Child

where I expect to see

    The Heart of a Child · Enrico Pieranunzi · Thomas Fonnesbæk · André Ceccarelli

I should add that most of the time most ascii characters come through without issue, that is I see diacriticals and so on.

I am baffled as to why these characters are encoded (presumably by the streaming service) and how to undo the encoding. Anybody  have a clue ?.

This behaviour turns up on serveral streams, although I'm not sure whether it is one or more stream providers.

 

 

Link to comment
Share on other sites

7 minutes ago, Bavid Dailey said:

    Enrico Pieranunzi/Thomas Fonnesb%3*%1-k/Andr%3* Ceccarelli - The Heart of a Child

That looks somewhat like URL encoding, which llUnescapeURL would fix, but doesn't look like that fixes that specific example.

  • Like 1
Link to comment
Share on other sites

That might be a way to hide what song is played, just enough to avoid getting DMCAed by a record label.  The track name is legible to listeners, but bots scanning for everybody playing songs from the Universal Music catalogue, for example... those bots will miss it.  A track name like that might even poison some SQL implementations on a bot like that, for all I know.  I don't really know SQL very well, but I can see how those slashes and stuff might translate into something like drop table, maybe?  That's probably a stretch.

Link to comment
Share on other sites

@Bavid Dailey

does the station you are using show what encoding they are using?

Looks like it's not UTF-8 mebbe?

can you check with something like this?

key  XMLRequest;
default
{
    state_entry()
    {       
    }
    touch_start(integer total_number)
    {  
        string url = "http://whatisland.macchiatomedia.org:8118/stats?sid=1";       
        XMLRequest =
             llHTTPRequest( url , [HTTP_USER_AGENT, "XML-Getter/1.0 (Mozilla Compatible)",
             HTTP_METHOD, "GET", 
             HTTP_MIMETYPE,"application/xml;charset=utf-8", 
             HTTP_BODY_MAXLENGTH,16384,
             HTTP_PRAGMA_NO_CACHE,TRUE], "");   
    }
    http_response(key k,integer status, list meta, string body)
    { 
        if(k ==  XMLRequest)   
        {  
            if(status != 200)
            {  llOwnerSay("error code\n");              
               return;   
            }
            llOwnerSay("Body: \n" + body);    
            llOwnerSay("Meta: " + llDumpList2String( meta, "\n") );
        }
    }
}

I checked this shoutcast station and i see this...

Quote

[08:14] Object: Body:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><SHOUTCASTSERVER><CURRENTLISTENERS>4</CURRENTLISTENERS><PEAKLISTENERS>58</PEAKLISTENERS><MAXLISTENERS>5000</MAXLISTENERS><UNIQUELISTENERS>4</UNIQUELISTENERS><AVERAGETIME>37371</AVERAGETIME><SERVERGENRE>Contemporary Reggae</SERVERGENRE><SERVERGENRE2></SERVERGENRE2><SERVERGENRE3></SERVERGENRE3><SERVERGENRE4></SERVERGENRE4><SERVERGENRE5></SERVERGENRE5><SERVERURL>http://www.itswhatisland.com</SERVERURL><SERVERTITLE>WHAT?! Island</SERVERTITLE><SONGTITLE>Byron Lee &amp; the Dragonaires - Tiny Winey</SONGTITLE><STREAMHITS>16202</STREAMHITS><STREAMSTATUS>1</STREAMSTATUS><BACKUPSTATUS>0</BACKUPSTATUS><STREAMLISTED>1</STREAMLISTED><STREAMPATH>/stream</STREAMPATH><STREAMUPTIME>1631032</STREAMUPTIME><BITRATE>128</BITRATE><SAMPLERATE>44100</SAMPLERATE><CONTENT>audio/mpeg</CONTENT><VERSION>2.5.5.733 (posix(linux x64))</VERSION></SHOUTCASTSERVER>

ETA: sorry, i think that is the XML encoding, but you may still be able find the ID3 tags if they are included?.. if they are using non-standard encoding, they should list what they are using ?

Edited by Xiija
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...