How can I install and use mpv-autosubsync-git?

This is what I’ve tried since the PKGBUILD is incorrect

cd ~/.cache/yay/
git clone
cd mpv-autosubsync-git
sudo pacman -U *.tar.xz
cp autosubsync.conf ~/.config/mpv/script-opts
sudo mkdir -p /usr/share/mpv/scripts/autosubsync
sudo cp src/mpv-autosubsync/*.lua /usr/share/mpv/scripts/autosubsync
sudo chmod +x /usr/share/mpv/scripts/autosubsync/*.lua

Then mpv needs to be started as:

mpv --scripts=/usr/share/mpv/scripts/ 'filepath'

I get the error
Cannot find main.* for any supported scripting backend in: /usr/share/mpv/scripts/

And when I press `n` it says

[input] No key binding found for key ‘n’.

How do I install it correctly? Also is there any configuration setting I can write in the `mpv.conf` file so that I don't have to manually write `mpv --scripts=/usr/share/mpv/scripts/` every time I want to use the script?

Have you read the comments on the AUR page?

Yes I have. But it doesn’t really solve the issue, it only installs a different file. The PKGBUILD only installs the file autosubsync.lua when it should install all this files

Make sure autosubsync-mpv is installed properly. This is the expected content of your ~/.config/mpv/ directory:

|-- script-opts
|   `-- autosubsync.conf
` -- scripts
    ` -- autosubsync
        |-- autosubsync.lua
        |-- main.lua
        ` -- menu.lua

Well, I filed an orphan request for the package seeing how the maintainer is AWOL. If it’s accepted, you or someone else can adopt the package and fix it.

I fixed it by installing it directly as it says in the README

git clone ~/.config/mpv/scripts/autosubsync

And I added this to ~/.config/mpv/script-opts/autosubsync.conf

# This user script also supports ffsubsync as a backend,
# but we will not install it automatically.
# If you need ffsubsync, you can install it via pip:
#     pip install ffsubsync
# Or through aur (python-ffsubsync).

# Absolute paths to the executables, if needed:
# 1. ffmpeg
# 2. alass
# 3. ffsubsync (Optional)
# Install via pip (ffsubsync) or aur (python-ffsubsync)

# 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.
# 2. Preferred tool for syncing to another subtitle.

# Unload old subs (yes,no)
# After retiming, tell mpv to forget the original subtitle track.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.