Some systems (debian) may require this sudo usermod -a -G video www-data to make sure it will work. Because ffmpeg will be launched with the www-data user that doesn’t have access to the video cameras.
It will even turn off the camera if nobody is connected;
Use ffmpeg -f v4l2 -list_formats all -i /dev/video0 to find what formats your camera supports;
Watch the stream from VLC with the url: rtmp://device-ip/live/stream