def METHOD_NAME(input_source, out_frame, frame_shape, finish_flag):
    """Produces live frames from the input stream"""
    cap = cv2.VideoCapture(input_source)
    cap.set(cv2.CAP_PROP_BUFFERSIZE, 1)
    source_fps = cap.get(cv2.CAP_PROP_FPS)
    if source_fps > 0:
        trg_time_step = 1.0 / source_fps
    else:
        log.warning('Got a non-positive value as FPS of the input. Interpret it as 30 FPS')
        trg_time_step = 1.0 / 30.0
    while True:
        start_time = time.perf_counter()
        _, frame = cap.read()
        if frame is None:
            break
        with out_frame.get_lock():
            buffer = np.frombuffer(out_frame.get_obj(), dtype=np.uint8)
            np.copyto(buffer.reshape(frame_shape), frame)
        end_time = time.perf_counter()
        elapsed_time = end_time - start_time
        rest_time = trg_time_step - elapsed_time
        if rest_time > 0.0:
            time.sleep(rest_time)
    finish_flag.value = True
    cap.release()