How to use the vcsi.vcsi.Frame function in vcsi

To help you get started, we’ve selected a few vcsi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github amietn / vcsi / vcsi / vcsi.py View on Github external
def do_capture(ts_tuple, width, height, suffix, args):
        fd, filename = tempfile.mkstemp(suffix=suffix)

        media_capture.make_capture(ts_tuple[1], width, height, filename)

        blurriness = 1
        avg_color = 0

        if not args.fast:
            blurriness = media_capture.compute_blurriness(filename)
            avg_color = media_capture.compute_avg_color(filename)

        os.close(fd)
        frm = Frame(
            filename=filename,
            blurriness=blurriness,
            timestamp=ts_tuple[0],
            avg_color=avg_color
        )
        return frm