Re: How do you escape characters within the metadata block
"Thomas B. Rücker" <[email protected]>
| Newsgroups | gmane.comp.audio.icecast.devel |
|---|---|
| Message-ID | <[email protected]> |
On 07/06/2014 06:43 AM, John Selbie wrote: > When "Icy-MetaData: 1" is in the HTTP request to the server, that > indicates that the client wants to receive meta data inlined with the > mp3 data stream. The metadata interval is reported by the server via > the "icy-metaint" header in the response stream. > > Such data looks like the following within the mp3 stream > > StreamTitle='Ozzy Osbourne - Crazy > Train';StreamUrl='http://myserver.org'; > > Essentially a series of name/value pairs formatted with single-tick > quotes around each value and delimited with Equals and Semicolon chars. > > Here is the question. If the song title itself contains a quote char > in it: > > StreamTitle='Destiny's Child - Emotion'; > > How is the tick mark within that stream title expected to be escaped > such that the StreamTitle isn't parsed as just "Destiny" ? > > Is it a URL Encoding (StreamTitle='Destiny%27s Child - Emotion';) ? > > A C style Encoding (StreamTitle='Destiny\'s Child - Emotion';) ? > > Or something else? > > I didn't see any escape code in the icecast server sources. But I did > see URL encodings for metadata in the libshout broadcast client > sources. So I suspect that's the answer. But I wasn't sure if the > server did any re-encoding on the strings. > > Can someone confirm? That's legacy-metadata, modelled after Shoutcast. So you'd need to look how they do it and how players then expect it. It is possible that there is a genuine bug in Icecast for not escaping this, but the core team has no time to spend on legacy support. So if someone wants to see this fixed, send a patch please, together with some explanation how it follows general practice (there is no standard). Cheers Thomas _______________________________________________ Icecast-dev mailing list [email protected] http://lists.xiph.org/mailman/listinfo/icecast-dev