How can i download Videos from frame.io using python

Hi Team,

I am unable to download videos from frame.io using python.

Hi there! Couple of questions for you before we can help you put:

  • Are you using our Python SDK, if so which version?
  • Can you download videos in your frame.io account using our web app?
  • What error are you getting, can you share screenshots?

(post deleted by author)

You’re using a key piece of the SDK as a script rather than using the SDK. Those relative imports are what makes the SDK work internally.

Here’s a quick sample to get you started!

import os
from frameioclient import FrameioClient

asset_id = "YOUR_ASSET_ID_HERE"

def download_asset(
    asset_id: str = "",
    destination: str = "./downloads",
):
    token = os.getenv("FRAMEIO_TOKEN")
    client = frameioclient.FrameioClient(token)
    asset_info = client.assets.get(asset_id)
    download_stats = client.assets.download(
        asset_info, destination, multi_part=True, replace=True
    )

    return download_stats

if __name__ == "__main__":
    download_asset(asset_id)

(post deleted by author)

Did you supply an actual “FRAMEIO_TOKEN” you would have gotten from our developer site or did you try to use my code exactly as is?

I just redacted your token and we will be revoking it so you will need to make a new one. Please don’t share those publicly as it will give anyone access to your account!

Glad to hear you were using token in the right way though :slight_smile:. Having taken a look in our support tool I don’t see a token associated with your email address. Can you send me a direct message on the forum with the email address your token should be associated with so I can check its permissions?

(post deleted by author)

Hey,

To download a single file, select the three dots … on a clip > Download > download the original file or a smaller proxy file :+1:

Downloading from within the player page is also an option. Select the three dots… at the top right of the file and select Download.

Are there any specific authentication or authorization requirements to access videos on Frame.io using Python? :thinking:

You just need to create a developer token with asset.read permissions and then pass that into the FrameioClient(token="fio-kjslkfjslajfklasjdfklajflkjajflkafjlkajf") class instance you create.