5.1. from_video¶
This method extracts frames from a video file and creates a FitsArray object.
- FitsArray.from_video(cls, path: str, start_time: Time | float | None = None, logger: Logger | None = None, verbose: bool = False) Self¶
Creates a
FitsArrayfrom frames of a video.Notes
This method extracts frames from a video file and creates a
FitsArrayobject.Parameters
pathstrThe path of the video file as a string.
start_timeOptional[Union[Time, float]]The start time of the video. It can be a
Timeobject or a float representing the start time in seconds. IfNone, the first frame’sMY_RELJDis considered zero (0).loggerOptional[Logger]An optional logger for logging messages during the operation.
verbosebool, optional, default=FalseIf set to
True, additional information will be displayed during processing.
Returns
FitsArrayA
FitsArrayobject containing the frames extracted from the video.
Raises
FileNotFoundErrorRaised when the specified video file does not exist.
5.1.1. Example:¶
from myraflib import FitsArray
fa = FitsArray.from_video("PATH/TO/VIDEO")