Topic: [Tutorial] Use SVP with multiple MPV windows

(Note: this tutorial has only been tested on linux)

TLDR:
1) Copy this script to ~/.config/mpv/scripts/multiplesockets.lua

local utils = require 'mp.utils'

dir = "/tmp/mpvsockets"
os.execute("mkdir " .. dir)

id = 1
handle = io.popen("ls " .. dir)
while id == handle:read("*n") do
    id = id + 1
end
handle:close()
socket = dir .. "/" .. id

mp.set_property("options/input-ipc-server", socket)

function on_shutdown()
        os.remove(socket)
end
mp.register_event("shutdown", on_shutdown)

2) In svp settings, set the property main->setup->mpv to /tmp/mpvsockets/1;/tmp/mpvsockets/2;/tmp/mpvsockets/3

PS: Could we add this tutorial to the svp wiki ?

Re: [Tutorial] Use SVP with multiple MPV windows

just take this - https://github.com/wis/mpvSockets - and that's it

Re: [Tutorial] Use SVP with multiple MPV windows

Chainik wrote:

just take this - https://github.com/wis/mpvSockets - and that's it

does not work because svp does not know the names of the pipes

Re: [Tutorial] Use SVP with multiple MPV windows

it works since "4.3.0.191 – 2020-04-11" because SVP enumerates all mpv processes and tries /tmp/mpvSockets/<pid>

Re: [Tutorial] Use SVP with multiple MPV windows

I'm on 4.3.191-1 (arch linux package) and it does not work. Do I need a special value in the main->setup->mpv property ?

Re: [Tutorial] Use SVP with multiple MPV windows

I'd suggest updating to the latest version first...