Search code examples
vue.jsfrontendmp4

Which npm package can get video information


I want to find a npm package, or a tool for getting information such as mp4 video frame rate on the front end. Then introduce the npm package into the vue project. This tool should look like this. It gets the address of the video, and outputs information such as the frame rate of the video (this information must be present). The more other information, the better. I have found a map4box.js, "https://github.com/gpac/mp4box.js/". But I can't find the frame rate information I want on his official website. So I want to ask if anyone knows about this tool. It would be better if there is a demo code.thank you all.


Solution

  • There is an npm package ffmpeg

    It can get meta from the video. Here is how - https://www.npmjs.com/package/ffmpeg#the-video-object