Jawaban Piotr Kula tampaknya berada di jalur yang benar tetapi sudah ketinggalan zaman karena raspberry.
Ada petunjuk yang diperbarui untuk uv4l pada peregangan Raspberry di
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
Anda dapat tweek opsi uv4l melalui /etc/uv4l/uv4l-raspicam.conf dan kemudian restart layanan dengan
sudo service uv4l_raspicam restart
Dalam kasus saya hal-hal tidak berjalan di luar kotak (jika lupa menginstal server uv4l ...). Komentar berikut mungkin membantu Anda men-debug masalah yang sama.
Saya memeriksa apakah server berjalan dengan:
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
dan apakah itu mendengarkan
sudo netstat -tulpn
tetapi tidak ada entri untuk uv4l dalam daftar. Saya mengharapkan satu untuk port 8080
jadi saya mencoba perintah dari Cara mengkonfigurasi 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
Tapi tetap saja server tidak memulai secara otomatis ...
man uv4l
lalu tunjukkan saya pilihan
--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).
jadi saya mencoba:
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
tapi masih tidak ada server yang berjalan di port 8080 atau di tempat lain. Jadi sepertinya saya lupa opsi "--foreground" yang menyatakan halaman manual diperlukan:
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
Nah, itu petunjuk yang jelas! Tampaknya belum ada server - jadi instal:
sudo apt-get install uv4l-server
dan coba lagi:
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
Server sekarang tersedia di http: // pi: 8080 (ganti pi dengan ip atau nama host server Anda)
Setelah reboot itu bekerja tanpa memasukkan perintah lain.