<commit_before>"""For HA camera components."""
from .core import HAFFmpeg


class CameraMjpeg(HAFFmpeg):
    """Implement a camera they convert video stream to MJPEG."""

    def __init__(self, ffmpeg_bin):
        """Init CameraMjpeg."""
        HAFFmpeg.__init__(self, ffmpeg_bin=ffmpeg_bin)

    def open_camera(self, input_data, extra_cmd=None):
        """Open FFmpeg process as mjpeg video stream."""
        command = [
            "-i",
            input_data,
            "-an",
            "-c:v",
            "mjpeg"
        ]

        self.open(cmd=command, extra_cmd=extra_cmd)<commit_msg>change name from input_data to input_source<commit_after>"""For HA camera components."""
from .core import HAFFmpeg


class CameraMjpeg(HAFFmpeg):
    """Implement a camera they convert video stream to MJPEG."""

    def __init__(self, ffmpeg_bin):
        """Init CameraMjpeg."""
        HAFFmpeg.__init__(self, ffmpeg_bin=ffmpeg_bin)

    def open_camera(self, input_source, extra_cmd=None):
        """Open FFmpeg process as mjpeg video stream."""
        command = [
            "-i",
            input_source,
            "-an",
            "-c:v",
            "mjpeg"
        ]

        self.open(cmd=command, extra_cmd=extra_cmd)
{'fraction_non_alphanumeric': 0.12116316639741519, 'fraction_numerical': 0.0, 'mean_word_length': 2.348648648648649, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4767792', 'n_tokens_mistral': 394, 'n_tokens_neox': 376, 'n_words': 94}