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

SpoutCam not working in Mediapipe tox #45

Closed
yiwen212 opened this issue Oct 5, 2023 · 11 comments
Closed

SpoutCam not working in Mediapipe tox #45

yiwen212 opened this issue Oct 5, 2023 · 11 comments

Comments

@yiwen212
Copy link

yiwen212 commented Oct 5, 2023

Hi Torin and Dom, Thanks for all amazing tool. Making it easy for beginners to get started.
I have some problems while using webcam with SpoutCam. I selected 'webcam' in videofilein TOP, and selected 'SpoutCam' in the Mediapipe tox. Both of the resolutions are set to 1280 x 720. However, the Mediapipe window shows RGB noise.
螢幕擷取畫面 (45)

When I use laptop cam and obs in Mediapipe tox, it is successful. Using the webcam, Mediapipe window have image but not working.
螢幕擷取畫面 (49)

I also tried changing the port to 3002, but not working.
螢幕擷取畫面 (50)

I found an interesting part: when I select 'SpoutCam' in Mediapipe tox, window shows RGB noise. However, when I open videofilein TOP and also select 'SpoutCam', videofilein TOP shows the image.
螢幕擷取畫面 (46)

These are the images that I tried loading http://localhost:9222/.
Select 'webcam' in Mediapipe tox
螢幕擷取畫面 (51)
Select 'SpoutCam' in Mediapipe tox
螢幕擷取畫面 (52)

TD Version:2022.33910, 2022.35280
MediaPipe TD Release:v0.2.2
System:Windows 11

If there's anything I haven't noticed or done wrong, please let me know! Thank you for your guidance!

@jossevessies
Copy link

Hi Yiwen, have you tried changing the byte size to 8-bit (fixed) rgba?
For me this was a solution.

also I didn’t realize before, but in the mediapipe.toe file that comes with the project Torin and Dom added a spoutout top. Of course disable this feed-out to use your own in the right spout channel name.

@yiwen212
Copy link
Author

yiwen212 commented Oct 6, 2023

Hi jossevessies, I got it. I'll give it a try. Thank you very much!!

@yiwen212
Copy link
Author

yiwen212 commented Oct 6, 2023

Hi, @jossevessies ! I tried changing the byte size to 8-bit (fixed) rgba in the spoutout top, but it still not working.
I recorded the process so that I can check my steps more easily if something isn't right!
I used another logi 720p webcam is woking!!! yeah!!! However, the entire image is offset. It's good for me already!

Still want to know why SpoutCam didn't work. If there's anything I haven't noticed or done wrong, please let me know!
Thanks again for your help!
https://github.com/torinmb/mediapipe-touchdesigner/assets/147087782/71fa9ac7-2a47-491d-9741-60c3974e4d81

@Truen224
Copy link

I have the same issue. Version I'm running is 2022.33910
I attempted to use MovieFileIn TOP to SyphonSpoutOut TOP and then to Mediapipe, but it seems like Mediapipe cannot receive the Spout Cam (although it works with VideoDeviceIn).

I'm not sure what went wrong...

螢幕擷取畫面 2023-10-16 095340

Additionally, a big thank you to Torin and Dom for your amazing work and selfless sharing. I've been trying to integrate Mediapipe with for several months TouchDesigner without success. Your help has been immensely valuable to me!

@domisjustanumber
Copy link
Collaborator

Hey everyone, thanks for trying to figure this one out - it's something I sometimes get too and I'm not sure why. I think it's related to SpoutCam not always initialising properly but I'm not sure. The only way I've found to fix it so far is to close TouchDesigner, re-open it and then it will work.

I've tried reloading the MP component and disabling the SyphonSpoutOut and re-enabling, but that doesn't seem to do it, so I'm not sure what the root cause is, but if anyone figures it would we might be able to put something in that can restart whatever is causing it to fail.

@Truen224
Copy link

Thank you for your response!
I have tried using NDI WebCamera and successfully imported the video. However, I couldn't get Mediapipe to detect people's movements in the video.

image
↑ When using my WebCam

image
↑ Using the NDI WebCam, it appears that the video has been successfully imported, but no detection can be performed.

Could you kindly take a moment to review and identify where the issue might be occurring?

@domisjustanumber
Copy link
Collaborator

domisjustanumber commented Nov 1, 2023

Hi @Truen224 sorry I missed your reply earlier. If you are still having issues, we have a new release that has many fixes and may solve your problem https://github.com/torinmb/mediapipe-touchdesigner/releases/tag/v0.3.2

@domisjustanumber
Copy link
Collaborator

Closing this one for now, please re-open if you have any other issues

@vVattghern
Copy link

vVattghern commented Dec 4, 2023

I was facing a similar issue with Mediapipe only giving me a noisy SpoutCam output. Any changes made in TouchDesigner or by changing plugin versions (for both this plugin and Mediapipe) did not yield any success. I'm adding a comment here because I was eventually able to fix it and want to note it down, in case anyone else faces the same problem:

For diagnosing the issue, I recommend downloading the Spout2 files from the same GitHub profile as the SpoutCam Plugin. This adds some settings and diagnostics options when working with Spout. In my case, my laptop graphics proved to be the problem! When running diagnostics, checking for compatibility and looking at the running spout cam process (all possible through the SpoutPanel and SpoutSettings) it told me that the texture sharing was failing, thus resulting in the noise. After reading through the SpoutSettings and their explanations (not the SpoutCamSettings!), I made sure to put all processes involving spout (so sender & receiver) on the same graphics pipeline (by changing the .exe graphic settings in Windows, this is explained in SpoutSettings), since my laptop has both integrated CPU graphics, as well as a GPU.

This actually fixed my issue!

So for anyone that has a laptop, multiple GPUs or any other Spout issues in combination with this TouchDesigner plugin, I recommend downloading the rest of the Spout software and tinkering a bit.

@domisjustanumber
Copy link
Collaborator

Oh wow, thanks for digging into this @vVattghern! I'll add this to the Readme to help people down the road!

@domisjustanumber
Copy link
Collaborator

@Ayeshmantha-Maduranga does this solve your issue at all?

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

5 participants