0

Is it possible to use Objective-C to broadcast audio using the Icecast protocol?

For Node.JS I've found the library nicercast which seems to work pretty well. Is there an open-source equivalent for Objective-C or do I have to implement the protocol myself?

If I'll have to implement the protocol myself, then what do I need to know? From the Node.JS Library I've seen that essentially, the server broadcasts an MPEG-stream using a normal web server and just sending the raw data over to the client.

Does this MPEG stream contain the metadata or do I have to send it separately?

Thanks in advance

Leo Bernard
  • 154
  • 1
  • 9
  • 1
    To be clear, you're not actually trying to make a source client for Icecast... you're trying to build an HTTP progressive streaming server that is compatible with Icecast/SHOUTcast in Objective C? – Brad Jan 13 '15 at 22:24
  • 1
    See also: http://stackoverflow.com/questions/9239022/broadcast-to-icecast-shoutcast-with-objective-c-c-or-c?rq=1 Also, these days Icecast supports a simple HTTP PUT request. I recommend going that route. – Brad Jan 13 '15 at 22:25
  • Thanks. I'll look into that. – Leo Bernard Jan 14 '15 at 00:06

1 Answers1

1

Why not stream to an Icecast server instead? It's small enough to even run on embedded devices without big issues. The nicercast implementation is nowhere close to being "Icecast compliant" as they claim. If you want to know why, look at the Icecast sources or e.g. the supported formats.

I know it's en vogue to reinvent the wheel, badly and incompletely. But I'm at least going to remind you that it's not necessarily a good idea.

TBR
  • 2,339
  • 1
  • 9
  • 20
  • Thanks for the hint. Do you think it is possible to embed the Icecast server into an application in a way that it can still be submitted into the Mac App Store? Also, is there a library for Objective-C that allows me to stream to an Icecast server? – Leo Bernard Jan 13 '15 at 08:01
  • I know that Nicecast does something like that. They bundle their own Icecast build and provide its sources/patches upon request (for compliance). Please be sure to comply with the Icecast license though (GPLv2). Currently known programming language bindings of libshout are listed here: http://icecast.org/download/#bindings -- I'm not familiar with Objective-C, but it might just be able to use libshout as a C library directly. – TBR Jan 28 '15 at 13:28