# Lewis Crawler
# 2021 - 2022
# Kitsune Scientific

import ffmpeg


class RobotStreamer:
    def __init__(self, logger):
        self.log = logger

    def run(self):
        self.log.debug('Running RobotStreamer')

        stream = ffmpeg.input(
            'houston/robotstreamer/resources/Test-Pattern.jpg',
            f='image2',
            loop='1',
            framerate=25,
            video_size='1280x720')

        stream = ffmpeg.output(
            stream,
            'http://robotstreamer.com/<secret>/1280/720',
            f='mpegts',
            bf=0,
            muxdelay=0.001,
            codec='mpeg1video')

        ffmpeg.run(stream)
