[Icecast] Problems with metadata updates
Philipp Schafft
phschafft at de.loewenfelsen.net
Wed Aug 8 11:54:18 UTC 2018
Good afternoon,
On Tue, 2018-07-31 at 10:36 -0400, Jordan Verner wrote:
> Hi,
> I am writing a source client (from scratch).
Mind to share a link with the community?
> I’ve got the actual audio streaming part worked out just fine, but the
> metadata has me scratching my head a little bit.
> According to the docs, to update metadata for an mp3 stream
Yes. And only for MP3 and AAC this holds true. Also note that MP3 and
AAC are not officially supported by Icecast. They may work, but that's
it. We recommend to use Opus for most applications.
> you’re supposed to issue an http request like this:
> http://hostname:port/admin/metadata?mode=updinfo&mount=/station&song=test <http://hostname:port/admin/metadata?mode=updinfo&mount=/station&song=test>
Yes.
> If I send this request authenticated with the source
> username/password, I get this, and the metadata is not updated:
> <iceresponse>
> <message>Mountpoint will not accept URL updates</message>
> <return>1</return>
> </iceresponse>
> If I issue the same request but authenticate it using the admin
> password, it works and shows the following:
> <iceresponse>
> <message>Metadata update successful</message>
> <return>1</return>
> </iceresponse>
The above message is returned if:
* the internal handler for the format does not support the
operation (again, this is only for MP3 and AAC as they do not
support metadata themself); not the case here as it works with
admin credentials.
* You are sending the data from a different source IP than the
source (the audio data connection) is connected from.
This check is there for reasons of security. Without it there is an
attack with one DJ hijacking the stream of another DJ of the same
station. This has been seen in the wild and is an inherent problem of
MP3 and AAC.
> Lastly, if I hit admin/metadata.xsl instead of admin/metadata, and
> authenticate with source credentials and the exact same query
> parameters, it updates successfully, but of course returns a full HTML
> admin page instead of just the simple xml response.
Yes. As now you're no longer the source client but an actual user.
> For now I’m having to hit the metadata.xsl page and then probe the
> resulting HTML for the words metadata update successful instead of
> being able to do it the intended way as per the example in the
> documentation.
Please don't. The HTML is NOT for parsing.
> Also, are there any other valid mode strings besides updinfo?
No.
Hope this reply was helpful.
With best regards,
--
Philipp Schafft (CEO/Geschäftsführer)
Telephon: +49.3535 490 17 92
Löwenfelsen UG (haftungsbeschränkt) Registration number:
Bickinger Straße 21 HRB 12308 CB
04916 Herzberg (Elster) VATIN/USt-ID:
Germany DE305133015
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://lists.xiph.org/pipermail/icecast/attachments/20180808/278ec3be/attachment.sig>
More information about the Icecast
mailing list