mne_videobrowser.VideoFileHelsinkiVideoMEG#
- class mne_videobrowser.VideoFileHelsinkiVideoMEG(fname: str, magic_str: str = 'HELSINKI_VIDEO_MEG_PROJECT_VIDEO_FILE')[source]#
Bases:
VideoFileVideo file reader for video files in Helsinki VideoMEG project format.
Frame timestamps in milliseconds are stored in the timestamps_ms attribute, individual frames can be accessed using the get_frame_at method.
- Parameters:
Methods
close()Close the video file.
get_frame_at(frame_idx)Read a specific frame from the video file.
Print statistics about the video file.
Attributes
Return the duration of the video in seconds.
Return the full path to the video file.
Return the ESTIMATED frames per second of the video file.
Return the number of frames in the video file.
Return the height of the video frames in pixels.
Return the width of the video frames in pixels.
- get_frame_at(frame_idx: int) ndarray[tuple[Any, ...], dtype[uint8]] | None[source]#
Read a specific frame from the video file.
- Parameters:
frame_idx (int) – Index of the frame to read.
- Returns:
The frame as a NumPy array of shape (height, width, 3) or None if the frame cannot be read. The color format is RGB and the frame is in row-major order.
- Return type:
npt.NDArray[np.uint8] | None