def METHOD_NAME(file_path, out_dir, file_format, deinterlace_mode, first_frame=0, last_frame=255, cml_fps=25): 
    #########################
    # Read the deinterlace
    #   -1 - no deinterlace
    #    0 - odd first
    #    1 - even first
    if deinterlace_mode not in (-1, 0, 1):
        print('Unknown deinterlace mode:', deinterlace_mode)
        sys.exit()
    # Check if the file exists
    if not os.path.isfile(file_path):
        print('The file {:s} does not exist!'.format(file_path))
        sys.exit()
    # Check if the output directory exists, make it if it doesn't
    if not os.path.exists(out_dir):
        print('Making directory: out_dir')
        mkdirP(out_dir)
    # Open the FF file
    dir_path, file_name = os.path.split(file_path)
    ff = readFF(dir_path, file_name)
    # Take the FPS from the FF file, if available
    if hasattr(ff, 'fps'):
        fps = ff.fps
    # Take the FPS from the config file, if it was not given as an argument
    if fps is None:
        fps = cml_fps
    # Try to read the number of frames from the FF file itself
    if ff.nframes > 0:
        nframes = ff.nframes
    else:
        nframes = 256
    # Construct a file name for saving
    if file_format == 'pngm':
        # If the METAL type PNG file is given, make the file name 'dump'
        file_name_saving = 'dump'
    else:
        file_name_saving = file_name.replace('.fits', '').replace('.bin', '')
    frame_name_time_list = []
    # Get the initial time of the FF file
    ff_dt = filenameToDatetime(file_name)
    # Go through all frames
    for i in range(first_frame, last_frame+1):
        # Reconstruct individual frames
        frame = reconstructFrame(ff, i, avepixel=True)
        # Deinterlace the frame if necessary, odd first
        if deinterlace_mode == 0:
            frame_odd = deinterlaceOdd(frame)
            frame_name, frame_dt = saveFrame(frame_odd, i, out_dir, file_name_saving, file_format, ff_dt, fps, half_frame=0)
            frame_name_time_list.append([frame_name, frame_dt])
            frame_even = deinterlaceEven(frame)
            frame_name, frame_dt = saveFrame(frame_even, i, out_dir, file_name_saving, file_format, ff_dt, fps, half_frame=1)
            frame_name_time_list.append([frame_name, frame_dt])
        # Even first
        elif deinterlace_mode == 1:
            frame_even = deinterlaceEven(frame)
            frame_name, frame_dt = saveFrame(frame_even, i, out_dir, file_name_saving, file_format, ff_dt, fps, half_frame=0)
            frame_name_time_list.append([frame_name, frame_dt])
            frame_odd = deinterlaceOdd(frame)
            frame_name, frame_dt = saveFrame(frame_odd, i, out_dir, file_name_saving, file_format, ff_dt, fps, half_frame=1)
            frame_name_time_list.append([frame_name, frame_dt])
        # No deinterlace
        else:
            frame_name, frame_dt = saveFrame(frame, i, out_dir, file_name_saving, file_format, ff_dt, fps)
            frame_name_time_list.append([frame_name, frame_dt])
    # If the frames are saved for METAL, the times have to be given in a separate file
    if file_format == 'pngm':
        with open(os.path.join(out_dir, 'frtime.txt'), 'w') as f:
            # Write all frames and times in a file
            for frame_name, frame_dt in frame_name_time_list:
                # 20180117:01:08:29.8342
                f.write('{:s} {:s}\n'.format(frame_name, frame_dt.strftime("%Y%m%d:%H:%M:%S.%f")))
    return frame_name_time_list