Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window position and size for mpv video player #2468

Open
karlkliem opened this issue Sep 19, 2024 · 2 comments
Open

Window position and size for mpv video player #2468

karlkliem opened this issue Sep 19, 2024 · 2 comments

Comments

@karlkliem
Copy link

On a Raspberry Pi 4 with the latest Raspberry Pi OS (Debian Bookworm) with Wayland, what do I have to write into ~/.config/wayfire.ini to be able to play back a video on HDMI-A-1 and a second video on HDMI-A-2? Which options can I use in the CLI with MPV to make this happen? Seems like the usual way to do it in mpv doesn't work, for example "mpv --geometry=640x480+50+50 video.mp4".

@soreau
Copy link
Member

soreau commented Sep 19, 2024

The client can only set it's size, not position. First, you will want to set a unique application identifier for each mpv instance by passing --wayland-app-id="unique-id". Then, using this app-id, set up some window rules. Enable window rules plugin and in wayfire.ini, use something like:

[window-rules]
rule1 = on created if app_id is "unique-id-1" then start_on_output "HDMI-A-1"
rule2 = on created if app_id is "unique-id-2" then start_on_output "HDMI-A-2"

However, this requires a more recent version of wayfire than what is in bookworm by default. You would need this commit at least. You might consider upgrading to 0.9 or master, using wf-install script.

With wayfire in bookworm, you should be able to at least use oswitch plugin to move a view to another output with a keybinding.

@karlkliem
Copy link
Author

karlkliem commented Sep 20, 2024

Thanks a lot. I didn't get it to work right away. For now I switched back to X11. It works much easier for me with the mpv player choosing the output screen with mpv --fs --screen=1 video.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants