Jump to content

Stream Webcam to browser (Python or PHP)

Joveice

Hello,

 

I followed this guide: http://manmade2.com/simple-home-surveillance-with-opencv-python-and-raspberry-pi/

Now I can see the webcam in the browser, it's laggy and only 1 instance can view the feed at once.

What can I do to make it better?

 

Is there a better way to do this?

 

Optionally: Can you do this in PHP? I know both Python and PHP, so it's what ever for me, I just want it to work better than it does now :P

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

Haven't used it myself, but https://github.com/jupyter-widgets/ipywidgets has a camera widget.

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to comment
Share on other sites

Link to post
Share on other sites

Are you doing any processing of that stream like they are showing? If not some clean solution base on WebRTC could work better. Or going really plain if raspberry is the server - saving image frame to a file and reloading that file in the browser on a web page with JS.

Link to comment
Share on other sites

Link to post
Share on other sites

I think ffmpeg via HLS and than HLS .js would be interesting.

I want to try it someday.

Link to comment
Share on other sites

Link to post
Share on other sites

On 10/08/2018 at 3:07 AM, riklaunim said:

Are you doing any processing of that stream like they are showing? If not some clean solution base on WebRTC could work better. Or going really plain if raspberry is the server - saving image frame to a file and reloading that file in the browser on a web page with JS.

I'm doing what they did in the tutorial

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×