Commit Graph

53 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
RaXorX 3ad7502fe2
Providing Auth configuration via subselect.conf (#37)
I have no way to test, but works I hope
2024-01-19 21:07:15 +01:00
zenyd 19ea069abc subselect: use robust path for loading subselect.py 2022-04-22 13:03:58 +02:00
zenyd 885b9bd056 delete-file: option to move instead of delete 2022-04-22 00:08:36 +02:00
zenyd d5ea82a604 subselect: move into subfolder 2022-04-22 00:06:28 +02:00
Sharad79zero f6a2019d5e
Update README.md (#33)
no credits needed. just wanted to make installation clear to newbies as i had lot of problem installing censor script ,according to me which is most important. thanks to zenyd
2022-04-19 16:53:11 +02:00
RaXorX 893978f57e
Provider Auth Configuration (#36)
- {'provider': {'username': 'user', 'password': 'pass'}}
- Here you can pass on auth config to various providers like opensubtitles and others.
ex.
{'opensubtitles': {'username': 'user', 'password': 'pass'}}
- Multiple providers can be passed as such, each separated by a comma [.]
{'provider1': {'username': 'user', 'password': 'pass'}, 'provider2': {'username': 'user', 'password': 'pass'}, 'provider3': {'username': 'user', 'password': 'pass'}}
2022-04-19 16:52:51 +02:00
zenyd 85f9964f30 add script censor 2021-03-13 16:18:52 +01:00
zenyd 54a74c4441 add script copy-paste-URL 2021-03-09 01:57:39 +01:00
bitingsock efa300fb6b
key bind for list of delete marks (#27)
* key bind for list of delete marks

https://github.com/zenyd/mpv-scripts/issues/14

* make show list a toggle so we don't spam the terminal

* put showListTimer:resume() in condition

* undelete all and globalize timer

if timer is local showList() can't reference it

* add new keybinds

* add space to help wrapping

* better matching
2021-03-07 12:31:37 +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
zenyd 4c237b17cf subselect.lua: * use mp.command_native instead of deprecated utils.subprocess
* send filename to python script instead of media-title
* status returned from subprocess can be negative even if command succeeds -> check error_string instead

subselect.py: use all the available subtitle providers for search
2020-04-26 21:31:40 +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
Svetlin Ankov 9eefa4ee4a delete_file: fix for files not deleted on end of playlist
Currently, the selected files are deleted only when mpv is
exited via the quit command. If, however, the quit reason is
eof of the last file in the playlist, delete_file would not
delete any files.

To fix this use the correct event, i.e. shutdown, instead of
end-file.

See:

https://github.com/mpv-player/mpv/blob/master/DOCS/man/lua.rst#list-of-events
2018-05-31 13:55:19 +02: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
zenyd 3881ac9324 intentation... 2017-10-19 21:37:52 +02:00
zenyd 5cccb90061 add script delete_file.lua 2017-10-19 21:34:54 +02:00
bitingsock 2d0388fc90 skip mode 2017-10-18 19:15:40 +02: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 9cee9e21ad Set download directory on every script invokation
This is necessary when no download directory is set, which is the
default. Fixes issue introduced in commit 45783639.
2017-10-02 21:42:11 +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 f480c14de9 Write subtitle names as utf-8 byte stream to stdout
non ascii characters seem to conflict with lua/mpv when writing the
filename to stdout, which leads to failure in loading the subtitle. This
fixes that.
2017-09-30 01:54:46 +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 ee31ae58b6 Focus on the input box upon start 2017-09-24 16:34:55 +02:00
zenyd 97d5a122a2 bind return key to search 2017-09-24 16:30:31 +02:00
zenyd 4f271f1892 Fix search for empty Input 2017-09-24 16:27:44 +02:00
zenyd 457836399c Decouple initialization from script invokation 2017-09-24 15:42:57 +02:00
zenyd 80d23f99cd fix tab width (sigh) and update readme 2017-09-24 04:56:35 +02:00
zenyd 348749e6ce Add subselect script 2017-09-24 03:15:02 +02:00
zenyd 025a419e63 Update Readme 2017-09-15 15:20:34 +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