-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Freenect(2) update thread (Linux/macOS support) #9
Comments
@SirLynix I can do Mac builds and testing for you. I have both a Kinect v2 and a v1. |
Thanks! I have little experience with macOS compilation, I'll probably need some help! |
Hello :) |
Hi! On which plateform are you?
Premake should handle all the config for everything.
Le jeu. 7 mai 2020 à 20:55, erdemthearch <notifications@github.com> a
écrit :
… Hello :)
it seems that you only changed "include" and "src" files.
So how can we update the software? Which files must be copied and pasted
to where?
Thanks in advance.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAW5AXOU7UAPP7DJJIJE3F3RQL7ZPANCNFSM4MYBVH5Q>
.
|
W10 and Kinect v2 |
If you're using visual studio community 2019 all you have to do is install
Kinect For Windows Runtime 2.0 and execute ’premake.exe 2019’, this will
generate a solution which you can build. See readme for more info
Le ven. 8 mai 2020 à 13:24, erdemthearch <notifications@github.com> a
écrit :
… W10 and Kinect v2
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAW5AXLZG5UN6AXXH3GZTFLRQPTWDANCNFSM4MYBVH5Q>
.
|
I am really sorry but i am not a coder. I only know node based coding. I am really far away from visual studio. Is there any quick istall file or something like that? Or do you consider to make one for end users like me in future? Thanks :) |
You can download the 0.2 release in the releases section of GitHub. The 0.3 binaries will be downloadable soon (I will make a release candidate for them). As for the Kinect v2, there's not much difference between 0.2 and 0.3 for now, except for some performance improvement. |
I've tested libfreenect on my current machine (archlinux install) and it works pretty well. Is there any reasonably straightforward way to build this with libfreenect as it currently stands? I'd be willing to go through the effort and test it on my system, this is something i've been wanting for a while now! |
Hi! From what I saw libfreenect(2) should be kinda easy to use, and Linux support is my next big task. It's just that I have a lot of work to do for other projects (and I have a relatively costly hobby called eating 😄 ) and this is not at the top of my todo list for now. However a lot of the work that went into 0.3 (that will be 1.0 when out) was to make obs-kinect core portable, and leave Windows/Kinect SDK specific stuff in some backend code. All that to say there's not much work remaining in order to have this plugin on Linux! |
Fantastic! If you need someone to test, please feel free to find a way to contact me haha. |
I am trying to use Kinect 2 as a webcam on Mac (using Slack). Using Libfreenect2 I can get the RGB stream through their example app (Protonect) or code but there is no straightforward way to expose Kinect as a webcam to other software. Since OBS can act a virtual webcam on Mac having this plugin working would be highly useful. |
Hello! |
Just a quick message to tell you guys I'm not forgetting about Linux and macOS, I'm just working on several things at once (a man has to eat). My next big task (and the only remaining missing feature for 1.0) is Linux and macOS support. 😄 |
That is cool. Personally I am happy with having greenscreen only on Windows. I only need it as a webcam on mac. |
Do you know if the Linux version will have the same impact on system performance than on Windows? I dropped the Kinect atm on Windows because of that. I hope it will be less, as at least the Kinect windows service will not be there?! Otherwise I will sell my Kinect due to lack of availability of graphics cards at normal prices atm |
It depends on the Kinect model. One of the benefit of Freenect2 (kinect for xbox one) is that it is able to exploit either the CPU or GPU to perform depth processing. I don't know if it will be faster than what the official SDK does but at least there will be more control. I don't really know about Freenect (kinect for 360), as it's a completely different API, but I think it will be handled in a smarter way (the official Windows SDK tries to use all CPU threads at once). As for Azure Kinect, I don't think there will be a significant difference (as it's the same SDK). Even though there maybe a difference between Windows and Linux/macOS on low-level handling. So the real answer here is: I don't know yet, it requires some testing. |
I managed to setup a CI which will build Linux plugins files (and eventually Windows and macOS) with a preliminary support for Kinect v2 (xbox one) through freenect2, and Azure Kinect support through Kinect for Azure SDK. If you're feeling adventurous, you can download the Linux plugins files here (click on the last workflow that ran on master and download the ubuntu-latest-x64-releasedbg artifacts). You'll still need a few other files (currently missing from this package), so you'll need to download the latest Windows nightlies to get theses files (please do it only if you know what you're doing). This is not tested. If you went into the troubles of trying this, please let me know if and how it worked for you (even if it didn't)! Kinect v1 (xbox 360) and macOS users, don't worry. You'll be able to try it out soon! |
I improved packaging support for Windows and Linux, which means the Linux package now has obs-kinect data (shaders and locales). I'm wondering, what would be the best way to distribute obs-kinect on Linux? I've seen that some plugins (such as obs-websocket) build a .deb package which automatically installs the plugin files at the right place, which is something I can do, but doesn't that excludes non-debian based Linux distributions? What about them? Is obs studio even available/used on such distributions? About mac builds, things seems easier on a technical level but would require me to pay for an Apple Developer Certificate annually. I need to think about this, and if there's another way. |
I believe I can help with Apple’s developer account. I think I can add you
as a member under my account.
…On Sat 13. Feb 2021 at 12:10, Jérôme Leclercq ***@***.***> wrote:
I improved packaging support for Windows and Linux, which means the Linux
package now has obs-kinect data (shaders and locales).
I'm wondering, what would be the best way to distribute obs-kinect on
Linux? I've seen that some plugins (such as obs-websocket
<https://github.com/Palakis/obs-websocket/releases/tag/4.9.0>) build a
.deb package which automatically installs the plugin files at the right
place, which is something I can do, but doesn't that excludes non-debian
based Linux distributions? What about them? Is obs studio even
available/used on such distributions?
About mac builds, things seems easier on a technical level but would
require me to pay for an Apple Developer Certificate annually. I need to
think about this, and if there's another way.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARX7D6VHOXEJCPARYKCXPDS6ZMZJANCNFSM4MYBVH5Q>
.
|
Yes, if it´s a .deb package it´s only for debian based distros. AFAIK advanced users could extract that package and copy to the right places on their distro, too. IIRC I´ve done that once but not sure. I tried Solus, elementaryOS and am now with Manjaro (arch based). For all theses distros there is OBS "natively" available through their package managers. Compiling it for one/serveral formats would limit it to these distros. Maybe at least give a manual how to install from scratch into most common distros/bases (don´t know the right term) (deb, arch). There are also distro-wide packages like flat, snap and some third I can´t remember. Though I´m not sure if this will work only together with OBS installed using this packages, too. |
First image of obs-kinect on Linux! I installed Ubuntu 20.04 and went into some troubles but finally found a way to make it work. From what I observed, freenect2 works well, and is able to use my KinectV2 without any issue, except for the root permissions (which seems to be easy to fix, see OpenKinect/libfreenect2#870 ). The Azure backend works too, but for some weird reason I couldn't retrieve the depth or infrared streams, probably something on my side. The main remaining issue which remains is now a rpath one, I'll explain: Setting the rpath to $origin doesn't help, as the origin here is OBS, and I can't set it to something like I see some solutions to fix this:
I'm not sure if 1) is even possible, 3) is ugly and 4) is difficult to implement (as the libraries used are not really meant for that), so I think I'll go with 2). Oh and I had to fix a shader on Linux, which now doesn't compile on Windows, yay. |
obs studio is available on most mainstream distros (debian, arch, gentoo probably even) and your "duty" as the developer in the typical linux packaging world is just really just tagging releases in github. Then those builds are reproducible for package maintainers in theory. |
Do you know a OBS Studio plugins for Linux which does everything that should be done for this platform? The only example I've seen is obs-websocket which only provides a .deb package for Debian-based distributions. |
On my previous Manjaro installation I had the "NDI" plugin installed. Oh and on my laptop with Solus OS, too. |
I'm getting a 404 for that url... |
Builds don't last forever on flathub's buildbot repo... I've create a flatpak bundle file that's attached here. Just extract the archive and install the bundle with
|
Also, @SirLynix this isn't a normal issue on linux. It's probably something really small that we're all missing, or Something microsoft has done to make things extra-complicated. 99% of the time stuff just works and compiles for everyone without a hitch. |
Can you try this build? I've built this with glfw and libjpeg-turbo. I that doesn't work I'll also try building glut as it was one of the dependencies for the examples of freenect. |
2023-01-16 07-53-45.txt I came across an unrelated issue; that being that freenect requires firmware for mic access on linux. Opening OBS while running any of the tests, for example the mic test, kills the kinect. I can also hear an audible pop in my (aux jack) headphones when I do this, which is really weird. |
Yes, this is what I was looking at. I was thinking maybe it has to do with how libfreenect was compiled if it needs certain opnegl features. But I can't do much if it needs another program to upload firmware.
Do you mean it works when you run one of the examples of freenect or when you use obs-kinect without flatpak? |
Oh wow, running the mic test, and then quitting it, then opening OBS makes the plugin work?! What?! Okay, so... running the mic test while obs is open, then quitting the mic test freezes it, but then the kinect plugin starts working. This is not okay, but it works for now........... I'd be open for a screenshare at any point if you want to see how scuffed this is on my end. |
I'm sorry I can't really help you with this as your issues seem to be related with libfreenect itself (maybe try to open an issue on their side), or the way the plugin is distributed on Linux (which I think I screwed up but I don't know how to improve that). |
Could you try updating your modified version of libfreenect to the latest source of the original repo? That might fix a few things... You only changed a few things, right? |
I don't think that would make much difference. The issue is still up, and I think the problem is with how the firmware is being uploaded to the kinect, but I've created a patch file with SirLynix's commits and added to the flatpak manifest to be applied while building with the latest upstream git for you to test out. Also, I'm still learning c++ and, overall, it doesn't seem like there is much developer interest in these types of projects. So I don't think there is much to be done atm. |
I think you're misunderstanding what "registration" means in libfreenect. A "registered" frame (which is what's tested in the regtest demo) is depth aligned to color (which I call color-mapped depth in this plugin), there's no kind of "device registration" required for kinect, you open the device and starts its color and depth streams with the selected mode (see https://github.com/OpenKinect/libfreenect/blob/master/examples/camtest.c#L86), which is what I do. I think you may have some kind of power or USB issue as it seems you're not getting all data sent by the Kinect. As of why it's working once you run a libfreenect example, that's a total mystery.
I just added a way to apply registration later on, so I can get the color and depth frames and then map depth to color (which allows to have multiple sources showing color/depth/color-mapped depth at the same time). I pulled the recent libfreenect changes but I don't think it will help however as the recent libfreenect changes don't seem huge. |
I've done some looking into things, and it's definitely something to do with the plugin code. Firmware does NOT need to be uploaded for the kinect's mic/video feed to work. I am getting all of the data sent by the kinect. Maybe the code to init the video feeds of the kinect isn't run when it's supposed to? Currently the plugin is still broken. Installing the flatpak plugin should be all a user has to do to get it to work, after they get freenect working. |
obs-kinect does not upload firmware, and I'm not sure how different should the plugin init video.
I'm not a Linux user and have no idea how to make a flatpak, this is why I need help from advanced Linux users to help me with this plugin distribution. |
All the plugin flatpak does is is extend on the OBS flatpak to add the plugin and its required dependencies (freenect, etc). The OBS flatpak would run the same regardless of the distro. And I doubt this behavior would change with native OBS (Speaking of, It’s still not published?? I’ll ask about it later)
You don’t need to install freenect or anything system else on your system besides the udev rules for the appropriate permissions. I don’t know much about the original kinect, but it looks like certain models have this problem with libfreenect according to upstream reports. I’ll look into it tomorrow, but it’s hard to debug something you don’t have and can’t actively test with. |
You can take a look at how it's setup in the CI: https://github.com/SirLynix/obs-kinect/blob/master/.github/workflows/linux-build.yml#L174 |
So I've gotten the updated flatpak that o-kotb provided to reliably function.... but it's weird. This might actually be required for the Xbox Kinect v1 now that I think about it! On an actual Xbox, when you start it up, the Kinect camera does that 'calibration' scan where it tilts it's camera all the way up and then all the way down. The green light only turns solid after that. If you interrupt it, the Xbox freaks out. |
Hi there, sorry I am an OBS noob. I have the following issue on my machines (mac and arch linux), I am assuming have skipped a very obvious step, please help.
|
@djpiper28 On Arch you can use an obs-kinect-bin package from the AUR. |
Arch package won't install for me |
@djpiper28 I just installed it 2 days ago. I remember having some issues before. Not sure what failed for you but be sure you have libfreenect and libfreenect2 installed before installing this package. |
^^ for libfreenect, same for libfreenect-sirlynix-git |
@djpiper28 try libfreenect-git from the AUR. |
Tried all of the packages on many different operating systems, and none of them work. They all spit out different errors. It's great that the devs have managed to bodge together something that worked for them, but they also seem to have abandoned the project. Anyone have any other way to get this camera working on linux? |
It's not really that I have abandonned the project but rather that the only Linux I have (and work with) are servers or VM that can't use Kinect. obs-kinect works on Linux but distributing it is really complicated for me as there are many ways to install OBS. I think the main blocking points are that with Kinect v1 you need to use my own libfreenect fork (https://github.com/SirLynix/libfreenect) (#83) - which xmake uses - and the way obs-kinect is distributed and loads its backend libraries: https://github.com/SirLynix/obs-kinect/blob/master/src/obs-kinect/KinectPlugin.cpp#L43-L53 I'm sure this can be improved to help supporting Linux but I don't know how and don't have much time to install Linux on my own computer to try it out, however I'd be glad to help if I can. |
Hi,
With the upcoming 0.3 release, I splitted obs-kinect into multiple parts: common stuff like obs plugin registration, depth/infrared/faux green-screen processing, source and general device handling is part of the core but it doesn't know about Kinect devices (or even windows). Kinect v1/v2 handling is done in separate dll which are loaded by obs-kinect at startup.
This was made to add support for Kinect v1 without requiring the install of both v1 and v2 runtimes. And also to support Linux/macOS.
Obviously, Microsoft Kinect SDKs don't work on Linux/macOS, hopefully projects like libfreenect and libfreenect2 allow the use of Kinect on these systems.
Since obs-kinect device handling is done in separate libraries, it's possible to add libfreenect support kinda easily.
I tried both of these libraries on Windows (since they do have Windows support as well) for testing and it's working well!
freenect (v1):
freenect2 (v2):
However since libfreenect(2) needs raw USB commands, it requires to install a custom USB driver (like UsbDk). Hopefully this doesn't conflict with Kinect v2 (I can use libfreenect2 and Kinect SDK v2.0 without problem), but well, for Kinect v1 it's a bit more like hell. You have to replace the Kinect USB driver (using Zadig) for libfreenect to work which prevents Kinect SDK v1.8 to work, and it took me one hour to reinstall the official Kinect drivers, so yeah, I don't think I will release an obs-kinect libfreenect backend on Windows because of that (since it doesn't seem to do things you cannot do with official Kinect v1.8 runtime, except maybe for led control?).
As for Kinect v2, libfreenect2 does add more control, especially with the RGB camera color settings (things like exposure mode, white balance, gain, and such), so I think I'll support it on Windows too (even though I hope to be able to do that as well with the official SDK backend, using this).
Important note
Both libfreenect libs are really cool, but they are lacking some higher-level stuff the Kinect SDK does, like body/skeletal detection, or dedicated background removal (like Kinect SDK v1.8 does). It doesn't mean you won't be able to have background removal on Linux/macOS but it means you won't be able to use body informations for that and there's not much I can do about that. (except implementing body detecting but it requires some skill I don't have).
I will be able to compile the plugin on Linux, or even test it without problems, but I won't be able to do that with macOS. So if you have a mac and are willing to help, please let me know!
Also, as the 0.3 release is already a big one, Linux/macOS support won't be part of it (but I'll try to do it asap).
TL;DR: Linux/macOS support requires an open-source backend since official Microsoft SDKs are for Windows. There are backend for Kinect v1 and v2 but they don't do higher-level processing like body information. Things like body detection/body-based greenscreen filtering won't work on Linux/macOS because of that.
The text was updated successfully, but these errors were encountered: