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

Use in MPV #1

Open
hvmzx opened this issue Mar 20, 2023 · 8 comments
Open

Use in MPV #1

hvmzx opened this issue Mar 20, 2023 · 8 comments

Comments

@hvmzx
Copy link

hvmzx commented Mar 20, 2023

Hello, is it possible to use these shaders in MPV instead of the glsl ones ? I am having performance issues on MPV on Apple Silicon because it simply uses OpenGL and isn't optimised at all for it.

@imxieyi
Copy link
Owner

imxieyi commented Mar 20, 2023

Did you test this version and verified it's actually faster than OpenGL version?

I doubt if MPV supports any metal shaders. But in any case this is out of scope of this project. I suggest that you create a feature request in MPV.

@hvmzx
Copy link
Author

hvmzx commented Mar 20, 2023

Yes I understand that isn't what the project is for, just wondering if it was ever done. Nice work !

@Tama47
Copy link

Tama47 commented Mar 21, 2023

I am having performance issues on MPV on Apple Silicon

Which version of Apple Silicon are you using: M1, M2, Pro, Max, or Ultra? Are you running the native mpv build or the Intel version? Additionally, are you using shaders optimized for higher or lower-end GPUs? I personally found that the standard M1 and M2 versions hit their limit, so I stuck with the lower-end GPU, which has been working great for me.

@hvmzx
Copy link
Author

hvmzx commented Mar 23, 2023

I am having performance issues on MPV on Apple Silicon

Which version of Apple Silicon are you using: M1, M2, Pro, Max, or Ultra? Are you running the native mpv build or the Intel version? Additionally, are you using shaders optimized for higher or lower-end GPUs? I personally found that the standard M1 and M2 versions hit their limit, so I stuck with the lower-end GPU, which has been working great for me.

Using a M2 Pro right now, going with the low end cpu shaders worked so I'm sticking with that

@Tama47
Copy link

Tama47 commented Mar 23, 2023

I did not have an M2 Pro chip to test with when I was writing the instructions for Mac, but I assume it also had performance issue with the higher-end GPUs? I will go back to review and update the instructions. Based on my experience with the normal M2 chip, I could only use the Medium shaders. If you have an M2 Pro, you might be able to try using the Large (L) shaders instead. So it's possible that they could work on an M2 Pro as the shader optimized for higher-end GPUs starts with the Very Large (VL) shaders.

@hvmzx
Copy link
Author

hvmzx commented Mar 26, 2023

I did not have an M2 Pro chip to test with when I was writing the instructions for Mac, but I assume it also had performance issue with the higher-end GPUs? I will go back to review and update the instructions. Based on my experience with the normal M2 chip, I could only use the Medium shaders. If you have an M2 Pro, you might be able to try using the Large (L) shaders instead. So it's possible that they could work on an M2 Pro as the shader optimized for higher-end GPUs starts with the Very Large (VL) shaders.

I will try the Large ones then, VL didn't work. Also, i haven't tried the metal shaders, just the basic anime4k ones.

Did you observe a difference of performance between metal and non metal ?

@Tama47
Copy link

Tama47 commented Mar 26, 2023

I will try the Large ones then, VL didn't work. Also, i haven't tried the metal shaders, just the basic anime4k ones.

Give it a try! Apparently, the author of this project, Anime4KMetal, was able to get VL metal shaders working on their M1 Ultra.

Did you observe a difference of performance between metal and non metal ?

My results varied slightly, you can take a look here, if you’re interested.

@imxieyi
Copy link
Owner

imxieyi commented Mar 26, 2023

I have added support for chaining multiple shaders as well as all presets as defined in official Anime4K instructions. Feel free to check out this repo or download pre-built binaries from v0.0.2 release. Screenshots can be found in README.md.

From my testing all presets (Fast, HQ) work well on my 48-core M1 Ultra without dropping frames. The results from presets are way better than using individual shaders. Note that no preset is using shaders larger than VL size.

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

3 participants