def stop_recording(self, splitter_port=1):
    '\n        Stop recording video from the camera.\n\n        After calling this method the video encoder will be shut down and\n        output will stop being written to the file-like object specified with\n        :meth:`start_recording`. If an error occurred during recording and\n        :meth:`wait_recording` has not been called since the error then this\n        method will raise the exception.\n\n        The *splitter_port* parameter specifies which port of the video\n        splitter the encoder you wish to stop is attached to. This defaults to\n        ``1`` and most users will have no need to specify anything different.\n        Valid values are between ``0`` and ``3`` inclusive.\n\n        .. versionchanged:: 1.3\n            The *splitter_port* parameter was added\n        '
    try:
        with self._encoders_lock:
            encoder = self._encoders[splitter_port]
    except KeyError:
        raise PiCameraNotRecording(('There is no recording in progress on port %d' % splitter_port))
    else:
        try:
            self.wait_recording(0, splitter_port)
        finally:
            encoder.close()
            with self._encoders_lock:
                del self._encoders[splitter_port]
Stop recording video from the camera.

After calling this method the video encoder will be shut down and
output will stop being written to the file-like object specified with
:meth:`start_recording`. If an error occurred during recording and
:meth:`wait_recording` has not been called since the error then this
method will raise the exception.

The *splitter_port* parameter specifies which port of the video
splitter the encoder you wish to stop is attached to. This defaults to
``1`` and most users will have no need to specify anything different.
Valid values are between ``0`` and ``3`` inclusive.

.. versionchanged:: 1.3
    The *splitter_port* parameter was added
def stop_recording(self, splitter_port=1):
    '\n        Stop recording video from the camera.\n\n        After calling this method the video encoder will be shut down and\n        output will stop being written to the file-like object specified with\n        :meth:`start_recording`. If an error occurred during recording and\n        :meth:`wait_recording` has not been called since the error then this\n        method will raise the exception.\n\n        The *splitter_port* parameter specifies which port of the video\n        splitter the encoder you wish to stop is attached to. This defaults to\n        ``1`` and most users will have no need to specify anything different.\n        Valid values are between ``0`` and ``3`` inclusive.\n\n        .. versionchanged:: 1.3\n            The *splitter_port* parameter was added\n        '
    try:
        with self._encoders_lock:
            encoder = self._encoders[splitter_port]
    except KeyError:
        raise PiCameraNotRecording(('There is no recording in progress on port %d' % splitter_port))
    else:
        try:
            self.wait_recording(0, splitter_port)
        finally:
            encoder.close()
            with self._encoders_lock:
                del self._encoders[splitter_port]