Picamera2

Latest version: v0.3.25

Safety actively analyzes 714973 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

0.3.7

Added

* Ability to control via the configuration "queue" parameter whether Picamera2 keeps hold of the last completed request or not. This means you may wait marginally longer for a capture in some use cases, but also that the system cannot give you the frame that arrived slightly before you requested it.

Changed

* The `Picamera2.start_encoder` function prototype has been made very similar to `Picamera2.start_recording` for consistency. Most existing calls still work, but there are a few call patterns that may need updating. The new prototype is: `start_encoder(self, encoder=None, output=None, pts=None, quality=Quality.MEDIUM)`
* The `Picamera2.wait` function now requires an argument, which is the "job" that was returned to you when you made the asynchronous call, for example instead of

picam2.capture_file("test.jpg", wait=False)
metadata = picam2.wait()

you would use

job = picam2.capture_file("test.jpg", wait=False)
metadata = picam2.wait(job)

Please also refer to our updated Qt examples.
* Some bug fixes when starting and stopping encoders.
* Risk of video frame drops during transient busy periods reduced.

0.3.6

Added

* The `Picamera2.global_camera_info()` method will return information about all the attached cameras.
* We have introduced the ability to control multiple Picamera2 objects (all opened for different cameras) within the same Python process. They behave independently and can each have their own preview window.
* There is now limited support for USB webcams that deliver MJPEG or YUYV streams. Images can be displayed by the QT (not QTGL) preview.
* Picamera2 objects have a title_fields property which can be set to a list of the metadata fields to display on the preview window title bar (for example `picam2.title_fields = ["ExposureTime", "AnalogueGain"]).

Changed

* Resources are freed more reliably when Picamera2 objects are closed.

0.3.5

Added

Changed

* Add support for outputting timestamps when using the JPEG encoder for video.
* Fix a bug which prevented the mjpeg_server.py example from working. This has also been added to the automatic test suite so shouldn't get broken again!

0.3.4

Added

* Ability to record uncompressed or raw video frames.

Changed

* Releasing of camera resources has been made more reliable, so once the Picamera2 object has been closed it can be re-opened more reliably (optionally by other processes).
* Logging has been revised to work better with applications already using Python logging.
* Some reporting of, and recovery from, certain error conditions has been improved.
* Large encoded video frames are now split automatically for streaming over UDP.

0.3.3

Added

Changed

* Very minor changes for the latest version of libcamera. "libcamera.ColorSpace.Jpeg()" has become "libcamera.ColorSpace.Sycc()".

0.3.2

Added

* All the preview implementations now support a "display transform", allowing the preview image to be horizontally and/or vertically flipped (whilst not affecting the underlying image). The Picamer2.start_preview method allows a libcamera transform to be passed.
* Added APIs to capture and copy buffers/arrays from multiple streams at once: capture_buffers, capture_arrays, switch_mode_and_capture_buffers, switch_mode_and_capture_arrays.
* Allow entries from the sensor_modes property to be used directly as the raw stream configuration.
* Support for version 2.0 tuning files, including a find_tuning_algo method to make them easier to use.
* Demo Qt applications have been moved out of the examples folder to apps. A new "app_full.py" exists which allows phots and videos to be recorded, and gives control through a GUI of various camera and image tuning parameters.
* Added a sensor_modes field to the Picamera2 object. This can be queried to find out exactly what raw camera modes are supported, giving details of the maximum framerate and the field of view.

Changed

* Installation through pip now avoids installing the Qt and OpenGL dependencies by default. If you want them, use "pip3 install picamera2[gui]" or just do "sudo apt install -y python3-qt5 python3-opengl" first.
* Fixed bug displaying overlays using DRM (pykms seems to have changed underneath us).
* There's been some refactoring which has changed the way asynchronous calls (with wait=False) work. You should now call picam2.wait() to obtain the result, and you can set the signal_function so that you can avoid calling it before it's finished. The previous fields like "async_result" have been removed.
* JpegEncoder defaults to producing YUV420 output now, though the constructor allows other colour subsampling modes to be chosen.
* Fix bug where framerates had to be integer values.
* Fix typo in align_configuration method.
* Allow in-place image manipulation (using the MappedArray class) even when the image rows have padding.

Page 4 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.