Commit Graph

28 Commits

Author SHA1 Message Date
zenyd 9bdce00501 update speed-transition
* use sub-end instead of sub-text. Disadvantage is that ignoring subtitles is broken right now. Advantage: image based subtitles are working.
For dvd subtitles (that's what I tested) it can happen that some subtitle lines, get 'eaten'. They don't show even though they should.
* implement sub-timeout: when subtitles are displayed without change for some time (5s) -> speedup. (Useful for autogenerated subtitles)
* improvements to skip mode:
    - better behaviour if next subtitle is not in cache
    - option for non-exact skips. This also implements seek-back since a skip is not guaranteed to end at the next line. It might skip over it.
* users can now supply a script configuration file (speed_transition.conf)
* remove key binding for sub visibility. Pressing v seems to handle this nicely.
* change key binding for skip mode to alt + j
* added bunch of debugging code to better debug issues
2024-02-12 03:28:35 +01:00
bitingsock 7100d19d18
Update speed-transition.lua (#52)
only activate on "text based" subtitles
2024-01-26 16:37:18 +01:00
bitingsock 019fb5346c
Document user options and add some new features (#26)
* Document user options and add some new features

I realized I've been adding to and adjusting this script for a while now and almost lost it in a reformat. I also included some requested feature's from the issue tracker. I'll comment inline to clarify some changes.

* Update speed-transition.lua

* Update README.md

* Update speed-transition.lua

* Update speed-transition.lua
2021-02-28 23:03:07 +01:00
0xACE 34b3ccefa1 fix set_property aid cannot be set to nil
If you attempt to set_property("aid", nil) the script will throw an error.
2020-04-26 21:42:19 +02:00
bitingsock 68733c81f3 more subtitle hiding
adds feature from https://github.com/zenyd/mpv-scripts/issues/10
2019-03-05 20:49:06 +01:00
bitingsock c7f88e0ec2 drop audio on desync
If avdesync > leadin then we resume too late after the subtitle should have been shown. When mpv plays with no audio, subtitles are timed to video instead of audio. This change removes audio in this case to ensure we resume on time.
2019-03-05 20:48:08 +01:00
zenyd 4c023ed7ea add directskip mode and make skip value calculation more robust 2017-11-05 21:29:18 +01:00
zenyd afdb6f8669 temporarily disable skipmode when seeking back 2017-11-05 21:23:31 +01:00
bitingsock d18f33904b skip mode 2017-10-18 19:15:40 +02:00
zenyd a9b5c4eee6 limit the range of leadin 2017-10-17 20:50:15 +02:00
zenyd ca9399a200 Do not speed transition when seeking in speedup zones
When seeking in a speedup zone the code would transition from state
1 to 0 and again to 1 restoring normal speed and speeding up again. This is not really visible but it introduced a slight delay when seeking.

This change prevents the speed transition when seeking within the same
zone and when seeking to different zones by storing the begin and end of
such a zone.

Fixes commits d8738984 and 759bd191, which were reverted.
2017-10-02 16:35:51 +02:00
zenyd 60d5e6f681 Accept non empty sub-text like we did previously 2017-10-01 00:03:12 +02:00
zenyd 7556942813 Revert "restore normal speed when no subtitles is selected"
This reverts commit d873898409.
2017-10-01 00:00:33 +02:00
zenyd 781a42b664 Revert "Fix Reset early when seeking to a different speedup zone in the past"
This reverts commit 759bd191c0.
2017-10-01 00:00:19 +02:00
zenyd 759bd191c0 Fix Reset early when seeking to a different speedup zone in the past
When seeking from one speedup zone to a different speedup zone, which
lies in the past, the code would not reset early. So check for this case
and update the corresponding variables.
2017-09-30 20:25:32 +02:00
zenyd d873898409 restore normal speed when no subtitles is selected 2017-09-30 18:14:00 +02:00
zenyd 9c82eea4b3 Fix further regression in check_position
this has slipped by as the timers where purged from the code
2017-09-29 02:38:21 +02:00
zenyd 586734094e Fix previous commit 2c75a7ba1e 2017-09-28 20:10:01 +02:00
zenyd 2c75a7ba1e Complete the previous functionality of add_timers in check_position 2017-09-28 04:00:32 +02:00
bitingsock 6d62d857b2 all changes from https://github.com/zenyd/mpv-scripts/pull/3 2017-09-28 03:52:02 +02:00
zenyd 5793184c2d Minimize frame drops on resuming normal speed
Introduces slight a-v desynchronisation in speedup state, which is not
really noticeable. On resuming normalspeed a-v gets synchronized once
again.
2017-09-26 15:36:50 +02:00
zenyd bd746aa3dd forgot this 2017-09-24 21:44:52 +02:00
bitingsock 883859f91c attempts to add my optional leadin (#2)
* attempts to add my optional leadin

speed will return to normal an optional number of seconds before the subs appear. Has worked for me so far, would you mind testing?

* Update speed-transition.lua

* Update speed-transition.lua
2017-09-24 21:40:41 +02:00
zenyd 8ffbca487b Add ability to hide subtitles 2017-09-15 14:50:32 +02:00
zenyd fd6c5056c1 Add ability to dynamically change speedup 2017-09-15 14:45:55 +02:00
zenyd d11b8af6bf Refactor 2017-09-15 14:42:47 +02:00
zenyd f428b3f6b3 Properly handle delayed subtitles
Delayed subtitles where working properly for negative values. Positive delay values wheren't handled correctly.
2017-09-14 20:27:40 +02:00
zenyd 087b031e75 push script 2017-09-06 00:26:27 +02:00