issues installing on PI 3 B+
-
i did try with and without the & and with the option -pires and -pistream and it gives the same results its asking for cv2 see below
i will try to install the opencv i see now the notes you refered to it i will give it a try
a lot of errors see the log file down and as soon as i open the address 10.0.1.110:8081/stream i get this msg repeating " empty frame detected
pi@raspberrypi:~ $ python3 videostream.py -port 8081 &
[1] 2213
pi@raspberrypi:~ $ python3: can't open file '/home/pi/videostream.py': [Errno 2] No such file or directory
^C
[1]+ Exit 2 python3 videostream.py -port 8081
pi@raspberrypi:~ $ cd videostream
pi@raspberrypi:~/videostream $ python3 videostream.py -port 8081 &
[1] 2221
pi@raspberrypi:~/videostream $ Version: 2.1.1Scanning for available Cameras
[ WARN:0@0.777] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video1): can't open camera by index
[ERROR:0@0.792] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@0.792] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video2): can't open camera by index
[ERROR:0@0.796] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@0.796] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video3): can't open camera by index
[ERROR:0@0.799] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@0.800] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video4): can't open camera by index
[ERROR:0@0.803] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@0.803] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video5): can't open camera by index
[ERROR:0@0.807] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@0.807] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video6): can't open camera by index
[ERROR:0@0.811] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@0.811] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video7): can't open camera by index
[ERROR:0@0.816] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@0.817] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video8): can't open camera by index
[ERROR:0@0.821] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@0.821] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video9): can't open camera by index
[ERROR:0@0.825] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@0.825] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video10): can't open camera by index
[ERROR:0@0.829] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@0.829] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video11): can't open camera by index
[ERROR:0@0.833] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@0.833] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video12): can't open camera by index
[ERROR:0@0.836] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@0.837] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video13): can't open camera by index
[ERROR:0@0.840] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@10.862] global cap_v4l.cpp:1134 tryIoctl VIDEOIO(V4L2:/dev/video14): select() timeout.
[ WARN:0@20.888] global cap_v4l.cpp:1134 tryIoctl VIDEOIO(V4L2:/dev/video15): select() timeout.
[ WARN:0@20.892] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video16): can't open camera by index
[ERROR:0@20.900] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@20.901] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video17): can't open camera by index
[ERROR:0@20.910] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@20.910] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video18): can't open camera by index
[ERROR:0@20.919] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
[ WARN:0@20.919] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video19): can't open camera by index
[ERROR:0@20.927] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of rangeNo camera was specified but one camera was found and will be used
Opening camera with identifier: 0
Scanning for available sizes and formats - be patient
The following resolutions are available from the camera: 2592x1944(BGR3) 2592x1944(MJPG) 2592x1944(JPEG) 2592x1944(H264) 2048x1080(BGR3) 2048x1080(MJPG) 2048x1080(JPEG) 2048x1080(H264) 1920x1800(BGR3) 1920x1800(MJPG) 1920x1800(JPEG) 1920x1800(H264) 1640x1232(BGR3) 1640x1232(MJPG) 1640x1232(JPEG) 1640x1232(H264) 1280x720(BGR3) 1280x720(MJPG) 1280x720(JPEG) 1280x720(H264) 800x600(BGR3) 800x600(MJPG) 800x600(JPEG) 800x600(H264) 720x480(BGR3) 720x480(MJPG) 720x480(JPEG) 720x480(H264) 640x480(BGR3) 640x480(MJPG) 640x480(JPEG) 640x480(H264) 320x240(BGR3) 320x240(MJPG) 320x240(JPEG) 320x240(H264)
The requested size was not available
Using a smaller size: 2592x1944
The requested format: MJPG is available
[ WARN:0@23.454] global cap_v4l.cpp:2183 setProperty VIDEOIO(V4L2:/dev/video0): Bad buffer size 0, buffer size must be from 1 to 10
[ WARN:0@34.068] global cap_v4l.cpp:1134 tryIoctl VIDEOIO(V4L2:/dev/video0): select() timeout.The video stream can be access from:
http://10.0.1.110:8081/streamIf on the same computer as the camera - you can also try the following:
localhost:8081/stream
127.0.0.1:8081/streamwhen i open the http://10.0.1.110:8081/stream i get this msg
i disconnected the ribbon camera and tried a USB camera now no more empty frame msg but other msg see below and only one image just like motion do ( am now with opencv and videostream )
-
Please read the documentation carefully. -pires requires something other than blank input
-pistream can usually be omitted
The documentation is here:
https://github.com/stuartofmt/videostream/blob/master/videostream on Raspberry.md
Try something LIKE
python3 ./videostream.py -port 8082 -camera 0 -rotate 180 -debug -pires "--width 800 --height 600"
tou can also try
libcamerify python3 ./videostream.py -port 8082 -camera 0 -rotate 180 -debug -pires "--width 800 --height 600"
-
am using USB camera now
and when i use this one
python3 ./videostream.py -port 8081 -camera 0 -rotate 180 -debug -pires "--width 800 --height 600"
i get this
-
As I said a while back - I don’t have access to my test septup. This is too hard trying to do it remotely. I’ll pick it back up in the new year and we can try again. Happy New Year !
-
ok thanks , happy new year to you too
-
As a follow up. Go through the procedure described here
https://github.com/stuartofmt/Pi-Notes/blob/master/Resolution Testing.md
As an observation; getting camera setting that work is largely trial and error. Different combinations of computer, operating system, streaming software, camera type ( usb vs pi) , camera libraries etc
Finding working combination requires an approach that is methodical (one thing at a time), consistent (use only the appropriate commands for the type of camera). Jumping from one approach to the other creates false trails. Even for a camera that is working, not all the resolutions ( for example) that it reports as supported will necessarily work.
-
is it easier to install the duetlapse on videostream on window 10 ? or a mac ?
-
I’ve never tried it on the Mac.
Otherwise try it and see. Same potential issues with opencv. It worked fine in the past -
Merry Christmas
i tried on pc and same exact issues so am back to PI and the ribbon cam will keep trying until you have time
-
i finally was able to install opencv ver 4.6.0.66 on it and now video stream works right
now i will try the duetlapse the file you gave me on 20 decits like 90% working
and this while printing , there are some errors but i see the images in the dir and it keep coming while printing , even with no printing it keep coming here is my command i used and it worked finaly to install opencv
sudo pip install opencv-python==4.6.0.66
and to make videostream ver 2.1 works with ribbon cam
sudo python3 ./videostream.py -port 80 -camera 0 -size 4 -format MJPG -host 10.0.1.110
now that is a Merry Christmas
-
The first lot of “errors” are an artifact of scanning for available cameras. They are not true errors.
The disconnect messages are to do with connections being closed (e.g. browser window). Again, not true errors.
Enjoy! -
great so i have a working system now maybe i should make a youtube short one on my channel to show how to do it , i never found a video explaining ,
now for the pic taken i take that and i put them together with a someftware like final cut to be like a movie clip right ?
another question about the m3291 as i understand this one make the printer take the head away from the printed area and then the duetlapse take a pic right? if yes then this is not working now in my setup unless there is extra setting to activate that in duetlapse.config
-
Please read the instructions. Duetlapse will create a video for you.
The Duetlapse documentation describes options for moving the head out of the way before a picture is taken.
The same for M3291. It has many uses.
-
am looking for these documents how to do that movie because none is created at the end of the print , so i need to change some setting maybe in the Duet
Lapse config file or in the M3291 if you can just point me where to get these info to start to use it right way , thanks -
To help I need some more information, usually the video will be created at the end of the print job (unless somehow you have told DuetLapse not to).
Using a small print job (say 5 minutes)
Please post (better as file attachments)
- your duetlapse config file
- the M3291 commands you are using (if any) - usuallly these will be in the "start print" "end print" of your slicer.
- The complete log file.
After several minutes (but before the end) of printing please capture:
A screenshot of the status tab
A screenshot of the video tab
A screenshot of the files tabAs a side note - it is best to start off with something simple until you get the hang of it. For exampe:
- you do not need to use M3291.
- from memory, I have included a simple test configuration / approach in the documentation.
-
hi
1- my config file
-basedir /home/pi/DuetLapse
-duet 10.0.1.126
-port 8082
-seconds 30
-detect none
-weburl1 http://10.0.1.110/stream
-camera1 streamthe command i use is python3 ./DuetLapse3.py -file DuetLapse3.config
and my command for the videostream as follow
sudo python3 ./videostream.py -port 80 -camera 0 -size 4 -format MJPG -host 10.0.1.110 -rotate 180![Screenshot 2023-12-30 at
2- am not sure how to use the M3291 yet am only using the config file above3- i tried to attach the complete log file but its giving me error here is a part of it
2023-12-30 10:18:26,574 - mainLoop - Time - Camera1: capturing frame 109 at layer 82 after 30 seconds
2023-12-30 10:18:32,448 - mainLoop - Error Processing message queue
2023-12-30 10:18:32,450 - mainLoop - 'global'
2023-12-30 10:18:37,516 - mainLoop - Error Processing message queue
2023-12-30 10:18:37,520 - mainLoop - 'global'
2023-12-30 10:18:42,783 - mainLoop - Error Processing message queue
2023-12-30 10:18:42,785 - mainLoop - 'global'
2023-12-30 10:18:47,997 - mainLoop - Error Processing message queue
2023-12-30 10:18:47,999 - mainLoop - 'global'
2023-12-30 10:18:53,531 - mainLoop - Error Processing message queue
2023-12-30 10:18:53,532 - mainLoop - 'global'
2023-12-30 10:18:58,663 - mainLoop - Error Processing message queue
2023-12-30 10:18:58,664 - mainLoop - 'global'
2023-12-30 10:18:58,728 - mainLoop - Error Processing message queue
2023-12-30 10:18:58,728 - mainLoop - 'global'
2023-12-30 10:18:58,729 - mainLoop - Time - Camera1: capturing frame 110 at layer 83 after 30 seconds
2023-12-30 10:19:04,721 - mainLoop - Error Processing message queue
2023-12-30 10:19:04,722 - mainLoop - 'global'
2023-12-30 10:19:09,811 - mainLoop - Error Processing message queue
2023-12-30 10:19:09,812 - mainLoop - 'global'
2023-12-30 10:19:14,931 - mainLoop - Error Processing message queue
2023-12-30 10:19:14,934 - mainLoop - 'global'
2023-12-30 10:19:20,064 - mainLoop - Error Processing message queue
2023-12-30 10:19:20,067 - mainLoop - 'global'
2023-12-30 10:19:25,205 - mainLoop - Error Processing message queue
2023-12-30 10:19:25,208 - mainLoop - 'global'
2023-12-30 10:19:30,296 - mainLoop - Error Processing message queue
2023-12-30 10:19:30,297 - mainLoop - 'global'
2023-12-30 10:19:30,298 - mainLoop - ****** Duet status changed to: idle from processing *****
2023-12-30 10:19:30,299 - mainLoop - ****** Print State changed to: Completed from Capturing*****
2023-12-30 10:19:30,300 - mainLoop - Print Job Completed
2023-12-30 10:19:30,301 - mainLoop - nextAction is available
2023-12-30 10:19:30,302 - nextAction - ++++++ completed state requested ++++++
2023-12-30 10:19:30,303 - mainLoop - Exiting captureLoop
2023-12-30 10:19:32,806 - makeVideo - Create Video from /home/pi/DuetLapse/raspberrypi/10-0-1-126/1829_1_Body4
2023-12-30 10:19:32,807 - terminate - Terminating
2023-12-30 10:19:32,808 - nextAction - ++++++ Entering terminate state ++++++
2023-12-30 10:19:32,809 - terminate - captureLoop is not running
2023-12-30 10:19:32,809 - nextAction - nextAction exiting normally
2023-12-30 10:19:32,810 - terminate - Wait for video to complete
2023-12-30 10:19:32,811 - makeVideo - Error: Camera1: Cannot create video shorter than 5 second(s).
Length would have been 3.6666666666666665 second(s).
2023-12-30 10:19:32,812 - makeVideo - frame = 110 thisfps = 30.0 fps = 30 maxvideo = 0 minvideo = 5
2023-12-30 10:19:36,442 - Thread-361 - !!!!! http call: {'displayStatus': ['true']} !!!!!
2023-12-30 10:19:37,817 - terminate - ********* Waiting for makeVideo thread to finish *********
2023-12-30 10:19:37,817 - terminate - makeVideo is not running
2023-12-30 10:19:37,818 - terminate - nextAction is available
2023-12-30 10:19:37,818 - terminate - ***** Cleaning up files for phase: terminate *****
2023-12-30 10:19:37,904 - terminate - mainLoop is not running
2023-12-30 10:19:37,943 - terminate - !!!!! http listener stopped !!!!!
2023-12-30 10:19:37,944 - terminate - Program Terminated
2023-12-30 10:19:37,945 - terminate - isPlugin ignored - only valid for SBC
2023-12-30 10:19:37,945 - terminate - !!!!! Forced Termination !!!!!i did print a small part and got 100 pic but no video was made , how to turn that on to make a video at the end ? because i see only that i can press on snapshot before the end of the print , how do i change my setting to make a video at the end ? you see this in the log " make video is not running "
another question how can i make the camera take a pic only when the head is moved to the postion in the config file
-basedir /home/pi/DuetLapse
-duet 10.0.1.126
-port 8082
-seconds 30
-extratime 5
-minvideo 3
-maxvideo 30
-pause yes
-movehead 10 10
-weburl1 http://10.0.1.110/stream
-camera1 stream
-detect layer
-keepfiles
-
Again - please read the documentation.
There is nothing wrong.
2023-12-30 10:19:32,811 - makeVideo - Error: Camera1: Cannot create video shorter than 5 second(s).
Length would have been 3.6666666666666665 second(s).You have video min duration set to 5 seconds.
This is all explained in the documentation.
I suspect that you also did not replace your M3291 macro with my original (which would explain the errors about M3291 (they are being handled in the code and are not affecting anything).
-
I didn’t know that I need to edit the M3291 I will check that out
One question is the editing of the M3291 will make the camera take the pic when the printer head is moved and paused or it’s another setting because I search for that part in the document but couldn’t find it
i only want it to take the pic while the printer head is moved to postion as in the config and paused
Thanks for your patience
-
@sankafola said in issues installing on PI 3 B+:
I didn’t know that I need to edit the M3291 I will check that out
One question is the editing of the M3291 will make the camera take the pic when the printer head is moved and paused or it’s another setting because I search for that part in the document but couldn’t find it
i only want it to take the pic while the printer head is moved to postion as in the config and paused
Thanks for your patience
You must not edit the M3291 macro. Just replace the version you made with the one in github. There is something wrong with your edited version (perhaps the name - perhaps something else)
To move the head to a given position before taking the picture - read the section about
-detect
-pause
and-movehead
.There is also an example in the useage examples documentation.
-
happy new year
1-i copied the M3291 macro from the post you made if you have a link to download it from github please provide
2-so the normal operation is the cam will take let say 100 pic and at the end it will make a mp4 video , what setting in the duetlapse.config that ask for that ?
minivideo and max video ?
3-am able to move the head and pause no issue but the camera takes the pic not while the head in pause or moved to the place i asked to be moved to its random so i wonder if am missing a setting in the config-basedir /home/pi/DuetLapse
-duet 10.0.1.126
-port 8082
-seconds 30
-extratime 500
-minvideo 3
-maxvideo 30
-pause yes
-movehead 10 10
-weburl1 http://10.0.1.110/stream
-camera1 stream
-detect layer
-keepfiles