Feature: Ability to select the display being rendered to
si-hb opened this issue · 4 comments
I’m looking to remotely control at least two instances of mpv, with the ability to select which display output each instance renders to.
Is this currently possible?
Multiple MPV instances supported by this API. If you're on default config your first server will be accessible on port 8000 and your second instance available on 8001 (Of course if it's free, the API finds a free port on the provided range)
If you want to move MPV instances between your displays (Monitor), it's not supported by this REST.API yet. I don't know if it's even possible with MPV IPC, it seems System API related thing to me. Maybe these options can help you
I'll do some investigation on the weekend and add this as feature if implementable. If you have any progress let me know!
Excellent thank you
I see the following options that look promising:
--screen=<default|0-32>
In multi-monitor configurations (i.e. a single desktop that spans across multiple displays), this option tells mpv which screen to display the video on.
--fs-screen=<all|current|0-32>
In multi-monitor configurations (i.e. a single desktop that spans across multiple displays), this option tells mpv which screen to go fullscreen to. If current is used mpv will fallback on what the user provided with the screen option.
Sorry for the late response. I don't have good news, setting the screen or geometry even by using MPV command line seems not to work. For example if you run MPV with these flags nothing happens :
mpv --idle --force-window --screen=x
# or setting geometry manually.
mpv --idle --force-window --geometry=x:y
I've tested these commands on Fedora 37 VM which uses Gnome and Wayland as compositor and on my host machine which using Pop OS with I3 on X11.
Maybe you could get this working on MAC or Windows. If you try these commands on your machine and it's working for you I'll add it to the mpv-remote-node project.
this works for me in windows 10/11
main screen
mpv --no-osc --loop-playlist=inf --no-keepaspect --no-border --ontop --image-display-duration=5 --idle=yes --fullscreen --screen=0 --title=player1 --audio-device=wasapi/{53669d3f-8de4-41bf-a2e5-c541aa3bceca}
extended screen
mpv --no-osc --loop-playlist=inf --no-keepaspect --no-border --ontop --image-display-duration=5 --idle=yes --geometry=1920x1080 --screen=1 --title=player2 --audio-device=wasapi/{43822032-bd4b-4e9b-8ba4-c3cc1aac4757}