remotion icon indicating copy to clipboard operation
remotion copied to clipboard

ability to call getVideoMetadata() from a node js app.

Open alexfernandez803 opened this issue 1 year ago • 2 comments

Feature Request 🛍️

Ability to use getVideoMetadata to query the width, height and other metadata from nodejs app. Right now, I am seeing this error node_modules/@remotion/media-utils/dist/get-video-metadata.js:13 throw new Error('getVideoMetadata() is only available in the browser.');

Use Case

This is nice to have to precompute the width and height of the video as a parameter for getInputProps().

Possible Solution

use ffprobe to get the metadata, we just need to expose a function. https://superuser.com/questions/841235/how-do-i-use-ffmpeg-to-get-the-video-resolution

alexfernandez803 avatar Jun 22 '23 09:06 alexfernandez803

Legit request!

JonnyBurger avatar Jun 23 '23 11:06 JonnyBurger

@remotion/media-utils should stay a browser-only package, so it doesn't break suddenly when you import via browser.

We could add this as APIs for @remotion/renderer.

JonnyBurger avatar Jun 26 '23 15:06 JonnyBurger