def make_frames_list(frames):
    """Creates a string list in the appropriate format for ffmpeg to extract a specific set of frames.

    This function is used inside the extract_frames() function.

    Args:
        frames (list[int]): List of frame indices.

    Returns:
        str: String in the appropriate format for ffmpeg.

    """
    aux = "".join([f"eq(n\\,{x})+" for x in frames])[:-1]

    return f"select='{aux}'"