Opened 8 years ago

Last modified 19 months ago

#7248 assigned Feature/Enhancement Request

lmo (webrtc) streaming to icecast

Reported by: Stephen Mahood Owned by: Stephen Mahood
Priority: Medium Component: Tech
Keywords: webtc icecast streaming Cc: support-team@…
Sensitive: no


This idea stems from using google-hangout broadcasting tool the other day for a cyberunions first attempt to produce live show.

The google-hangout uses webrtc as its infrastructure and has a way to send the webrtc hangout to a youtube live stream. This is done with marking before the room is created that one seeks to make this be a broadcast. When the participants in the room, in the background it seems google is creating the youtube page. After the page is created it provides a video feed stating that the broadcast has not started yet and will momentarily. Then when the participants are ready they click start broadcast and with about a 10 second delay the broadcast appears on the youtube or places it has been embedded via the youtube page. After the live stream is ended then there is a youtube video recorded and available immediately. This experience brought some ideas forward with our existing infrastructure of our icecast server.

Here is what I am envisioning that we can achieve something very similar using our lmo site and streaming to our icecast server.

In abstract the we need a way for either a script to be run from to broadcast the audio and/or video communication between the participants of the lmo room to []. The script would likely borrow from the mobi script to create the room and show the room at the bottom of the lmo room as a link to share. The decision to broadcast I think should be an option before creating the room this way, the creating of the icecast stream page and all can be done while the participants prepare. I think making the option for video or audio when creating the room will expand the opportunities to this, so it could be just an audio stream. Eitherway this would give a chance to integrate icecast streaming in a simple form of using a webrtc to create it, in other words, simple and easy.

Ross and I began ideas about this like when creating the streaminging room instead of the existing<room name> to have<room name> This would I think help in the "streaming" part to call the script to icecast and begin whatever we need to pull the audio and/or video stream from the participants system to the server.

one further step would be if the broadcasters would like to have a recorded copy of what they stream available for uploading to vimeo or youtube or other video sites (not sure if this part needs its own ticket).

There is a lot to fill in but I think we could get this working with our existing infrastructure.


Change History (17)

comment:1 Changed 8 years ago by Stephen Mahood

Owner: set to Stephen Mahood
Status: newassigned

Something to look at

var WebRTC = require("../../browser")
    , MediaStream = WebRTC.MediaStream
    , WebRTCStreams = WebRTC.WebRTCStreams
    , DiscoveryNetwork = require("discovery-network")
    , Connection = DiscoveryNetwork.Connection

var localVideo = document.getElementById("local-webrtc")
    , remoteVideos = document.getElementById("remote-videos")

MediaStream.local(localVideo, function (myMediaStream) {
    var conn = Connection("")

    WebRTCStreams(conn, "mediaStreams-demo", myMediaStream, renderStream)

    function renderStream(remotePeerId, stream) {
        var remoteVideo = document.createElement("video")
        remoteVideo.autoplay = true
        MediaStream.remote(remoteVideo, stream)

seems there is likely more than just switching url

MediaStream.local(localVideo, function (myMediaStream) {
    var conn = Connection("")

The code if it works seems pretty direct, not sure how it would negotiate with icecast but seems a little scripting might do it.


comment:2 Changed 8 years ago by Stephen Mahood

The following is another example and seems to be better documented and more recent commits


comment:3 Changed 8 years ago by Jamie McClelland

This is a great idea mv. I agree, it would really round out lmo I think what we need is a JavaScript icecast source client. all my searching has turned up nothing

I wonder if an email to the icevast dev list might help?

comment:4 Changed 8 years ago by Stephen Mahood


I took your advice after searching the icecast forums and the recent months of their mailing list and send a message to the list itself. Hopefully it brings a response.


comment:6 Changed 8 years ago by Jamie McClelland

I opened an issue on the webrtc-experiment issues page:

To request support for icecast2

comment:7 Changed 8 years ago by Jamie McClelland

And here's a link to a request on the webrtc-stream issue tracker:

comment:8 Changed 8 years ago by Jamie McClelland

It would be great to have this running by June 7 for our left forum panel (#6884).

comment:9 Changed 8 years ago by Stephen Mahood

This came from the github ticket jamie filed in the discussion on peer-to-icecast2 someone references the development done here


comment:11 Changed 8 years ago by Jamie McClelland

That documentation looks really promising mv - particularly for additions to lmo as it currently works. Getting desktop sharing would be great. It also suggests that we could access an audio/video stream and possibly using http put to send it to icecast2.

This is how the icecast2 developers suggests we implement a icecast source client in javascript.

Meanwhile, the webrtc-experiment developer says that using http put will not work because it won't be in a real time and asks if icecast supports SDP. SDP is a protocol that helps two parties initiate a stream.

mv: I suggest the next step: post to the same thread on the icecast2 dev list, with a link to the webrtc-experiment comment, saying that we've been advised against using http put because it won't be in real-time, and ask if icecast2 supports SDP or if anyone has an alternative opinion on how to get it working.

Nice work staying on top of this mv!


comment:12 Changed 8 years ago by Jamie McClelland

The author of webrtc-experimented posted a helpful looking comment:

comment:13 Changed 8 years ago by Stephen Mahood

While researching elgg/lorea social network I came across something that might also be helpful here..I am not able to make sense of the code specifically, but it seems promising as well. Which specifically mentions broadcasting

and though this seems related to #7250

Anyway though I would chime in with this


comment:14 Changed 6 years ago by Jamie McClelland

Another possible piece for this issue:

comment:15 Changed 4 years ago by Jamie McClelland

Never say never - finally possible. I've published generic code here:

And I plan to launch this as a service for MF/PL members using the domain (currently running the soon to be deprecated experimental webrtc conferencing).

comment:16 Changed 2 years ago by updater

Sensitive: set

Changed to sensitive as part of leadership decision to make all tickets sensitive.

comment:17 Changed 19 months ago by Jamie McClelland

Sensitive: unset

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.