diff --git a/.gitmodules b/.gitmodules index 8f26755..af0f685 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,9 @@ [submodule "ytdl-preload"] path = ytdl-preload url = git@gist.github.com:17d90e3deeb35b5f75e55adb19098f58.git +[submodule "autosubsync-mpv"] + path = autosubsync-mpv + url = git@github.com:Ajatt-Tools/autosubsync-mpv.git +[submodule "scripts/autosubsync-mpv"] + path = scripts/autosubsync-mpv + url = git@github.com:Ajatt-Tools/autosubsync-mpv.git diff --git a/input.conf b/input.conf index 6e28dbf..19cd692 100644 --- a/input.conf +++ b/input.conf @@ -199,3 +199,4 @@ CTRL+0 no-osd change-list glsl-shaders clr ""; show-text "GLSL shaders cleared" ctrl+K cycle-values keep-open "yes" "no" ctrl+r script-binding reload-scripts +ctrl+s script_binding autosubsync-menu diff --git a/script-opts/autosubsync.conf b/script-opts/autosubsync.conf new file mode 100644 index 0000000..c91d170 --- /dev/null +++ b/script-opts/autosubsync.conf @@ -0,0 +1,33 @@ +# Absolute paths to the executables, if needed: + +# 1. ffmpeg +ffmpeg_path=/usr/bin/ffmpeg + +# 2. ffsubsync +ffsubsync_path=/usr/bin/ffsubsync + +# 3. alass +alass_path=/usr/bin/alass + +# Preferred retiming tool. Allowed options: 'ffsubsync', 'alass', 'ask'. +# If set to 'ask', the add-on will ask to choose the tool every time: + +# 1. Preferred tool for syncing to audio. +# audio_subsync_tool=ask +audio_subsync_tool=ffsubsync +# audio_subsync_tool=alass + +# 2. Preferred tool for syncing to another subtitle. +# altsub_subsync_tool=ask +altsub_subsync_tool=ffsubsync +# altsub_subsync_tool=alass + +# Unload old subs (yes,no) +# After retiming, tell mpv to forget the original subtitle track. +# unload_old_sub=yes +unload_old_sub=no + +# Overwrite the original subtitle file. +# Replace the old subtitle file with the retimed file. +# overwrite_old_sub=yes +overwrite_old_sub=no diff --git a/scripts/autosubsync-mpv b/scripts/autosubsync-mpv new file mode 160000 index 0000000..125ac13 --- /dev/null +++ b/scripts/autosubsync-mpv @@ -0,0 +1 @@ +Subproject commit 125ac13d1b84b3a64bb2e912225a8356c1c01364