1

I am trying to get a hello-world stream working from a USB webcam to a browser over a local network using Motion. (On a Raspberry Pi).

When I run service motion start on the RPi and go to http://192.168.0.xyz:8081 on my PC, the streaming works as expected. But when there is any movement, in Firefox it stops and says "Connection was reset". Refreshing sometimes makes it work, but sometimes gives a "Could not connect" message. In chrome the picture just freezes.

I am not trying to use any motion-detection features for the moment, and have disabled all such options (that I have found).

cat /tmp/motion.log is empty.

Installation was as follows. (Everything was done as root to make things a bit simpler.)

apt-get update
apt-get install motion -y

I then changed the following options in /etc/motion/motion.conf

daemon off
setup_mode off
output_pictures off
output_debug_pictures off
target_dir /var/lib/motion
stream_port 8081
stream_motion off
stream_localhost off

Then I run

service motion start

What am I doing wrong?

0

Super late but I just ran into this same problem and found a workaround so hopefully this helps someone else. Edit the threshold value in motion.conf to be higher than the resolution in total number of pixels (set mine to 999999). The default is 1500 pixels of movement detected gets flagged as motion. It seems that setting the threshold value very high avoids the freeze.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.