-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using raspiCamSrv with OctoPrint #5
Comments
Probably, for now you would need duplicate installations of raspi-cam-srv. I could think of a page in raspiCamSrv showing live streams of both cameras simultaneously. I am currently refactoring in order to support an uninterrupted live stream while taking pictures or videos. |
The best solution would be to provide endpoints for snapshots for both cameras. I'll put that on the list. |
The endpoint for photo snapshots for the active camera is now available in V2.1 Endpoints for the second camera will follow later |
With version V2.3.0 one server instance supports streaming for both cameras sumultaneously. |
Problem viewing live stream if any changes are made on another screen. Live feed stops and can't be viewed unless program is stopped and restarted. On Terminal only message is "WARN RPiSdn sdn.cpp:39 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise." |
This is a warning which is not related to the issue that the live stream does not show. This warning originates from the The warning shows up with instantiation of a camera object, even before the camera is configured or started. In issue #102 for the libcamera project (raspberrypi/libcamera#102) it is recommended to increase the log level for In raspiCamSrv, this level is set to 2 by default (in I prefer to leave it at 2 in order not to miss any warnings which might be relevant. |
Which changes did you make which caused the live stream to disappear? Sometimes, a specific camera configuration (Sensor Mode, Stream Size or others) may lead to errors within Picamera2, for example in the decoder. Typically, there should be an exception thrown by the relevant program. Did you see any error messages in addition to the warning which you have mentioned? If you run raspiCamSrv as service, you would need to look into the journal. I am working on a solution to make raspiCamSrv more robust against errors in these backgound processes. |
Could you please specify what exactly you mean with 'service configuration change'? Which of the Service Configuration procedures did you follow (with or without Audio Support)? |
To keep the Flask server running independently from the SSH session, you need to configure it as service. Thanks for the other info. |
Please post the entire error description |
Do you need just this one line expanded, or the full 1000 lines! |
Just two lines (flask)[xxxx] with the same number xxxx |
I wonder if there is a permissions issue. Configuring service without audio shows these lines nano ~/raspiCamSrv.service In the first line it shows open a SSH session, but is this before moving to the repository and virtual environment? I |
Comparing mine to yours I can see twice, but no idea why as I added jules in the nano configuration |
There are two more places where you need to replace |
I also couldn't expand the lines you asked for. Can't move right to see the text of the full line. |
Yes I can see the two errors now, but how to change them? Where are the two other locations found? Using a nano session as in your description, only one location is shown as needing changing. |
Normally, when you have the file open in nano (remember to sudo when editing in
|
Is that what is expected....how does it compare with your response to |
The bottom line shows session opened, but it's not a smooth start, it stops and starts over first few seconds of startup, why not just one start? |
The bottom line just refers to your user session and not to the Flask server. They say that there is no file If the output looks like If you do not see You may check where Flask is installed: Now, activate the virtual environment and repeat the which command: If your output is still Then you can repeat step 9 of the RaspiCamSrv Installation and everything should be fine. |
seems to be missing 4 lines compared to yours. Followed the installation step by step. fonttools are these missing lines responsible for my live view missing probs? |
No |
Please show again the content of the service file: The error message before also complained about the working directory. |
still seeing USER twice |
In the meantime, I have committed some fixes which should cover most of the issues described earlier for Pi4 with Cam3. To update: |
How do I change port 5000 which is now in use.....not sure why? |
It seems that the raspiCamSrv service is now active. This will of course use port 5000. Did you check with Did you try to connect? |
The updated fixes seem to have changed something...the Hide and Clr buttons below the live window have returned, but onpressing Photo, no pic is taken. |
The Hide and Ctrl buttons are only visible if a photo has been taken and shown in the lower area. See the user guide. So, if you see it, you must have taken a photo. |
If you want to use another port, you just change 5000 to the port you want to use in the service script or when you start the Flask server directly |
If you look at the error message, you see "Device or resource busy" You cannot have multiple processes using the same camera. I do not know what you have running on your system. You can either run the service or start the Flask server manually. If you want to start manually, you need to stop the service first: Remember: when booting the device, the service will start automatically. |
That's all fine, seems to be up and running, but now have a password problem! On first login after powering off, can't login with current password, and doesn't seem a way to reset it. The option to change password asks for current password..... |
The simplest way is to reset the database, which will remove the user and force new registration. However, currently this will also reset the database for motion tracking. If you don't mind losing all motion tracking events, proceed as follows: |
Thanks, that's fixed it, don't need a record of motion. I realise a problem of my own making which produced the 5000 "device or resource busy" error........I had RaspiCamSrv running on boot using 5000, and then used service to restart it, so two processes running on same ip address. I have a lot of test photos during testing which aren't needed, how do I delete them all? |
I am using raspiCamSrv with RPI5 and 2 cameras. Is it correct to have two versions of the service running on different ports to be able to use the multicam plugin? or is there a better solution.
Also since snapshots are not currently exported you cannot configure the snapshot url in OP. I tried the following path, based on video_feed, but it is not quite right. Using mimetype='multipart/x-mixed-replace, I do see the snapshot directly in a browser. OP is expecting the mimetype to be image/jpeg but with that as the mimetype, both OP and browser do not error but image is not displayed. Any suggestions as to what is wrong?
diff --git a/raspiCamSrv/home.py b/raspiCamSrv/home.py
index c0ccb85..f6cc62f 100644
--- a/raspiCamSrv/home.py
+++ b/raspiCamSrv/home.py
@@ -48,6 +48,23 @@ def video_feed():
return Response(gen(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
+def gen2(camera):
[email protected]("/snapshot")
+# @login_required
+def snapshot():
@bp.route("/photos/")
@login_required
def displayImage(photo: str):
The text was updated successfully, but these errors were encountered: