Replies: 3 comments 2 replies
-
Hi, @BAChapin, Most likely, the problem is that you have executed the second python script after executing the first and without having freed the camera resources. To free the resources the following instructions usually work: Good luck |
Beta Was this translation helpful? Give feedback.
-
The best place to free the camera resources is at the end of the script where the camera was used.
The error that now appears, RuntimeError: Camera not opened, is due to trying to use the camera after having closed it. |
Beta Was this translation helpful? Give feedback.
-
Good, but in any case, the error "RuntimeError: Failed to acquire camera: Device or resource busy", is due to the attempt to start an already started camera. If you are sure that the camera is free, run your script, but it is always advisable when we are no longer going to need the camera, at the end of the script release the camera. Sorry for not being more explicit, but I'm not familiar with using the camera to capture video. I normally use it to capture still images on a scanner from old Super8 films. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure this is the place this should go, but I need help and I haven't been able to find anything anywhere else.
I am currently building a Flask server to serve HLS based content using Picamera2. If I run this code:
It works fine, it produces 6 stream#.ts files, and a stream.m3u8 file. I do get an odd warning log, but it runs fine.
However, modifying the code to look like this:
I get the following errors and doing searches on them haven't proven to be very fruitful:
Admittedly, this is my first time building a server application that serves up media, and its my first experience using picamera2. I'm not entirely sure what is wrong with my code, from what I can tell the logic makes sense and I can't understand why I'm getting the specific errors I'm getting. Can anyone give me a hand? I would really appreciate it.
Beta Was this translation helpful? Give feedback.
All reactions