Any way to get duration for files?

,

Is there a way to get duration/runtime for video files via API? Or frame count and fps?

FPS is listed under /v4/accounts/:account_id/files/:file_id/metadata

Same with duration (this is in seconds I believe)

You can get number of frames by multiplying the duration by the frame rate
34.451*23.976=825.997176

1 Like

Ah ok great, thank you!

1 Like

Is there somewhere in the API docs (perhaps a @rosiec question?) where I can see all of the metadata fields I can expect to receive? The API Reference response definitions just give generic structures/types for everything in metadata. Even the sample responses (e.g. Show File) lack examples of the real metadata returned.

Also on the topic of the developer documentation - I see there’s functionality for interactively testing the calls (and login seems, at first glance, to work). But all of the endpoints error out, either with token error or in the case of List accounts, which fails because the example has a page size of 0.

@nhe the “try it” function works once you log in, however you will have to provide all of the uuids yourself (similar to postman) as the the fields that are populated are randomized via the openapi spec.

I couldn’t find a way to edit on the dev portal, but that’s ok, I ended up getting Postman set up.

Still, is there a reference somewhere of all the metadata that can be expected? I imagine it changes depending on things like file type? It would be a great to see a reference of what all the possible permutations is.

It’s all of the path parameters and query parameters that need to be supplied:

All of the examples are auto-generated on our backend, I will add a ticket to make sure full responses are included in the examples to show real world responses.