Calculating video length


At the moment my app calculates the length (in seconds) of uploaded videos via html embedding. This results in a long wait time when the user uploads multiple videos at once, often he thinks the app has crashed when in fact it just takes a really long time.

Does anyone know of a more efficient way to calculate the length (in seconds) of uploaded videos in shotstack or via some external service or API?



Have you tried using the media inspector API?

If you’re using js you could use a Promise.all to retrieve the duration of each video file uploaded.

1 Like

Great thank you, I will give this a try!