VideoInfo¶
- class VideoInfo(id, name, hash, link, team_id, workspace_id, project_id, dataset_id, path_original, frames_to_timecodes, frames_count, frame_width, frame_height, created_at, updated_at, tags, file_meta, meta, custom_data, processing_path)[source]¶
Bases:
NamedTupleNamedTuple with video information from Supervisely.
- Usage Example:
VideoInfo( id=19371139, name="Videos_dataset_animals_sea_lion.mp4", hash="30/TQ1BcIOn1AI4RFgRO/6psRtr3lqNPmr4uQ=", link=None, team_id=435, workspace_id=684, project_id=17208, dataset_id=55846, path_original="/h5un6l2bnaz1vj8a9qgms4-public/videos/Z/d/HD/lfgipl...NXrg5vz.mp4", frames_to_timecodes=[], frames_count=245, frame_width=1920, frame_height=1080, created_at="2023-02-07T19:35:01.808Z", updated_at="2023-02-07T19:35:01.808Z", tags=[], file_meta={ "codecName": "h264", "codecType": "video", "duration": 10.218542, "formatName": "mov,mp4,m4a,3gp,3g2,mj2", "framesCount": 245, "framesToTimecodes": [], "height": 1080, "index": 0, "mime": "video/mp4", "rotation": 0, "size": "6795452", "startTime": 0, "streams": [], "width": 1920, }, custom_data={}, processing_path="1/194", )
Create new instance of VideoInfo(id, name, hash, link, team_id, workspace_id, project_id, dataset_id, path_original, frames_to_timecodes, frames_count, frame_width, frame_height, created_at, updated_at, tags, file_meta, meta, custom_data, processing_path)
Methods
Return number of occurrences of value.
Return first index of value.
Attributes
str: Video creation time.
dict: A dictionary containing custom data associated with the video.
int:
DatasetID in Supervisely.Duration of the video in seconds.
Duration of the video in "HH:MM:SS.nnn" format.
dict: A dictionary containing metadata about the video file.
int: Video frames height in pixels.
int: Video frames width in pixels.
int: Number of frames in the video
String representation of the number of frames in the video.
List[str]: A list of timecodes in the format "SS.nnn" corresponding to each frame.
str: Video hash obtained by base64(sha256(file_content)).
int: Video ID in Supervisely.
URL to an image preview of the video.
str: Link to video.
dict: Video object meta information.
str: Video filename.
str: Relative storage URL to video.
str: Path to the video file on the server.
int:
ProjectID in Supervisely.List[
VideoTag]: Video Tag list.int:
TeamApiID in Supervisely.str: Time of last video update.
int:
WorkspaceApiID in Supervisely.-
index(value, start=
0, stop=9223372036854775807, /)¶ Return first index of value.
Raises ValueError if the value is not present.
- created_at¶
str: Video creation time. e.g. “2019-02-22T14:59:53.381Z”.
- custom_data¶
dict: A dictionary containing custom data associated with the video.
- property duration : float¶
Duration of the video in seconds.
- Returns:
Duration of the video in seconds.
- Return type:
- property duration_hms : str¶
Duration of the video in “HH:MM:SS.nnn” format.
- Returns:
Duration of the video in “HH:MM:SS.nnn” format.
- Return type:
- file_meta¶
dict: A dictionary containing metadata about the video file.
- frame_height¶
int: Video frames height in pixels.
- frame_width¶
int: Video frames width in pixels.
- frames_count¶
int: Number of frames in the video
- property frames_count_compact : str¶
String representation of the number of frames in the video. Used for converting large numbers into readable strings.
- Returns:
Number of frames in the video represented in string format.
- Return type:
- frames_to_timecodes¶
List[str]: A list of timecodes in the format “SS.nnn” corresponding to each frame.
- hash¶
str: Video hash obtained by base64(sha256(file_content)). Use hash for files that are expected to be stored at Supervisely or your deployed agent.
- id¶
int: Video ID in Supervisely.
- property image_preview_url : str¶
URL to an image preview of the video.
- Returns:
URL to an image preview of the video.
- Return type:
- link¶
str: Link to video.
- meta¶
dict: Video object meta information.
- name¶
str: Video filename.
- path_original¶
str: Relative storage URL to video. e.g. “/h5un6l2bnaz1vms4-public/videos/Z/d/HD/lfgipl…NXrg5vz.mp4”.
- processing_path¶
str: Path to the video file on the server.
- tags¶
List[
VideoTag]: Video Tag list. e.g. “[{‘entityId’: 19371139, ‘tagId’: 377141, ‘id’: 12241539, ‘labelerLogin’: ‘admin’, ‘createdAt’: ‘2023-02-07T19:35:01.808Z’, ‘updatedAt’: ‘2023-02-07T19:35:01.808Z’, ‘frameRange’: [244, 244]}, {…}]”.
- updated_at¶
str: Time of last video update. e.g. “2019-02-22T14:59:53.381Z”.
- workspace_id¶
int:
WorkspaceApiID in Supervisely.