Install motion on raspberry pi:
sudo apt-get install motion -y
Check if motion demon enabled in
/etc/default/motion. It value should be set to "yes".
# set to 'yes' to enable the motion daemon start_motion_daemon=yes
Check following properies in
daemon on webcam_localhost off #to enable remote access to Raspberry
/var/log/syslog for possible motion errors.
It can be:
[ERR] [EVT] event_ffmpeg_newfile: ffopen_open error creating (new) file [/var/lib/motion/...
Motion uses /var/lib/motion to store video files and images. So it needs write access for this folder.
chmod 0777 /var/lib/motion
Enable broadcast only
If you need only broadcast without saving any data on disk, you need to change following options:
ffmpeg_output_movies off output_pictures off