Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

offline webcam stream on raspberry pi using motion

Tags:

raspberry-pi

I'm trying to do webcam (logitech c270) stream on monitor via HDMI. I'm using raspbian and I installed motion (sudo apt-get install motion) and i did everything i needed to do. Now when I start motion service, raspberry says it is started successfully and webcam turns on (activity light is on). Where can I see stream from webcam?

like image 677
morellato Avatar asked Sep 10 '26 05:09

morellato


1 Answers

Start motion with:

motion -n -c <config-file>

where the <config-file> is your configuration file for motion. In this config file you can turn on the streaming server that will allow you to access the webcam image stream from the browser. It should contain the following lines:

stream_port 8081
stream_localhost off
webcontrol_port 8080
webcontrol_localhost off

Follow the rest of the instructions for example here.

If you turn on Firefox and go to :8081, you will see the output. Sadly, for me Chrome is not able to display this stream, but if you make an html file like this:

<html>
  <body>
    <img src="http://<ip-address>:8081"/>
  </body>
</html>

you should see it in Chrome as well.

like image 64
axel22 Avatar answered Sep 13 '26 05:09

axel22



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!