You can upload videos to Pixel Projects and Vector Projects.

Upload videos

Upload video

To upload a video:

sa.upload_video_to_project(
    project = "Project Name",
    video_path = "./video.mp4")

Upload a folder of videos

To upload a folder of videos:

sa.upload_videos_from_folder_to_project(
    project = "Project Name",
    folder_path = “./videos”)

Recusive upload

To enable recursive upload:

sa.upload_videos_from_folder_to_project(
    project = "Project Name",
    folder_path = "./videos", 
    exclude_file_patterns = ['mpg', 'ogg'], 
    recursive_subfolders = True)

📘

SuperAnnotate supports the following video file formats: MP4, AVI, MOV, WEBM, FLV, MPG, and OGG.

Exclude video formats from upload

To exclude certain video file formats from the upload:

sa.upload_videos_from_folder_to_project(
    project = "Project Name",
    folder_path = "./videos", 
    exclude_file_patterns = ['mpg', 'ogg'])

Set video frame rate

When you upload a video, it'll be split into frames (images). To set the frame rate:

sa.upload_video_to_project(
    project = "Project Name",
    video_path = "./video.mp4", 
    target_fps = 30)

📘

Frame rate

Frame rate (fps) is the number of frames that appear per second. The higher the frame rate, the more images will appear per second, and vice versa.

Trim video

To trim a video, specify the start time and end time in seconds:

sa.upload_video_to_project(
    project = "Project Name",
    video_path = "./video.mp4", 
    target_fps = 30,
    start_time = 10.0,
    end_time = 20.5)

To trim a video and specify the frame rate:

sa.upload_videos_from_folder_to_project(
    project = "Project Name",
    folder_path = "./videos", 
    exclude_file_patterns = ['mpg', 'ogg'], 
    recursive_subfolders = True,
    target_fps = 30,
    start_time = 10.0,
    end_time = 20.5)

Attach video URLs

You can import videos to Video Projects by linking them from external storages. The linked videos are displayed in SuperAnnotate, but they aren't stored in our local servers. Learn more.


Did this page help you?