A class to read (almost) all types of video in Matlab. This class has been developped as a alternative (and more) to matlab VideoReader object that is sometime buggy under Ubuntu. I also provides all the properties of the input video including the type (I, P, B) of each frame. The class uses FFmpeg to decode and save all the frames of the input video as .bmp files at a specified location (hard drive) and thus doesn't make usage of the computer's RAM . FFprobe is used to read the properties of the input videos (fps, video bitrate, video resolution, frames type, video rotation parameter).
- file_name: path to the video.
- resolution: video's resolution [height, width].
- video_bitrate: video bitrate.
- frame_rate: frame rate (fps).
- orientation: rotation angle.
- nber_Iframes: number of I frames.
- nber_Pframes: number of P frames.
- nber_Bframes:number of B frames.
- nber_frames:total number of frames.
- frames_type: array giving the type of each frame (I,P,B).
- Iframes_indexes: array giving indexes of I frames.
- Pframes_indexes: array giving indexes of P frames.
- Bframes_indexes: array giving indexes of B frames.
- GOPs_structures: array giving the structure of each Group Of Pictures (GOP).
- obj(video_path, temp_path): class constructor, recieves the video path and a frames' temporary storage location. All the video's properties are readable after the object's instantiation.
- obj.loadToDisk(): decodes the video and saves its frames as .bmp files at the specified location.
- [frame] = obj.readFrame(frame_index): reads the frames of specified index.
- obj.unloadFromDisk(): frees the space on the hard drive alocated for frames' temporary storage.