Opened 6 years ago

Last modified 10 months ago

#7248 assigned Feature/Enhancement Request

lmo (webrtc) streaming to icecast

Reported by: https://id.mayfirst.org/mahood Owned by: https://id.mayfirst.org/mahood
Priority: Medium Component: Tech
Keywords: webtc icecast streaming Cc: support-team@…
Sensitive: no

Description

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 https://live.mayfirst.org to broadcast the audio and/or video communication between the participants of the lmo room to [a.stream.mayfirst.org:8000]. 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 live.mayfirst.org/?<room name> to have live.mayfirst.org/streaming?<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.

~mv

Change History (15)

comment:1 Changed 6 years ago by https://id.mayfirst.org/mahood

  • Owner set to https://id.mayfirst.org/mahood
  • Status changed from new to assigned

Something to look at https://npmjs.org/package/webrtc-stream

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("http://discoverynetwork.co/service")

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

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

seems there is likely more than just switching url

MediaStream.local(localVideo, function (myMediaStream) {
    var conn = Connection("http://discoverynetwork.co/service")

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

~mv

comment:2 Changed 6 years ago by https://id.mayfirst.org/mahood

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

https://webrtc-experiment.appspot.com/broadcast/

~mv

comment:3 Changed 6 years ago by https://id.mayfirst.org/jamie

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 6 years ago by https://id.mayfirst.org/mahood

Jamie,

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.

~mv

comment:5 Changed 6 years ago by https://id.mayfirst.org/jamie

comment:6 Changed 6 years ago by https://id.mayfirst.org/jamie

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

https://github.com/muaz-khan/WebRTC-Experiment/issues/28

To request support for icecast2

comment:7 Changed 6 years ago by https://id.mayfirst.org/jamie

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

https://github.com/Raynos/webrtc-stream/issues/1

comment:8 Changed 6 years ago by https://id.mayfirst.org/jamie

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

comment:9 Changed 6 years ago by https://id.mayfirst.org/mahood

This came from the github ticket jamie filed in the discussion on peer-to-icecast2 someone references the development done here http://lynckia.com/licode/

~mv

comment:10 Changed 6 years ago by https://id.mayfirst.org/mahood

comment:11 Changed 6 years ago by https://id.mayfirst.org/jamie

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!

jamie

comment:12 Changed 5 years ago by https://id.mayfirst.org/jamie

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

https://github.com/muaz-khan/WebRTC-Experiment/issues/28#issuecomment-20791759

comment:13 Changed 5 years ago by https://id.mayfirst.org/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.

https://github.com/babelroom/wraprtc Which specifically mentions broadcasting

and

https://github.com/babelroom/elgg-mod_babelroom though this seems related to #7250

Anyway though I would chime in with this

~mv

comment:14 Changed 3 years ago by https://id.mayfirst.org/jamie

Another possible piece for this issue: http://binaryjs.com/

comment:15 Changed 10 months ago by https://id.mayfirst.org/jamie

Never say never - finally possible. I've published generic code here: https://gitlab.com/jamie/icecast-web-source-client

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

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.