GhostNaN / mpvpaper

A video wallpaper program for wlroots based wayland compositors.
GNU General Public License v3.0
805 stars 26 forks source link

Feature request: rendering on all outputs at the same time #22

Closed mstoeckl closed 2 years ago

mstoeckl commented 2 years ago

In the proposed feature, a command like

mpvpaper '*' video.mkv

would display the same video on all outputs at once; when a new output is added while the program is running, the wallpaper would extend to display the video there as well.

(There are no doubt ways to approximate this behavior using ffmpeg and a control script which adds new instances of mpvpaper when a new output appears, but having this feature in mpvpaper itself would be very convenient and likely be much more efficient.)

GhostNaN commented 2 years ago

I've attempted this a while ago already.

The bad news, I couldn't figure out a way of displaying the same rendered video on all displays. Let alone displays of varying resolution. So the good news it can be technically done, if you don't care about more performance lost. And it's frankly no better then just running multiple instances of mpvpaper.

I would just have to refactor a bit of code as mpvpaper was made with only 1 display in mind. I'll have to think about it in the meantime.

GhostNaN commented 2 years ago

After playing around with the idea for a bit, I decided not to go forward with this request, sorry.

One huge problem I have now that I didn't back then is the -s, --auto-stop feature/arg I added. mpvpaper "stops" by killing the process and running another program (mpvpaper-holder) It was the only way I could claw back all the RAM from mpvpaper. So if all displays are running on the same process and if only 1 monitor is "hidden" . All the videos on the other monitors would go down. And I would like the behavior to remain consistent if possible.

It also seems like refactoring the code is going to be more pain than it's worth.

Plus, like I said, it would be no more efficient then just running multiple instances of mpvpaper.

So with that in mind, I would only consider this if there is a way to display the same rendered video on all displays. libmpv was very picky in the way it wanted to render to a GL Context that couldn't be shared.

This is probably the only feature I think mpvpaper is missing as well, but I'm tabling it for now. Thanks for the suggestion and reminder.

mstoeckl commented 2 years ago

This is probably the only feature I think mpvpaper is missing as well, but I'm tabling it for now.

No problem; I'll try to implement this myself when I have time, and will let you know if I ever succeed. Thank you for letting me know about the --auto-stop issue.