import cv2

def videoParameters(videoPath):
    nameID = (videoPath.rsplit("/")[1]).rsplit(".")[0]
    
    video = cv2.VideoCapture(videoPath)
    width = int(video.get(cv2.CAP_PROP_FRAME_WIDTH))
    height = int(video.get(cv2.CAP_PROP_FRAME_HEIGHT))
    fps = int(video.get(cv2.CAP_PROP_FPS))
    total_frames = int(video.get(cv2.CAP_PROP_FRAME_COUNT))
    duration = total_frames / fps
    video.release()

    print('Video width:', width)
    print('Video height:', height)
    print('Video FPS:', fps)
    print('Total frames:', total_frames)
    print('Duration:', duration, 'seconds')
    
    return nameID, fps