Eisa01 / mpv-scripts

This repository contain scripts I have made for mpv media player...
BSD 2-Clause "Simplified" License
505 stars 35 forks source link

Skip Intros/Endings using self-created chapter markers? (SmartSkip) #141

Open AziRizvi opened 3 months ago

AziRizvi commented 3 months ago

Using SmartSkip we can create our own chapter markers and write them to external file, this is very useful because I often create chapter-markers for intros/endings for files in my archive and then just use the keybind for chapter-skipping to skip the intros on my rewatch sessions, my question is, is it possible to make SmartSkip do this automatically by default like how it auto-skips openings and endings for files with embedded/internal chapter markers? (I'm assuming the logic SmartSkip uses for triggering the Autoskip is seeing/reading the chapter name?)

Would it or is it possible to name the chapters we create so that it can trigger the auto-skipping action on the next rewatch?

Eisa01 commented 3 months ago

It is already possible, you can also set a placeholder name to start with. However, renaming the chapter requires user-input-module ) to be active.

Check these settings that might be helpful:

#--(yes/no). (yes: Adding chapter asks for title) (no: Adds chapter without name)
add_chapter_ask_title=no

#--(yes/no). Pauses the playback when asking for chapter title
add_chapter_pause_for_input=no

#--(text). Placeholder when asking for title of a new chapter
add_chapter_placeholder_title=Chapter 

Also, an alternative option is to mark them for Auto-Skip without naming them, by using indexes.

Play around with:

categories=[ ["internal-chapters", "prologue>Prologue/^Intro; opening>^OP/ OP$/^Opening; ending>^ED/ ED$/^Ending; preview>Preview$"], ["external-chapters", "idx->0/2"] ]

and

skip=[ ["internal-chapters", "toggle;toggle_idx;opening;ending;preview"], ["external-chapters", "toggle;toggle_idx"] ] 

Future Idea Although, this gave me an idea, the "placeholder name" config to to be usable without user-input script. Basically it will create the name given and increment the more it is triggered. Makes it easy instead of indexes. e.g.: AutoSkip-1, AutoSkip-2.

AziRizvi commented 3 months ago

It is already possible, you can also set a placeholder name to start with. However, renaming the chapter requires user-input-module ) to be active.

Check these settings that might be helpful:

#--(yes/no). (yes: Adding chapter asks for title) (no: Adds chapter without name)
add_chapter_ask_title=no

#--(yes/no). Pauses the playback when asking for chapter title
add_chapter_pause_for_input=no

#--(text). Placeholder when asking for title of a new chapter
add_chapter_placeholder_title=Chapter 

Also, an alternative option is to mark them for Auto-Skip without naming them, by using indexes.

Play around with:

categories=[ ["internal-chapters", "prologue>Prologue/^Intro; opening>^OP/ OP$/^Opening; ending>^ED/ ED$/^Ending; preview>Preview$"], ["external-chapters", "idx->0/2"] ]

and

skip=[ ["internal-chapters", "toggle;toggle_idx;opening;ending;preview"], ["external-chapters", "toggle;toggle_idx"] ] 

Future Idea Although, this gave me an idea, the "placeholder name" config to to be usable without user-input script. Basically it will create the name given and increment the more it is triggered. Makes it easy instead of indexes. e.g.: AutoSkip-1, AutoSkip-2.

Thanks for the quick response, I think I will wait for the update because doing this using indexes sounds a little bit complicated. Feel free to close this ticket if you want to or rename it with your idea for the update.

Thanks again!

uugaabuugaa commented 3 months ago

Also, an alternative option is to mark them for Auto-Skip without naming them, by using indexes.

Play around with:

categories=[ ["internal-chapters", "prologue>Prologue/^Intro; opening>^OP/ OP$/^Opening; ending>^ED/ ED$/^Ending; preview>Preview$"], ["external-chapters", "idx->0/2"] ]

and

skip=[ ["internal-chapters", "toggle;toggle_idx;opening;ending;preview"], ["external-chapters", "toggle;toggle_idx"] ] 

I'm trying to add "Credits Start" chapter to the skipping list. But for some reason it just isn't working for me. Can you help me with what my syntax needs to be to activate it?

Edit: nvm. I forgot to add it to the second line as well. It seems to be working now.