I am working on a concept where people can go live using their webcam. So basically it's a web app. I am using webRTC concept. My code is pretty basic but still have a look :
<script>
(function () {
console.log('here');
navigator.getMedia = navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia;
window.hasUserMedia = function hasUserMedia() {
return navigator.getMedia ? true : false;
};
var errorcallback = function (e) {
console.log('errorCalback: ' + e);
};
navigator.getMedia({
video: true,
audio: true
},
function (stream) {
var video = document.getElementById('live'),
webcamstream, streamrecorder,
vendorUrl = window.URL || window.webkitURL;
console.log(video);
video.src = vendorUrl.createObjectURL(stream);
//webcamstream = stream;
//video.play();
video.onloadedmetadata = function (e) {
var counter = 0;
counter++;
console.log(e);
console.log(video.src);
};
}, errorcallback);
})();
This video.src
gives a source but i think it's in blob format.
the output is something like mediastream:http://localhost.movyt.com/8b57e486-a985-4331-b9ab-0eaf6def3404
.
Well blob formats can't be published. We need to encode it to RTMP encoded.
My question is how would i encode it with out any third party softwares because as a end user i will not likely install any software for signing up a website.
I tried with flash for live streaming but there is a need to install flash live encoder which i don't want to use as it won't be user friendly. There are pretty dedicated servers like wowza, dacast and all but they need RTMP encoded video streams for further processing .
note: I tried with a <video src=video.src>
in another page but it won't fruit into any result because as per the previous code written video.src
is coming from video metadata
.
So is there any way to encode my blob video to RTMP protocol?