I haven't played with this since v1.6 in April, but I'm interested in starting up again.
I can confirm that this solution worked for me also - with my Raspberry 3Sennie wrote: ↑Tue Aug 29, 2017 7:10 pmI found an error when starting the raspicam service. The error was that there was an error in the config file/etc/uv4l/uv4l-raspicam.conf with preview 0,0,1920,1080. When I removed that line it worked. Also i needed to adjust the camera-settings-array.php in the www folder. I removed the preview line in that file also.
Regards,
Sennie
Try Sennie's solution - worked for mepicamer wrote: ↑Sun Sep 17, 2017 4:32 pmI got the same problem, i tried removing the preview but did not work, every time when i change camera settings raspicam goes offline. I also saw difference between the one you can download and the current version on github. Maybe the upload failed at some point Ronny?
See this log:
[email protected]:~ $ sudo systemctl status uv4l_raspicam.service
● uv4l_raspicam.service - LSB: Userspace Camera Driver
Loaded: loaded (/etc/init.d/uv4l_raspicam)
Active: failed (Result: exit-code) since Sun 2017-09-17 14:26:07 UTC; 15s ago
Process: 1035 ExecStart=/etc/init.d/uv4l_raspicam start (code=exited, status=1/FAILURE)
Sep 17 14:26:07 raspberrypi uv4l_raspicam[1035]: Starting UV4L Raspberry CSI Camera Driver: uv4l
Sep 17 14:26:07 raspberrypi uv4l_raspicam[1035]: <notice> [core] Trying driver 'raspicam' fr.....
Sep 17 14:26:07 raspberrypi uv4l_raspicam[1035]: <warning> [core] Driver 'raspicam' not found
Sep 17 14:26:07 raspberrypi uv4l_raspicam[1035]: <notice> [core] Trying driver 'raspicam' fr.....
Sep 17 14:26:07 raspberrypi uv4l_raspicam[1035]: <notice> [driver] Dual Raspicam Video4Linux...17
Sep 17 14:26:07 raspberrypi uv4l_raspicam[1035]: <error> [core] the argument ('0,0,1920,1080...id
Sep 17 14:26:07 raspberrypi uv4l_raspicam[1035]: <alert> [core] No device detected
Sep 17 14:26:07 raspberrypi systemd[1]: uv4l_raspicam.service: control process exited, code...s=1
Sep 17 14:26:07 raspberrypi systemd[1]: Failed to start LSB: Userspace Camera Driver.
Sep 17 14:26:07 raspberrypi systemd[1]: Unit uv4l_raspicam.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
Can Ronny or anyone shine some light on this? <error> [core] the argument ('0,0,1920,1080...id <----- is this somewhere else in a config file i missed?
Thanks
Sennie wrote: ↑
Wed Aug 30, 2017 3:10 am
I found an error when starting the raspicam service. The error was that there was an error in the config file/etc/uv4l/uv4l-raspicam.conf with preview 0,0,1920,1080. When I removed that line it worked. Also i needed to adjust the camera-settings-array.php in the www folder. I removed the preview line in that file also.
Regards,
Sennie
. . . and it's failing with "no space left on device."
I'm halfway towards a solution, here. I found this handy shell script to sed the formatted date/time into the file that's specified in /etc/uv4l/uv4l-raspicam.conf. It took me a long time to figure that I also need to have the template file in place! (/etc/uv4l/text_template.json). So I turned it into UpdateDateTime.service, using the tips given to me in another thread.TheWaterbug wrote: ↑Thu Feb 08, 2018 9:15 pmI'd also like to figure out how to get a near-real-time time/date stamp on the video.
Never mind. PEBCAK. The first time I'd tried to use /tmp I'd had a syntax error in the .json file. Now that that's fixed, I can use /tmp.TheWaterbug wrote: ↑Fri Feb 09, 2018 1:22 amThe author of that script suggests I specify a file in the ramdisk at /tmp, but the problem there is that /tmp is empty at startup, which causes the uv4l driver to fail the text overlay due to a missing file, even if that file gets created a few seconds later.
Ideally I'd start my UpdateDateTime.service, using /tmp, before the uv4l driver starts, but I'm not sure how to configure that.
Code: Select all
#!/bin/bash
while [[ 1 == 1 ]]; do
curl -s 'api.openweathermap.org/data/2.5/weather?id=5388601&APPID=MyOpenWeatherMapAPIKey&units=imperial' | jq '.name,", ",.main.temp," F"' > /tmp/temp1.txt
tr -d '"' < /tmp/temp1.txt > /tmp/temp2.txt
tr -d '\n' < /tmp/temp2.txt > /tmp/weather.txt
sleep 600
done
Code: Select all
file=$(sed -rne '/^text-filename.*=/{s/^text-filename *= *(.*)$/\1/g;p}' /etc/uv4l/uv4l-raspicam.conf)
[[ "$file" == "" ]] && { echo "no configured overlay file"; exit 255; }
while [[ 1 == 1 ]]; do
overlay=`cat /etc/uv4l/text_template.json`
overlay=${overlay/\$time/`date +%Y-%m-%d:%l:%M:%S`}
overlay=${overlay/\$weather/`cat /tmp/weather.txt`}
echo "$overlay" > $file
# Update overlay text
v4l2-ctl --set-ctrl=text_overlay=1 &>/dev/null
sleep 1
done
Code: Select all
./v4l2rtspserver [-v[v]] [-Q queueSize] [-O file] \
[-I interface] [-P RTSP port] [-p RTSP/HTTP port] [-m multicast url] [-u unicast url] [-M multicast addr] [-c] [-t timeout] \
[-r] [-s] [-W width] [-H height] [-F fps] [device1] [device2]
and the camera-settings-array.php file has commented-out sections for audio:ALSA options :
-A freq : ALSA capture frequency and channel (default 44100)
-C channels: ALSA capture channels (default 2)
-a fmt : ALSA capture audio format (default S16_BE)
device : V4L2 capture device and/or ALSA device (default /dev/video0)device : V4L2 capture device and/or ALSA device (default /dev/video0)
Code: Select all
# server-option = --enable-webrtc-audio=true
Code: Select all
arecord -D plughw:1,0 -d 3 test.wav && aplay test.wav
Code: Select all
sudo mount -o remount -rw /
sudo mount -o remount -rw /boot
sudo apt-get update
sudo apt-get install rpi-update
sudo rpi-update
sudo reboot