Sending camera video from browser to server
Asked Answered
F

3

29

Im trying out the new and exciting features of chrome canary 19.

I can basically grab the video from the web-cam and set it to a source element for a video tag.

<!DOCTYPE html>
<html>
    <head>
    <title>Camera capture</title>
    <script>
        var localStream;
        var localStreamObjUrl;
        window.onload = function() {
            navigator.webkitGetUserMedia("audio, video", gotStream);
        }
        function gotStream(stream) {
            localStream = stream;
            localStreamObjUrl = webkitURL.createObjectURL(localStream);
            var video = document.getElementById("selfView");
            video.src = localStreamObjUrl;
        }
    </script>
</head>
<body>
    <video id="selfView" autoplay audio=muted></video>
</body>
</html>

From the example at https://apprtc.appspot.com, we can grab the video and stream it to a peer...

My question is, can I avoid doing all the traversal to get a p2p connection and directly upload the video to a server? Id like to be able to relay the video stream instead of sending it p2p.

Firstly answered 10/2, 2012 at 2:19 Comment(1)
I'm interested to see if anyone has some insight into this.Leyden
D
6

You need some kind of streaming media server on the back.

The process would be:

  1. capture the feed
  2. send it to the server
  3. transcode to various client formats
  4. manage the outbound streams

There are numerous free and paid varieties available:

More about transcoding: xuggler
The 'swiss army knife' of media: ffmpeg

and so on.

Dossier answered 13/1, 2013 at 13:30 Comment(0)
T
1

I have developed video recording solutions for the better part of the last 5 years and contributed a lot to fixing video recording bugs in Red5.

On the desktop you can use a Flash client + a media server (Red5, Wowza, Adobe Media Server) and on the mobile you can use HTML Media Capture.

I gave a detailed answer on a similar question at Record video on browser and upload to LAMP server

Tundra answered 24/2, 2015 at 13:37 Comment(0)
G
0

You can try nimbb, in which they have Flash-based and HTML5 capturing. After that, you can push the video to Brightcove to transcode it to various clients format.

They have API integration. The only issue is the cost.

Goose answered 14/5, 2013 at 12:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.