Video_DQM¶
This is the class for computing the video DQM.
- class QPrism.Video.DQM.Video_DQM¶
Bases:
object
- artifacts_ratio(path: str)¶
This function gets how much of the video that contains video artifacts
Returns the ratio of the video that contains artifacts (motion blur, too grainy, static) if the input path is a file. Returns a dict mathing the input videos to their artifacts percentage if the input path is a folder.
- pathstr
path to a folder or a file
- bit_rate(path: str)¶
Get the bit rate of the video
Returns the bit rate for input video or each video in the input folder.
- pathstr
path to a folder or a file
- creation_time(path: str)¶
This function gets the creation time of a video.
Returns the creation time of the video if the input path is a file. Returns a dict matching the input videos to their creation time if the input path is a folder.
- pathstr
path to a folder or a file
- duration(path: str)¶
This function gives the length for both a folder of audios or a single audio file.
Returns the length of the input audio if the input path is a file. Returns a dict matching the input audio files to their length if the input path is a folder.
- pathstr
A path to a folder or a file.
- format(path: str)¶
Get the format of the video This functions calls the video_format function and gives the format for both a folder of videos or a single video file.
path : path to a folder or a file
dict (incase of folder) str (incase of file)
dict : {‘video_file1’ : ‘.mp4’, … ‘video_filen’ : ‘.mp4’} str : ‘.mp4’
- framerate(path: str)¶
This function get the framerate of the video.
Returns the frame rate of the video if the input path is a file. Returns a dict matching the input videos to their frame rate if the input path is a folder.
- pathstr
path to a folder or a file
- illumination(path: str)¶
This function gives the brightness of the video.
Returns the brightness of the video if the input path is a file. Returns a dict matching the input videos to their frame rate if the input path is a folder.
- pathstr
path to a folder or a file
- object_detection(path: str, modelname: str)¶
This function detect all the objects present in the video.
Returns the detected objects in the video if the input path is a file. Returns a dict matching the input videos to their detected objects.
- pathstr
path to a folder or a file
- resolution(path: str)¶
This function returns the resolution of a video or the videos in given folder
- pathstr
path to a folder or a file
- save_csv(path: str, output_path: str, modelname='yolov5s')¶
Creates a csv file consists of all the video metrics.
Saves a csv file to the input path with all video quality metrics
- pathstr
path to single video file or folder
- output_pathstr
path to the output csv file
- modelnamestr
yolov5 model name for object detection