12. API - Encoders

Encoders are typically used by the camera to compress captured images or video frames for output to disk. However, picamera also has classes representing “unencoded” output (raw RGB, etc). Most users will have no direct need to use these classes directly, but advanced users may find them useful as base classes for Custom encoders.

Note

It is strongly recommended that you familiarize yourself with the mmalobj layer before attempting to understand the encoder classes as they deal with several concepts native to that layer.

The inheritance diagram for the following classes is displayed below:

_images/encoder_classes.svg

12.1. PiEncoder

12.2. PiVideoEncoder

12.3. PiImageEncoder

12.4. PiRawMixin

12.5. PiCookedVideoEncoder

12.6. PiRawVideoEncoder

12.7. PiOneImageEncoder

12.8. PiMultiImageEncoder

12.9. PiRawImageMixin

12.10. PiCookedOneImageEncoder

12.11. PiRawOneImageEncoder

12.12. PiCookedMultiImageEncoder

12.13. PiRawMultiImageEncoder