Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where in metadata of a video in html5 is the fps saved?

In order to fully implement my custom html5 video player, I need the the exact frame rate of a video. However I have not been able to find it yet and am using a standard value of 25. Typically videos have a frame rate value in meta-data so I accessed meta-data using something like this:

var vid = document.getElementById("myVideo");
vid.onloadedmetadata = function(e) {
console.log(e);
};

However I can't find frame rate here. Maybe I am not reading metadata at all. I can use your help. Thanks!

like image 993
Hasan Wajahat Avatar asked Feb 16 '16 01:02

Hasan Wajahat


1 Answers

Try https://mediainfo.js.org (github)

It works on ui only, no backend needed

I just implemented it and it looks like it worked perfectly fine (at least in Chrome v 70.0.3538.77) for gettting wide media information

It looks like modern browsers beginning to work with some binary libraries

like image 81
qiAlex Avatar answered Sep 28 '22 09:09

qiAlex