Piotr Kula's answer seems to be on the right track but is outdated for Raspberry stretch.
There are updated instructions for uv4l on Raspberry stretch at
https://www.linux-projects.org/uv4l/installation/
# switch to superuser mode
sudo -s
# add the repository key for uv4l
curl http://www.linux-projects.org/listing/uv4l_repo/lpkey.asc | sudo apt-key add
# add the url for the u4vl repository to apt
echo "deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch main" >> /etc/apt/sources.list
apt-get update
apt-get install uv4l uv4l-raspicam
apt-get install uv4l-raspicam-extras
# do not forget to install the server - see what happens if you do
# below
apt-get install uv4l-server
reboot
You can tweek the uv4l options via /etc/uv4l/uv4l-raspicam.conf
and then restart the service with
sudo service uv4l_raspicam restart
In my case things didn't work out of the box (if forgot to install the uv4l-server ...). The following comments might help you debug similar problems.
I checked that the server is running with:
pgrep -fla uv4l
995 /usr/bin/uv4l -f -k --sched-fifo --mem-lock --config-file=/etc/uv4l/uv4l-raspicam.conf --driver raspicam --driver-config-file=/etc/uv4l/uv4l-raspicam.conf --server-option=--editable-config-file=/etc/uv4l/uv4l-raspicam.conf
and whether it listened with
sudo netstat -tulpn
but there was no entry for uv4l in the list. I had expected one for port 8080
so i tried the command from How to configure UV4L?
uv4l --sched-rr --mem-lock --driver raspicam \
> --width 960 --height 540 --framerate 30 \
> --encoding mjpeg --vflip --hflip
<notice> [core] Trying to loading driver 'raspicam' from built-in drivers...
<notice> [core] Loading driver 'raspicam' from external plug-in's...
<notice> [driver] Dual Raspicam & TC358743 Video4Linux2 Driver v1.9.63 built Oct 6 2018
<notice> [driver] Detected camera imx219, 3280x2464
<notice> [driver] Selected format: 960x544, encoding: mjpeg, JPEG Video Capture
<notice> [driver] Framerate max. 30 fps
<notice> [core] Device detected!
<notice> [core] Registering device node /dev/uv4l
But still the server didn't start automatically ...
man uv4l
then showed me the option
--enable-server [=arg(=required)] (=auto)
enable the streaming server. Possible values are: 'auto' (tenta‐
tively start the server), 'required' (exit if failing to start
the server, only works if --foreground is enabled), 'off' (no
server at all).
so I tried:
pkill uv4l
sudo uv4l --sched-rr --mem-lock --driver raspicam --encoding mjpeg --enable-server=required
<notice> [core] Trying to loading driver 'raspicam' from built-in drivers...
<notice> [core] Loading driver 'raspicam' from external plug-in's...
<notice> [driver] Dual Raspicam & TC358743 Video4Linux2 Driver v1.9.63 built Oct 6 2018
<notice> [driver] Detected camera imx219, 3280x2464
<notice> [driver] Selected format: 1920x1080, encoding: mjpeg, JPEG Video Capture
<notice> [driver] Framerate max. 30 fps
<notice> [core] Device detected!
<notice> [core] Registering device node /dev/uv4l
but still no server running on port 8080 or elswhere. So it seems i forgot the "--foreground" option which the man page states is necessary:
sudo uv4l --sched-rr --mem-lock --driver raspicam --encoding mjpeg --enable-server=required --foreground
<notice> [core] Trying to loading driver 'raspicam' from built-in drivers...
<notice> [core] Loading driver 'raspicam' from external plug-in's...
<notice> [driver] Dual Raspicam & TC358743 Video4Linux2 Driver v1.9.63 built Oct 6 2018
<notice> [driver] Detected camera imx219, 3280x2464
<notice> [driver] Selected format: 1920x1080, encoding: mjpeg, JPEG Video Capture
<notice> [driver] Framerate max. 30 fps
<notice> [core] Device detected!
<notice> [core] Trying to load the the Streaming Server plug-in...
<warning> [core] libserver.so: cannot open shared object file: No such file or directory
<alert> [core] No Streaming Server detected
Now that's a clear hint! There seems to be no server yet - so install it:
sudo apt-get install uv4l-server
and try again:
sudo uv4l --sched-rr --mem-lock --driver raspicam --encoding mjpeg --enable-server=required --foreground
<notice> [core] Trying to loading driver 'raspicam' from built-in drivers...
<notice> [core] Loading driver 'raspicam' from external plug-in's...
<notice> [driver] Dual Raspicam & TC358743 Video4Linux2 Driver v1.9.63 built Oct 6 2018
<notice> [driver] Detected camera imx219, 3280x2464
<notice> [driver] Selected format: 1920x1080, encoding: mjpeg, JPEG Video Capture
<notice> [driver] Framerate max. 30 fps
<notice> [core] Device detected!
<notice> [core] Trying to load the the Streaming Server plug-in...
<notice> [server] HTTP/HTTPS Streaming & WebRTC Signalling Server v1.1.125 built on Mar 9 2019
<warning> [server] SSL is not enabled for the Streaming Server. Using unsecure HTTP.
<notice> [core] Streaming Server loaded!
<notice> [core] Registering device node /dev/uv4l
<notice> [server] Web Streaming Server listening on port 8080
The server is now available at http://pi:8080 (replace pi with your server's ip or hostname)
After a reboot it worked with out entering another command.