def _get_video_format(self, output, format=None):
    '\n        Given an output object and an optional format, attempt to determine the\n        requested video format.\n\n        This method is used by all recording methods to determine the requested\n        output format. If *format* is specified as a MIME-type the "video/" or\n        "application/" prefix will be stripped. If *format* is not specified,\n        then :meth:`_get_output_format` will be called to attempt to determine\n        format from the *output* object.\n        '
    if isinstance(format, bytes):
        format = format.decode('utf-8')
    format = (format or self._get_output_format(output))
    format = (format[6:] if format.startswith('video/') else (format[12:] if format.startswith('application/') else format))
    return format
Given an output object and an optional format, attempt to determine the
requested video format.

This method is used by all recording methods to determine the requested
output format. If *format* is specified as a MIME-type the "video/" or
"application/" prefix will be stripped. If *format* is not specified,
then :meth:`_get_output_format` will be called to attempt to determine
format from the *output* object.
def _get_video_format(self, output, format=None):
    '\n        Given an output object and an optional format, attempt to determine the\n        requested video format.\n\n        This method is used by all recording methods to determine the requested\n        output format. If *format* is specified as a MIME-type the "video/" or\n        "application/" prefix will be stripped. If *format* is not specified,\n        then :meth:`_get_output_format` will be called to attempt to determine\n        format from the *output* object.\n        '
    if isinstance(format, bytes):
        format = format.decode('utf-8')
    format = (format or self._get_output_format(output))
    format = (format[6:] if format.startswith('video/') else (format[12:] if format.startswith('application/') else format))
    return format