Av1an/av1an/commandtypes.py
2021-04-13 02:23:48 +03:00

25 lines
497 B
Python

import os
from typing import Union, List, NamedTuple
Command = List[Union[str, os.PathLike]]
"""
A command as a list of strings or paths. Can be passed to subprocess.Popen
"""
class CommandPair(NamedTuple):
"""
A pair of commands, the ffmpeg filter and then the encoder command
"""
ffmpeg_cmd: Command
encode_cmd: Command
MPCommands = List[CommandPair]
"""
Multi-pass commands type
self[pass][0] gets the ffmpeg filter command
self[pass][1] gets the encoder command
"""