How to use the vapoursynth.get_outputs function in VapourSynth

To help you get started, we’ve selected a few VapourSynth 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 Endilll / vapoursynth-preview / vspreview / main.py View on Github external
})
        except Exception:  # pylint: disable=broad-except
            self.script_exec_failed = True
            logging.error(
                'Script contains error(s). Check following lines for details.')
            self.handle_script_error(
                'Script contains error(s). See console output for details.')
            print_exc()
            return
        finally:
            sys.argv = argv_orig
            sys.path.pop()

        self.script_exec_failed = False

        if len(vs.get_outputs()) == 0:
            logging.error('Script has no outputs set.')
            self.handle_script_error('Script has no outputs set.')
            return

        self.toolbars.main.rescan_outputs()
        # self.init_outputs()
        self.switch_output(self.OUTPUT_INDEX)

        self.load_storage()
github Irrational-Encoding-Wizardry / yuuno / yuuno / vs / utils.py View on Github external
def get_global_outputs():
        import vapoursynth
        if hasattr(vapoursynth, "get_outputs"):
            return vapoursynth.get_outputs()
        return types.MappingProxyType(vapoursynth._get_output_dict("OutputManager.get_outputs"))
github Endilll / vapoursynth-preview / vspreview / models / outputs.py View on Github external
def __init__(self, local_storage: Optional[Mapping[str, Output]] = None) -> None:
        super().__init__()
        self.items: List[Output] = []

        local_storage = local_storage if local_storage is not None else {}
        for i, vs_output in vs.get_outputs().items():
            try:
                output = local_storage[str(i)]
                output.__init__(vs_output, i)  # type: ignore
            except KeyError:
                output = Output(vs_output, i)

            self.items.append(output)
github Endilll / vapoursynth-preview / vspreview / utils / utils.py View on Github external
def vs_clear_cache() -> None:
    import vapoursynth as vs

    cache_size = vs.core.max_cache_size
    vs.core.max_cache_size = 1
    output = list(vs.get_outputs().values())[0]
    if isinstance(output, vs.AlphaOutputTuple):
        output = output.clip
    output.get_frame(0)
    vs.core.max_cache_size = cache_size