def _get_video_encoder(self, camera_port, output_port, format, resize, **options):
    "\n        Construct a video encoder for the requested parameters.\n\n        This method is called by :meth:`start_recording` and\n        :meth:`record_sequence` to construct a video encoder.  The\n        *camera_port* parameter gives the MMAL camera port that should be\n        enabled for capture by the encoder. The *output_port* parameter gives\n        the MMAL port that the encoder should read output from (this may be the\n        same as the camera port, but may be different if other component(s)\n        like a splitter have been placed in the pipeline). The *format*\n        parameter indicates the video format and will be one of:\n\n        * ``'h264'``\n        * ``'mjpeg'``\n\n        The *resize* parameter indicates the size that the encoder should\n        resize the output to (presumably by including a resizer in the\n        pipeline). Finally, *options* includes extra keyword arguments that\n        should be passed verbatim to the encoder.\n        "
    encoder_class = (PiRawVideoEncoder if (format in self.RAW_FORMATS) else PiCookedVideoEncoder)
    return encoder_class(self, camera_port, output_port, format, resize, **options)
Construct a video encoder for the requested parameters.

This method is called by :meth:`start_recording` and
:meth:`record_sequence` to construct a video encoder.  The
*camera_port* parameter gives the MMAL camera port that should be
enabled for capture by the encoder. The *output_port* parameter gives
the MMAL port that the encoder should read output from (this may be the
same as the camera port, but may be different if other component(s)
like a splitter have been placed in the pipeline). The *format*
parameter indicates the video format and will be one of:

* ``'h264'``
* ``'mjpeg'``

The *resize* parameter indicates the size that the encoder should
resize the output to (presumably by including a resizer in the
pipeline). Finally, *options* includes extra keyword arguments that
should be passed verbatim to the encoder.
def _get_video_encoder(self, camera_port, output_port, format, resize, **options):
    "\n        Construct a video encoder for the requested parameters.\n\n        This method is called by :meth:`start_recording` and\n        :meth:`record_sequence` to construct a video encoder.  The\n        *camera_port* parameter gives the MMAL camera port that should be\n        enabled for capture by the encoder. The *output_port* parameter gives\n        the MMAL port that the encoder should read output from (this may be the\n        same as the camera port, but may be different if other component(s)\n        like a splitter have been placed in the pipeline). The *format*\n        parameter indicates the video format and will be one of:\n\n        * ``'h264'``\n        * ``'mjpeg'``\n\n        The *resize* parameter indicates the size that the encoder should\n        resize the output to (presumably by including a resizer in the\n        pipeline). Finally, *options* includes extra keyword arguments that\n        should be passed verbatim to the encoder.\n        "
    encoder_class = (PiRawVideoEncoder if (format in self.RAW_FORMATS) else PiCookedVideoEncoder)
    return encoder_class(self, camera_port, output_port, format, resize, **options)