VideoInfo

class VideoInfo[source]

Bases: tuple

Object with Video parameters from Supervisely.

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'
)

Methods

count

Return number of occurrences of value.

index

Return first index of value.

Attributes

created_at

str: Video creation time.

custom_data

dict: A dictionary containing custom data associated with the video.

dataset_id

int: Dataset ID in Supervisely.

duration

Duration of the video in seconds.

duration_hms

Duration of the video in "HH:MM:SS.nnn" format.

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

class

int: Number of frames in the video

frames_count_compact

String representation of the number of frames in the video.

frames_to_timecodes

class

list: A list of timecodes in the format "SS.nnn" corresponding to each frame.

hash

str: Video hash obtained by base64(sha256(file_content)).

id

int: Video ID in Supervisely.

image_preview_url

URL to an image preview of the video.

link

str: Link to video.

meta

dict: Video object meta information.

name

str: Video filename.

path_original

str: Relative storage URL to video.

processing_path

str: Path to the video file on the server.

project_id

int: Project ID in Supervisely.

tags

list: Video VideoTag list.

team_id

int: TeamApi ID in Supervisely.

updated_at

str: Time of last video update.

workspace_id

int: WorkspaceApi ID in Supervisely.

__add__(value, /)

Return self+value.

__mul__(value, /)

Return self*value.

count(value, /)

Return number of occurrences of value.

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.

dataset_id

int: Dataset ID in Supervisely.

property duration

Duration of the video in seconds.

Returns

Duration of the video in seconds.

Return type

float

property duration_hms

Duration of the video in “HH:MM:SS.nnn” format.

Returns

Duration of the video in “HH:MM:SS.nnn” format.

Return type

str

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
Class

int: Number of frames in the video

property frames_count_compact

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

str

frames_to_timecodes
Class

list: 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

URL to an image preview of the video.

Returns

URL to an image preview of the video.

Return type

str

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.

project_id

int: Project ID in Supervisely.

tags

list: Video VideoTag 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]}, {…}]”.

team_id

int: TeamApi ID in Supervisely.

updated_at

str: Time of last video update. e.g. “2019-02-22T14:59:53.381Z”.

workspace_id

int: WorkspaceApi ID in Supervisely.