Part of the
@remotion/media-utils package of helper functions.
src to a video, loads it and returns metadata for the specified source.
A string pointing to an asset.
Promise<VideoMetadata> - object with information about the video data:
numberThe duration of the video in seconds.
numberThe width of the video in pixels.
numberThe height of the video in pixels.
numberVideo width divided by video height.
booleanWhether the video was imported locally or from a different origin.
This function is memoizing the results it returns.
If you pass in the same argument to
src multiple times, it will return a cached version from the second time on, regardless of if the file has changed. To clear the cache, you have to reload the page.