[Icecast] html5/js source client?

Brad Isbell brad at musatcha.com
Mon May 5 23:01:19 UTC 2014


Thanks everyone!  I will answer your questions regarding the AudioPump Web
Encoder (http://demo.audiopump.co:3000/):

*> Can you please explain the process exactly? what is the encoding server?*

There is a server built on Node.js that receives audio data, control data,
and metadata from the client over a binary websocket.  All of these are
multiplexed down the same connection.  When the server receives audio data,
it will pass it off to an external encoder via STDIO.  For testing
purposes, I am using FFmpeg, but you can use anything you want.  All that
matters is that it accepts PCM and outputs something that I can send to the
streaming server.

*> is your code production-ready?*

It is close.  The code works well for the users that are using it in
production today, but I would certainly like to test with more users and
browsers.  One challenge are browser bugs that I can't do much about.  For
instance, the VU metering doesn't work in stereo on Firefox because the
Firefox splitter node is broken.  Some folks have used this software to do
live remotes on both mobile and desktop with success.  Most of the issues I
have seen have been already patched in development versions of the
browsers, so it is just a matter of time before they are handled in the
releases.

*> can it work with Icecast?*

Yes, you can use SHOUTcast mode with Icecast currently.  Due to requests
from the community, I will implement HTTP PUT support to add compatibility
with Icecast 2.4.  This shouldn't be too hard to finish... it's a feature I
had been planning for.  I will e-mail the list again when this
functionality is enabled (or if that is considered spam, let me know and I
will only e-mail those that replied to me).

*> Out of curiosity, what are you using as the intermediate codec?*

Only PCM is possible today, with the Web Audio API.  Even if the browser
supports the codec, it is only accessible with WebRTC calls.  I originally
went down the path of a server-side WebRTC client.  This proved to be a
nightmare and not really feasible at the moment.  One guy seems to have
gotten it working over a year ago by importing a huge chunk of Chromium
(libjingle and all that), but that code doesn't seem to work anymore due to
the internal structure of Chromium changing dramatically.  Running the
binaries he built result in segfault.  If anyone knows of a way to record
WebRTC server-side, please let me know.  I'm sure this will be possible in
the near future, but for now it's too difficult (at least for me).  In the
mean time, I am sticking with PCM.  I convert the 32-bit floating point
samples from the Web Audio API into 16-bit or 8-bit samples, and then
convert them back up server-side.  The intent is to adjust for bandwidth
conditions on the fly, but for now I just let the user pick the desired bit
depth.  Since the server converts it back up to 32-bit before sending to
the encoder, you can change bit-depth on the fly mid-stream.  In the
future, I hope to add some client-side codec (at least FLAC).  I also need
to be cautious of licensing, if I am going to include a codec via
JavaScript.  If there is a silver lining, it's that you only compress once
with this method, giving you better quality audio than re-compressing
something that was already encoded lossy.

*>  will it be open source or is this a commercial solution?*

Commercial.  I am developing software to help improve internet radio, and
have just started AudioPump, Inc. <http://audiopump.co> to help with that
goal.  If at some point I can make other products more profitable, I would
love to open source some of my work.  But, that is not something I can do
at the moment.  If you have interest in using this or part of it
commercially, please contact me at brad at audiopump.co.  with information on
your project and we can chat about it.

*> Wow! That screams for integration with Icecast2 web admin panel if
opensourced!!*

Thanks for the note, but even if open sourced, I don't think it would be a
good candidate for integration due to its reliance on Node.js.  Icecast
developers could certainly develop something similar, however.  If I were a
C++ developer, I would definitely consider contributing.  If any Icecast
developers have questions about the implementation, I am happy to help with
any information I can provide.




Brad Isbell
brad at musatcha.com
http://www.musatcha.com


On Sun, May 4, 2014 at 10:30 AM, Xabier Oneca -- xOneca <
xoneca+icecast at gmail.com> wrote:

> 2014-05-03 18:40 GMT+02:00 Brad Isbell <brad at musatcha.com>:
> > The general idea was to make a really simple source client that could be
> > launched with a single click (such as from a hosting provider's admin
> > panel).  The client accepts parameters on the query-string for
> configuring
> > so that in a real-world environment, the user would not have to configure
> > anything.  It is also built in such a way that the UI can be thrown away,
> > leaving the back-end code to integrate into another application.
>
> Wow! That screams for integration with Icecast2 web admin panel if
> opensourced!!
>
> Cheers,
>
> Xabier Oneca_,,_
> _______________________________________________
> Icecast mailing list
> Icecast at xiph.org
> http://lists.xiph.org/mailman/listinfo/icecast
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/icecast/attachments/20140505/9f25ae81/attachment.htm>


More information about the Icecast mailing list