seek on flowplayer is not right

天大地大妈咪最大 提交于 2019-12-13 02:57:18

问题


I'm trying to seek video with no steaming.

this is my page:

<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="flowplayer-3.2.13.min.js"></script>
<title>Flowplayer test</title>
</head><body>

<a style="display:block;width:640px;height:360px" id="player"></a>

<script>
flowplayer("player","flowplayer/flowplayer-3.2.18.swf",{
    clip: {url:'sp/gailun640x360.mp4'}});

function vgoto(val) {$f(0).seek(val);}
</script>

<a href="javascript:vgoto(0);">0s</a>
<a href="javascript:vgoto(10);">10s</a>
<a href="javascript:vgoto(20);">20s</a>
<a href="javascript:vgoto(30);">30s</a>
<a href="javascript:vgoto(40);">40s</a>
...
<a href="javascript:vgoto(100);">100s</a>

</body></html>

When I click "10s" and seek video to 10s, video time become 7.04s,

then I seek to 20s, it become 17.04s,

and so on, like:

30s  -> 20.08

40s  -> 30.08

50s  -> 40.08

60s  -> 56.52

70s  -> 66.52

80s  -> 76.52

90s  -> 86.52

100s -> 90.92

thanks for any help.


回答1:


The issue is that flowplayer can seek to keyframes only so in order to be able to seek to any second you need to have keyframe for every second. Most probably that means that you need to recode videos when they are uploaded using ffmpeg configured to force keyframes every second.



来源:https://stackoverflow.com/questions/23755956/seek-on-flowplayer-is-not-right

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!