在flowplayer上搜索是不对的 [英] seek on flowplayer is not right

查看:28
本文介绍了在flowplayer上搜索是不对的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试寻找没有蒸汽的视频.

I'm trying to seek video with no steaming.

这是我的页面:

<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>

当我点击10s"并寻找视频到 10s 时,视频时间变为 7.04s,

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

然后我寻求到 20 秒,它变成了 17.04 秒,

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

等等,比如:

30s  -> 20.08

40s  -> 30.08

50s  -> 40.08

60s  -> 56.52

70s  -> 66.52

80s  -> 76.52

90s  -> 86.52

100s -> 90.92

感谢您的帮助.

推荐答案

问题是 flowplayer 只能寻找关键帧,所以为了能够寻找任何一秒,你需要每一秒都有关键帧.这很可能意味着您需要在使用配置为每秒强制关键帧的 ffmpeg 上传视频时重新编码.

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.

这篇关于在flowplayer上搜索是不对的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆