mpv icon indicating copy to clipboard operation
mpv copied to clipboard

Seeking shouldn't skip through chapter start/end

Open nagisa opened this issue 13 years ago • 10 comments

In case of chaptered mkv file it would be great if seeking (with ←, →) would stop at chapter start/end instead of seeking through the chapter-(start/end).

nagisa avatar Aug 06 '13 18:08 nagisa

There are shortcuts for chapter-seeking (! and @ by default).

ChrisK2 avatar Aug 06 '13 18:08 ChrisK2

There are shortcuts for chapter-seeking (! and @ by default).

Which are also stupid by default.

@nagisa If you have good ideas for better shortcuts for chapters you can post them here: #103

giselher avatar Aug 06 '13 19:08 giselher

Why should seeking stop at chapter "borders"? Imo that's highly unexpected behaviour.

But there's something else always bothering me. Imagine you have a file like Start|---A---x---B---|End with A and B being chapters and x your current position. Using add chapter -1 takes you to the start of the file while I'd expect A as new position. Is it just me or worth opening an issue?

Argon- avatar Aug 06 '13 20:08 Argon-

But there's something else always bothering me. Imagine you have a file like Start|---A---x---B---|End with A and B being chapters and x your current position. Using add chapter -1 takes you to the start of the file while I'd expect A as new position. Is it just me aka worth opening an issue?

Imagine x is after A, but very close to it (like, some seconds or less). Then you would definitely expect that add chapter -1 jumps to the start, instead of A. This is probably why it behaves this way. You can make a new issue with suggested new behavior if you think this is not ideal.

ghost avatar Aug 06 '13 20:08 ghost

Imagine x is after A, but very close to it (like, some seconds or less). Then you would definitely expect that add chapter -1 jumps to the start, instead of A.

Actually i expected mpv to jump to the start of the current chapter, not to the previous. This "smart" behaviour is sometimes annoying.

Nikoli avatar Aug 07 '13 05:08 Nikoli

If it is a matter of seconds then you can just do simple seeking instead of chapter jumping.

LabMem765 avatar Aug 07 '13 06:08 LabMem765

I probably was misunderstood quite a bit by what I meant with this issue. Possibly an animated gif illustration would work better?

How seeking works currently (gimp-fu): current

How I propose it to work (gimp-fu): new

So in case there's no chapters close to your current location the seeking would work like it works now, however when seeking near the chapter it would first stop at the chapter and then seeking further would seek as expected.

Why it is an improvement (even if somewhat confusing one)?

Chapters have a meaning and are almost always put at the locations of interest. Now seeking is (at least in my case) almost always done to skip to those locations of interest which is why I propose this (possibly) improvement. What's more the improvement is not really intrusive as one more click of arrow would seek as it always did.

nagisa avatar Aug 07 '13 06:08 nagisa

Imo you try to modify a function (seeking) to also deal with another aspect of video-navigation (chapters) by "snapping" seeks to chapter-borders.

Now seeking is (at least in my case) almost always done to skip to those locations of interest

That's not true. If you want to seek to chapters use add chapter x, if you want a regular seek use seek x. There's no need to merge some of their behaviour. If I press the key for seek 60 right before a new chapter, I simply don't want (nor would expect it) to stop at the next chapter.

Argon- avatar Aug 07 '13 12:08 Argon-

But there's something else always bothering me. Imagine you have a file like Start|---A---x---B---|End with A and B being chapters and x your current position. Using add chapter -1 takes you to the start of the file while I'd expect A as new position. Is it just me aka worth opening an issue?

Imagine x is after A, but very close to it (like, some seconds or less). Then you would definitely expect that add chapter -1 jumps to the start, instead of A. This is probably why it behaves this way. You can make a new issue with suggested new behavior if you think this is not ideal.

I think that the expected behavior would be to go back to the previous chapter only if you're within a few seconds of the chapter mark. This is how a lot of other media players do it, and it makes sense to me.

So, in this situation: Start|---A---x---B---|End a backward chapter skip would seek to A.

But in this one: Start|---Ax------B---|End it would go back to the start.

There could be an option, such as --chapter-seek-threshold, defaulting to 5 seconds or so, and it could be set to 0 for the behavior @Argon- described even when right after a chapter or -1 for the current behavior.

I want this functionality anyway and it seems like it'd be fairly easy to implement, so I think I'll go ahead and do it and send over a pull request if you want it.

qmega avatar Aug 12 '13 21:08 qmega

Personally I don't really see the appeal, and it would be somewhat complicated to implement. But I'm not outright rejecting it; it just needs someone to implement it. So, if someone wants to implement the original feature request, that would be wecome. Closing for now.

ghost avatar Nov 22 '13 11:11 ghost