C290 With Duet lapse
-
Yes - this is entirely possible.
For the most part, the camera libraries in the Pi only allow one connection at a time. This is in part why I wrote videostream. It provides a http interface that can handle multiple connections to the video feed.
I use it all the time with DuetLapse and a browser. The camera display in DWC can also be connected to videostream as the connection is the same as using a browser.It's all documented fairly comprehensively, if there is something that needs clarification, let me know.
One thing I would say (if you are not overly familiar with the Pi etc.) - take it a step at a time.
For example - make sure that the camera works using fswebcam first, then get videostream working and finally DuetLapse3. -
@stuartofmt I am receiving this error message while testing to see if the USB camera will work with DuetLapse3. Does this response mean the camera is not compatible or might I be overlooking something else?
pi@duet3:~/DuetLapse3 $ fswebcam image.jpg --- Opening /dev/video0... Trying source module v4l2... Error opening device: /dev/video0 open: Permission denied Trying source module v4l1... Error opening device: /dev/video0 open: Permission denied Unable to find a source module that can read /dev/video0.
-
A couple of questions:
What OS are you using?cat /etc/os-release
The camera may not be /dev/video0.
With the camera unplugged.
- What is the output of :
v4l2-ctl --list-devices
- What is the output of:
ls /dev/video*
Plug in the camera and repeat the two commands above as well as:
dmesg
What new device showed up ?
fswebcam can be directed to explicitly a particular camera with the form:
fswebcam --device /dev/video[x] image.jpg
Depending on how your Pi is set up there can be multiple logical camera's identified.
You can also try these test programs:
https://github.com/stuartofmt/Pi-Notes/blob/master/Resolution Testing.md -
Have you had success?
-
@stuartofmt Thanks for your recommendations. I actually found another camera that worked instead.
-
@stuartofmt Hello, I got fswebcam to take a picture. However, I am having trouble with vidstream. I'm on Pi4 so I'm using libcam, I put in python3 ./videostream.py -port 8090 -pires "--width 800 --height 600"`. And I got a > on the console, I then went to pi'sip:8090/stream] and http://pi'sip:8090/stream, it says failed to open the page. Please help.
-
@stuartofmt Just checked my OS, I' on Buster. So I tried installing opencv but the running setup.py bdist_wheel for opencv-contrib-python is taking a while
-
This post is deleted! -
@stuartofmt I installed DuetLapse and got videostream streaming, how do I tell duetlapse to start recording when I start a print, take a pic every 10 seconds, and when print is finished or canceled, compile it into a video?
So far I didmkdir DuetLapse - or other directory of your choice
cd DuetLapse
wget https://github.com/stuartofmt/DuetLapse3/raw/main/DuetLapse3.py
chmod 744 DuetLapse3.py -
@stuartofmt Also, how do I have videostream autmatically run when pi starts?
-
@tratoon
I have been offline for a couple of weeks.. have you tried following the examples in the documentation? If so, what issues are you seeing. -
@stuartofmt every time I shut down and power the pi on, I have to send the nohup command to run video stream anyway to automate this.
-
@stuartofmt I will try to figure duet lapse 3 over weekend
-
In my view - the best way to control videostream at startup is with systemctl.
There is an example unit file and instructions in the documentation.You don't need to run it with nohup.
Give systemctl a go and if you have issues I can help.
-
@stuartofmt sudo -H -u pi python3 /home/pi/DuetLapse/DuetLapse3.py -duet 192.168.1.217 -seconds 20 -detect none -camera1 web -weburl1 http://192.168.1.217:8090/stream I have this line In rctest.local along with a line that starts videostream.
In my DuetLapse/duet3/192-168-1-217 I have 2 folders: 603 & 1639 Both with JPEGS that give errors when I try opening something about it starts with some character. I also have a bunch of logs in there.
-
@tratoon said in C290 With Duet lapse:
@stuartofmt sudo -H -u pi python3 /home/pi/DuetLapse/DuetLapse3.py -duet 192.168.1.217 -seconds 20 -detect none -camera1 web -weburl1 http://192.168.1.217:8090/stream I have this line In rctest.local along with a line that starts videostream.
In my DuetLapse/duet3/192-168-1-217 I have 2 folders: 603 & 1639 Both with JPEGS that give errors when I try opening something about it starts with some character. I also have a bunch of logs in there.
Also - if you are having problems, its best to run the program from the command line and include -verbose. That way you will get a log file and be able to see if there are issues being reported on the console.
When you view http://192.168.1.217:8090/stream from a browser, does it display ok?
I cannot do much to help you without seeing the logfile (using -verbose). My guess is that there is an issue with ffmpeg.
What output do you get from running:
ffmpeg --version