I have a problem. Html5 video have different duration than I get from ffmpeg. This is example. In this video have 250 frames and 10s, frame rate - 25fps. In browser this video have duration 10.026667s and 251.666675 frames. In end of video is two duplicate frames. For me it is important that the number of frames correspond to reality. Why is this happening and how can I fix it? http://jsfiddle.net/Ck6Zq/196/
<div class="frame">
<div id="current">1</div>
<div id="duration">1</div>
</div>
<video height="180" width="100%" id="video">
<source src="http://www.w3schools.com/html/mov_bbb.mp4"></source>
</video>
<button onclick="document.getElementById('video').currentTime += (1 / 25);">Next Frame</button><br/>
var currentFrame = $('#currentFrame');
var video = $('#video');
$("#video").on(
"timeupdate",
function(event){
onTrackedVideoFrame(this.currentTime, this.duration);
}
);
function onTrackedVideoFrame(currentTime, duration){
$("#current").text(currentTime + ' ' + (currentTime*25+1));
$("#duration").text(duration + ' ' + (duration*25+1));
};