Open dayday6668 opened 2 years ago
How to obtain audio and video information, such as duration, width and height
Using ffmpegJs
This can be done with ffprobe-wasm.
https://github.com/buzz/mediainfo.js works well for this
How to obtain audio and video information, such as duration, width and height
A non-concise and slightly messy approach (but working) is to get them from the DOM video, image, audio tags and pass them to your ffmpeg function.
Make sure to preload='metadata' on the elements, and/or make sure all of them are inside the viewport when calling document.getElementWhatever.
How to obtain audio and video information, such as duration, width and height