def generate_playback_list(data, delimiter=" ", default_delay=1):
    """Parse playback string and generate list of tuples of (frame_index, default_delay)"""
    if len(data) == 0:
        return []

    playback_list = data.strip().split("\n")
    output = []

    for row_no, frame in enumerate(playback_list, 1):
        split_frame = tuple([int(x) for x in frame.strip().split(delimiter)])

        assert len(split_frame) <= 2, "Frame %d is of invalid form!" % (row_no)

        if len(split_frame) == 1:
            output.append((split_frame[0], default_delay))
        if len(split_frame) == 2:
            output.append(split_frame)

    return output