<div dir="ltr"><div>Following up on this topic ( sorry if this starts a new thread but I just joined the ml ),<br><br>I do no understand why it is not possible to use the audio stream from webRTC&#39;s getUserMedia and then send it over a websocket ?<br>

<br></div><div>It seems that the webRTC implementation can natively encode in ogg format in stereo from any interface ( according to <a href="https://github.com/muaz-khan/WebRTC-Experiment/tree/master/RecordRTC">https://github.com/muaz-khan/WebRTC-Experiment/tree/master/RecordRTC</a> ).<br>

</div><div>Why wouldnt it be suitable ?<br><br></div><div>In the other, I assume, like Jamie, that there is a way to send it over a PUT request. Isnt it ?<br><br></div><div>y.<br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">

<pre>Hi Jamie,

The webRTC API does not sound suitable for source-&gt;server streaming
for many reason. For instance, the peer-to-peer connection requires
input from both end and seems quite unfeasible to implement in a
server. Likewise, codecs are completely abstracted and much more.

In reality, webRTC is an API to acheive full-duplex conversations a-la
skype and not for streaming.

For these reasons, we at liquidsoap have been working on implementing
a simple websocket protocol for sending source streams from a browser
to a server. The protocol is documented and implemented there:
  <a href="https://github.com/savonet/webcast">https://github.com/savonet/webcast</a>

We also have a pull request on liquidsoap that implements the protocol
and should be merged fairly soon:
  <a href="https://github.com/savonet/liquidsoap/pull/90">https://github.com/savonet/liquidsoap/pull/90</a>

The bottlenecks right now are the availability of the Web Audio API,
which is only partially implemented in firefox and the encoding speed.

Because there is no native encoding API for browser-side javascript,
we have (temporarily?) resorted to using javascript-compiled libraries
for mp3 encoding. However, only firefox seems to show suitable
performances for mp3 encoding, using the libshine build and thanks to
its asm.js support.
  <a href="https://github.com/savonet/shine/tree/master/js">https://github.com/savonet/shine/tree/master/js</a>

On the other hand, only chrome implements the adequate Web Audio API,
but is too slow to encode :-o

All in all, if we keep forging, it is very likely that once mozilla
finishes implementing the web audio API, we should have a function
browser source client using firefox. And Chrome when their asm.js
perfs improve as well.

Romain
2013/7/23 Jamie McClelland &lt;<a href="http://lists.xiph.org/mailman/listinfo/icecast-dev">jm at mayfirst.org</a>&gt;:
&gt;<i> I&#39;m following up on a thread started by Stephen a couple months ago about
</i>&gt;<i> building a JavaScript source client using webrtc.
</i>&gt;<i>
</i>&gt;<i> The first step suggested was to figure out how to mux the audio and video.
</i>&gt;<i> After I posted a feature request on the webrtc experiment js library, we
</i>&gt;<i> seem to have a solution:
</i>&gt;<i> <a href="https://github.com/muaz-khan/WebRTC-Experiment/issues/28#issuecomment-20791759">https://github.com/muaz-khan/WebRTC-Experiment/issues/28#issuecomment-20791759</a>
</i>&gt;<i>
</i>&gt;<i> Based on the last comment on the icecast Dec list, we now only need to do do
</i>&gt;<i> an HTTP put request to the icecast server (
</i>&gt;<i> <a href="http://lists.xiph.org/pipermail/icecast-dev/2013-May/002171.html">http://lists.xiph.org/pipermail/icecast-dev/2013-May/002171.html</a>).
</i>&gt;<i>
</i>&gt;<i> Great! I&#39;ve got my jquery ready, but am having trouble finding docs on how
</i>&gt;<i> to build the put request. I tried looking at the libshout source, but my c
</i>&gt;<i> skills aren&#39;t quite good enough to figure it out.
</i>&gt;<i>
</i>&gt;<i> Any help would be appreciated, particularly with an example.
</i>&gt;<i>
</i>&gt;<i> Thanks for all your work on icecast - we use it a lot here at May
</i>&gt;<i> First/People Link.
</i>&gt;<i>
</i>&gt;<i> Jamie
</i>&gt;<i>
</i>&gt;<i> _______________________________________________
</i>&gt;<i> Icecast-dev mailing list
</i>&gt;<i> <a href="http://lists.xiph.org/mailman/listinfo/icecast-dev">Icecast-dev at xiph.org</a>
</i>&gt;<i> <a href="http://lists.xiph.org/mailman/listinfo/icecast-dev">http://lists.xiph.org/mailman/listinfo/icecast-dev</a>
</i>&gt;</pre></blockquote></div>