@classmethod
    def make_keyframes(cls, video_path, log_path):
        try:
            ffmpeg_process = subprocess.Popen(['ffmpeg', '-i', video_path,
                            '-f', 'yuv4mpegpipe',
                            '-vf', 'scale=640:360',
                            '-pix_fmt', 'yuv420p',
                            '-vsync', 'drop', '-'], stdout=subprocess.PIPE)
        except __HOLE__ as e:
            if e.errno == 2:
                raise SushiError("Couldn't invoke ffmpeg, check that it's installed")
            raise

        try:
            scxvid_process = subprocess.Popen(['SCXvid', log_path], stdin=ffmpeg_process.stdout)
        except OSError as e:
            ffmpeg_process.kill()
            if e.errno == 2:
                raise SushiError("Couldn't invoke scxvid, check that it's installed")
            raise
        scxvid_process.wait()
dataset/ETHPy150Open tp7/Sushi/demux.py/SCXviD.make_keyframes