Closed Behinder closed 4 years ago
MacOS dropped development/support of recent OpenGL versions a while ago, check this article to see that OpenGL version 4.5 is missing which is required for recent CasparCG Server. I doubt a native Metal based version of CasparCG Server for MacOS or other Vulkan/MoltenVK/Anvil OpenGL wrapper based effort will see the daylight.
I guess running a VM with Windows/Linux with dedicated GPU might be your only option, but current Nvidia support since MacOS Mojave is also lacking, and I doubt if Intel GPU's can be seperated for vm gpu passthrough. AMD has options for Mac, even official externaly supported by Apple, but performance of AMD using CasparCG on linux is limited on Linux.
So it's worth trying to rewrite OpenGL component to Metal...lot of work tough
CasparCG is open-source so anyone can add Metal support, but in my opinion this is a dead-end because this API is tied to one (Apple) ecosystem. Maybe Vulkan is better way to go - it can also be used on Apple through MoltenVK.
For now it should be easy to recompile CasparCG for OpenGL 4.1 - I am succesfully running CasparCG (for test purposes) on OpenGL 4.2 Linux laptop. But Apple will probably drop OpenGL support anytime soon.
Well for me it's not quite dead end because it's better to have serwer running macos than Windows :) But even if Apple drop support it should be possible to compile OpenGL 4.5 from scratch on MacOS or are there some fundamental obstacles on system-level?
On Fri, Dec 20, 2019 at 7:06 PM krzyc notifications@github.com wrote:
CasparCG is open-source so anyone can add Metal support, but in my opinion this is a dead-end because this API is tied to one (Apple) ecosystem. Maybe Vulkan is better way to go - it can also be used on Apple through MoltenVK.
For now it should be easy to recompile CasparCG for OpenGL 4.1 - I am succesfully running CasparCG (for test purposes) on OpenGL 4.2 Linux laptop. But Apple will probably drop OpenGL support anytime soon.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CasparCG/server/issues/1246?email_source=notifications&email_token=AAEQPFTFOOG3NCFQIYJSL53QZUCRFA5CNFSM4JZCETN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHNVQ2Q#issuecomment-568023146, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEQPFVHAIVL5CXY6VQRGJLQZUCRFANCNFSM4JZCETNQ .
@Behinder you will need opengl support from the os, gpu and gpu driver. So it wont be possible to resurrect.
It basically comes down to SVT and other core contributors have no desire to run it on macos, so it will only be done if either someone in the community does it or is willing to fund development. But even if it is done, there will be a cost to the project to maintain and test the macos version (it is very easy to stop it compiling for another platform when making a change), so it will need a reasonable level of demand from the community to make it worth supporting.
... it's better to have serwer running macos than Windows :)
It's even more betterer to have serwer [sic] running Linux and CasparCG runs on Linux. Just my 2 cents.
So maybe just maybe one day I will start to do Metal version just for myself :) I woulnd't object to Linux but even if CasparCG renders stuff there is no support for NDI and not sure what is with OBS.
On Sat, Dec 21, 2019 at 3:21 PM Super-intelligent Shade of the Color Blue < notifications@github.com> wrote:
... it's better to have serwer running macos than Windows :)
It's even more betterer to have serwer [sic] running Linux and CasparCG runs on Linux. Just my 2 cents.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CasparCG/server/issues/1246?email_source=notifications&email_token=AAEQPFQH2X77MVAPX2PVY43QZYQ6NA5CNFSM4JZCETN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHO45GQ#issuecomment-568184474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEQPFRQ3CT5VKMSEE3PAZLQZYQ6NANCNFSM4JZCETNQ .
This has started to look more like a discussion for https://casparcgforum.org/ rather than GH Issues.
FYI: NDI and OBS both support Linux.
For future readers: For a multitude of reasons it is highly unlikely that CCG will ever support MacOS. Such support isn't on the roadmap for CCG.
@Behinder the legacy ivga stuff doesnt work on linux, but the new ndi implementation in 2.3 does work
Hi @Behinder,
thanks for your request. We have decided to focus on Windows and Linux right now and the demand is really low regarding an macOS version. Maybe sometime in the future, who knows 🙂
Best regards, Armin
I took some time to look at what it actually means to move the current master to macOS since there is a partial need in that for me (we are experiencing memory leaks on Windows with trivial video file looping - running a build with debug heap did not provide any meaningful results, so will most likely check if Linux solves it but macOS was also considered to be an option, so I took some time to at least understand what that means).
So here are the main things: 1) As mentioned - create a Metal alternative for the OpenGL stuff (both screen consumer and accelerator), for now I've added empty dummy classes. Also not sure how much the shaders need to be changed. 2) CEF on macOS requires an application with given layout (it needs to be an app bundle instead of a command line tool and needs to have a helper app). This I have already more or less done. But this means that config and stuff most likely moves to the Resources folder of the app. 3) Cocoa stuff instead of SFML since due to Metal / MetalView SFML is not an option imho. 4) Had to bump up boost version.
If anyone want's to collaborate on this, let me know.
I have some dev experience on iOS, but only very lightly touched MacOS and OpenGL or Metal looks like very low level programming which is kinda scary for me :(
On Thursday, 30 July 2020, Rūdolfs Bundulis notifications@github.com wrote:
I took some time to look at what it actually means to move the current master to macOS since there is a partial need in that for me (we are experiencing memory leaks on Windows with trivial video file looping - running a build with debug heap did not provide any meaningful results, so will most likely check if Linux solves it but macOS was also considered to be an option, so I took some time to at least understand what that means).
So here are the main things:
- As mentioned - create a Metal alternative for the OpenGL stuff (both screen consumer and accelerator), for now I've added empty dummy classes. Also not sure how much the shaders need to be changed.
- CEF on macOS requires an application with given layout (it needs to be an app bundle instead of a command line tool and needs to have a helper app). This I have already more or less done. But this means that config and stuff most likely moves to the Resources folder of the app.
- Cocoa stuff instead of SFML since due to Metal / MetalView SFML is not an option imho.
- Had to bump up boost version.
If anyone want's to collaborate on this, let me know.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CasparCG/server/issues/1246#issuecomment-666577192, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEQPFR3XE5JTAQDAYS5VLLR6G2N7ANCNFSM4JZCETNQ .
As mentioned - create a Metal alternative for the OpenGL stuff (both screen consumer and accelerator), for now I've added empty dummy classes. Also not sure how much the shaders need to be changed.
I'm speaking out of rank here, but have you looked if Vulkan is a viable alternative to OpenGL and Metal? Then the code base can be shared between linux, mac os and windows
Just my two cents - as far as I know Apple actually does not have a Vulkan API, there is only the SDK from khronos, and spending 20 mins of googling showed that people are struggling to use that with Metal views. Also using metal would make a lesser impact on the existing windows / linux codebase - nothing needs to be touched there just moved around and new equivalent classes added for Metal, instead of rewriting everything. Also (but I haven't looked into that) not sure that CEF uses Vulkan underneath, so doing off screen rendering on shared textures might not work (but I am saying this w/o any research).
All that being said, it is nice to have that much feedback, as soon as I have a working version w/o the accelerator and screen consumer (but it at least is smth that can be shown to others), I'll put a link to my fork.
Big thanks for you to put so much effort into this, one lame question - what is SFML?
Big thanks for you to put so much effort into this, one lame question - what is SFML?
SFML is a graphics library that we use to initialise opengl, and to do the drawing in the diag window. I expect it will be unnecessary if using metal or vulkan
as far as I know Apple actually does not have a Vulkan API, there is only the SDK from khronos. Also using metal would make a lesser impact on the existing windows / linux codebase
Yes, mac does not support vulkan but khronos make a vulkan to metal translation layer. If vulkan is used, then if this does get merged we could consider replacing opengl with vulkan too.
I don't know how likely this is to get merged upstream though, it will depend on impact to the codebase and will likely be a community effort to maintain it
@Julusian yeah, well that is why I am trying to see if I can move to Metal, since that will be much smaller impact on the existing codebase :)
@rubu any report on progress with this?
@Behinder got stuck with porting the OpenGL acceleration to Metal and a bit short on time currently. If anyone wants to join in, I'd be happy to push all the stuff to a forked repo.
The stuff that I did can be found here - https://github.com/rubu/server/tree/feature/macos-build. But yeah, now the main challenge is Metal.
I would be glad to see the repo to understand your approach.
On Thu, Oct 29, 2020 at 11:02 AM Rūdolfs Bundulis notifications@github.com wrote:
@Behinder https://github.com/Behinder got stuck with porting the OpenGL acceleration to Metal and a bit short on time currently. If anyone wants to join in, I'd be happy to push all the stuff to a forked repo.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CasparCG/server/issues/1246#issuecomment-718572929, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEQPFV56PZDSBOWZA57LOLSNE4SHANCNFSM4JZCETNQ .
@Behinder edited the comment and added a link to my fork.
Thank you very much, I'll take a look but yes Metal is a challenge. This is what I hate in GIT tough, "This branch is 4 commits ahead, 30 commits behind CasparCG:master." How can something be ahead and behind at the same time?
@Behinder because there are 4 commits from me above the point of forking and now the current CasparCG/server master has had 30 new commits from that fork point.
Understood, I hope when your fork finally work it would not cause any issues with merging
On Thu, Oct 29, 2020 at 1:44 PM Rūdolfs Bundulis notifications@github.com wrote:
@Behinder https://github.com/Behinder because there are 4 commits from me above the point of forking and now the current CasparCG/server master has had 30 new commits from that fork point.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CasparCG/server/issues/1246#issuecomment-718728284, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEQPFSAGO5D7I7O6G4IEX3SNFPS7ANCNFSM4JZCETNQ .
@Behinder eh, did some attempts to move on - seems that Apple has deprecated OpenAL as well and I am not even sure how sfml will behave due to the fact that OpenGL is deprecated and sfml as far as I Googled does not support Metal, so most likely I am abandoning this.
So the only way is to rewrite things from scratch in Metal and abandon all middleman. Huge task I am not fit to do :( but with recent introduction of Apple Silicon Macs Macos should be more preferable for CasperCG than Linux, pity developers do not think that way :(
On Tue, Dec 15, 2020 at 5:48 PM Rūdolfs Bundulis notifications@github.com wrote:
@Behinder https://github.com/Behinder eh, did some attempts to move on
- seems that Apple has deprecated OpenAL as well and I am not even sure how sfml will behave due to the fact that OpenGL is deprecated and sfml as far as I Googled does not support Metal, so most likely I am abandoning this.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CasparCG/server/issues/1246#issuecomment-745418503, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEQPFU3GZGZJZVZPDIK6O3SU6HNVANCNFSM4JZCETNQ .
@Behinder you're not likely to make devs partial to your cause by low key flaming them.
I simply stating the fact. They prefer inferior platform to MacOS with ancient technology stack so what I say it’s true,, eos
On Wednesday, 16 December 2020, coral notifications@github.com wrote:
@Behinder https://github.com/Behinder you're not likely to make devs partial to your cause by low key flaming them.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CasparCG/server/issues/1246#issuecomment-745660046, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEQPFSHQ23V3RBHTE2LIHLSU73UFANCNFSM4JZCETNQ .
as in subject