Exemplo n.º 1
0
def cli(ffmpeg):
    """FFMPEG version."""

    loop = asyncio.get_event_loop()
    ffversion = FFVersion(ffmpeg_bin=ffmpeg, loop=loop)
    future = asyncio.ensure_future(ffversion.get_version())
    loop.run_until_complete(future)
    print(future.result())
Exemplo n.º 2
0
    async def async_get_version(self):
        """Return ffmpeg version."""

        ffversion = FFVersion(self._bin)
        self._version = await ffversion.get_version()

        self._major_version = None
        if self._version is not None:
            result = re.search(r"(\d+)\.", self._version)
            if result is not None:
                self._major_version = int(result.group(1))

        return self._version, self._major_version