KikoPlayProject / KikoPlay

KikoPlay - NOT ONLY A Full-Featured Danmu Player 不仅仅是全功能弹幕播放器
https://kikoplay.fun
GNU General Public License v3.0
1.63k stars 96 forks source link

建议添加跳转播放功能 #100

Closed oh1h0ney closed 9 months ago

oh1h0ney commented 1 year ago

追剧有片头片尾,建议增加跳转播放功能用来跳过片头和片尾

Protostars commented 1 year ago

可是怎么确定片头片尾长度呢

hooke007 commented 1 year ago

流媒体播放器应该是通过虚拟章节的方式来实现的,但是你的本地文件不存在这些信息,无法实现

hooke007 commented 1 year ago

在mpv后端是通过关键字匹配章节名称的笨办法粗暴解决 前提是文件本身带有章节而且章节名称不是 chapter01 这种随意写的

-- chapter_skip.lua
local keywords = { 
    "OP$",
    "opening$",
    "ED$",
    "ending$",
}

function on_chapter_change(_, value)
    if not value then
        return
    end
    for _, words in pairs(keywords) do
        if string.match(value, words) then
            mp.commandv("add", "chapter", 1)
        end
    end
end

mp.observe_property("chapter-metadata/TITLE", "string", on_chapter_change)
oh1h0ney commented 1 year ago

这么细的可以不需要,只需要提供像 potplayer 一样的跳略设置就好 每一部剧的片头片尾大致是相同的,设置一下体验就会好很多了 image

lbcmiao commented 1 year ago

有些番的op不是从0秒开始,而是先放一两分钟的剧情再衔接op,有一些甚至有一两集没有op。如果字幕组、压制组没有做章节标记,播放器默认设置简单粗暴的跳转就显得很傻了。