def select_frames(frames, frames_per_video):
    """
    Select a certain number of frames determined by the number (frames_per_video)
    :param frames: list of frames
    :param frames_per_video: number of frames to select
    :return: selection of frames
    """
    step = len(frames)//frames_per_video
    if step == 0:
        step = 1
    first_frames_selection = frames[::step]
    final_frames_selection = first_frames_selection[:frames_per_video]

    return final_frames_selection