@staticmethod
def sanitize_compression(compression):
    'Make sure the given value can be used as a compression level of the video stream.\n\n        :param compression: Compression of the image (0 - no compression, 100 - max compression).\n        :type compression: int\n        :return: The given compression converted to an int.\n        :rtype: int\n        :raises: :py:exc:`ValueError` if the given compression level is outside the allowed range.\n        '
    compression = int(compression)
    if (not (0 <= compression <= 100)):
        raise ValueError(('%s is not a valid value for compression.' % str(compression)))
    return compression
Make sure the given value can be used as a compression level of the video stream.

:param compression: Compression of the image (0 - no compression, 100 - max compression).
:type compression: int
:return: The given compression converted to an int.
:rtype: int
:raises: :py:exc:`ValueError` if the given compression level is outside the allowed range.
@staticmethod
def sanitize_compression(compression):
    'Make sure the given value can be used as a compression level of the video stream.\n\n        :param compression: Compression of the image (0 - no compression, 100 - max compression).\n        :type compression: int\n        :return: The given compression converted to an int.\n        :rtype: int\n        :raises: :py:exc:`ValueError` if the given compression level is outside the allowed range.\n        '
    compression = int(compression)
    if (not (0 <= compression <= 100)):
        raise ValueError(('%s is not a valid value for compression.' % str(compression)))
    return compression