def get_ffmpeg_dimens(input_size: tuple[int, int], max_res: int) -> str:
    """
    :param input_size: Tuple of (width, height)
    :param max_res: Maximum resolution (as in 1080p, 720p, 360p, etc)
    :return: String that can be used in ffmpeg -vf
    """
    w, h = input_size
    return f"scale={min(max_res, w)}:-2" if w < h else f"scale=-2:{min(max_res, h)}"