minchevz
minchevz

Reputation: 215

What is the best solution for Live-cam Service in web application?

I am trying to setup a web-based Live webcam streaming service(Using laravel framework php) where a user can broadcast live via webcam (Web based Only). For example:

User X Starts a webcam-Broadcast at http://localhost/userx while Users Y,Z etc join that room on http://localhost/userx will be able to watch the live webcam/stream.

I was playing around with node.js and socket.io library for realtime chat and it works fine. But I have no idea about webcam streaming.

Should i use webrtc? How many viewers can handle the broadcaster if i use Webrtc ? What is best solution for handling around 1000-2000 viewers? Any suggestion would help me a lot.

Upvotes: 3

Views: 2065

Answers (1)

Tal Avissar
Tal Avissar

Reputation: 10314

Why not use the node-camera module which enables you to access and stream web camera in nodejs using opencv and websockets.

This the command you should run in order to run it:

npm start -- [-open] [-wsport websocketPort] [-webport webserverport] [-res widthxheight]

where the options passed to run it are:

-open Open streaming url on startup

-wsport Web socket port for streaming media

-webport Web server port

-res Resolution for preview image

-input Input source. ( eg. ip camera url)

There are few more libraries such as ffmpeg, vlc and OpenCV which are available using webcam access that can be written as node's native addon

Upvotes: 0

Related Questions