esterkimx / mpvsync

simple playback synchronization plugin for mpv
GNU General Public License v2.0
2 stars 0 forks source link

doesn't find neccesary script #1

Open egrain opened 4 months ago

egrain commented 4 months ago

this could have been my first git pull or push or what not, but i'm not that invested, so please do this your own self: add

package.path = package.path .. ';/home/{youruser}/.config/mpv/scripts/mpvsync_modules/?.lua'

to mpvsync.lua. make sure to not use $HOME, but fully extend the path.

apparently they have changed stuff so that you now have to give the path to all the required scripts like that.

i have more though: now i get: Cannot find main.* for any supported scripting backend in: /home/calli/.config/mpv/scripts/mpvsync_modules [mpvsync] [mpvsync] stack traceback: [mpvsync] [C]: in function 'require' [mpvsync] ...calli/.config/mpv/scripts/mpvsync_modules/server.lua:20: in main chunk [mpvsync] [C]: in function 'require' [mpvsync] /home/thomas/.config/mpv/scripts/mpvsync.lua:22: in main chunk

[mpvsync] Lua error: ...calli/.config/mpv/scripts/mpvsync_modules/server.lua:20: module 'posix' not found: [mpvsync] no field package.preload['posix'] [mpvsync] no file '/usr/local/share/lua/5.1/posix.lua' [mpvsync] no file '/usr/local/share/lua/5.1/posix/init.lua' [mpvsync] no file '/usr/local/lib/lua/5.1/posix.lua' [mpvsync] no file '/usr/local/lib/lua/5.1/posix/init.lua' [mpvsync] no file '/home/calli/.config/mpv/scripts/mpvsync_modules/posix.lua' [mpvsync] no file '/usr/local/lib/lua/5.1/posix.so' [mpvsync] no file '/usr/local/lib/lua/5.1/loadall.so'

i have lua52posix installed, and the files are there at /usr/local/lib/lua/5.2/{posix.a,posix.so}.

do i have to compile mpv against lua 5.2 or is this just another quick fix with a line in the script?

thanks.

esterkimx commented 4 months ago

Thank you for the update!

I've pushed a revised version. Could you please verify if this resolves the issue for you? I've also updated the installation instructions; please take a look.

This script is quite old and very basic, and I need to find an easier way to install dependencies. I managed to get it working on MacOS with Lua 5.1 with two local mpv instances:

$ mpv file.mp4 1>/dev/null 2>/dev/null &
$ mpv --script-opts=mpvsync-host=localhost file.mp4

After this, you should be able to control the playback using the 'host' instance.

egrain commented 4 months ago

all the scripts still need the package.path = package.path .. ';/home/{youruser}/.config/mpv/scripts/mpvsync_modules/?.lua' and the "mpvsync_modules/... " in front of the script names should be taken out.

the mpvsync.conf doesn't matter it seems. i set the port to something else and it still went with 32.. something.

i'm trying linuxmint client to openbsd server. the connection is coming through, but it doesn't actually connect to the server.

i'm gonna try it in my local network tomorrow, if i get around to it.

esterkimx commented 4 months ago

package.path = package.path .. ';/home/{youruser}/.config/mpv/scripts/mpvsync_modules/?.lua'

The script organization has been updated; now each plugin resides in its own directory within mpv/scripts/<plugin_name>, and should have main.lua (if I got it right). Please try the updated installation steps detailed here: https://github.com/esterkimx/mpvsync?tab=readme-ov-file#installation