Comments (12)
Hi @kenyeresrudolf that sounds super cool!
Right now the best (if not the most elegant) way to do this would be as follows:
Video Device In > Syphon Spout Out > OBS Studio > VirtualCam plugin
The VirtualCam plugin gives you multiple virtual webcams (rather than just the 1 by default), so you can set it up so it sends the same Spout video source out to 2x Virtual Webcams.
You can then run 2x instances of the MediaPipe plugin, with each one using a different virtual webcam as it's media source. You could either crop the video in TD before sending it out via Spout, or in OBS before sending it to a virtual webcam.
It means you have to run OBS in the background the whole time, but until we can figure out a more convenient way to get TOPs into the web browser that MediaPipe runs in, this will work for now
from mediapipe-touchdesigner.
hi @domisjustanumber ,
Thank you for the quick reply.
It seems that the OBS double (virtual) output method could work, it does not require sending the webcam picture from TD to Spout either, as it is possible to cut/mask the camera image internally in OBS.
You are correct, it means that the OBS will eat some computational power. It would be a way more convenient way to modify the TOPs that feed the web browser internally in TD. If you can add this feature to the update, that would be greatly appreciated.
This plugin is already a gamechanger, thank you a lot for your hard work!
from mediapipe-touchdesigner.
hi @domisjustanumber ,
Sorry, I tried to build this up in my project, but the method seems not working, as I could not create two half webscam screen input to feed the mediapipe instances:
- following your guidance: from TD i can send two separate outputs with syphonspoutout, but in OBS I will see only one
- while in OBS if I create two instances for a videocapture device with copypasting, then i cannot apply different crop settings to them
- if I add a new videocapture device, then I could add a new filter with different crop settings. BUT if I am using the the same webcam as a source, then only one of those will run. Maybe it is a bug in OBS itself.
Please let me know if you succeed, maybe i forgot something or in case if you have any other idea :)
thanks a lot
from mediapipe-touchdesigner.
Ah you're so close! Instead of using the VirtualCam under Tools, you create a scene for each crop you want, then apply a VirtualCam filter to each scene that sends each scene out to a different VirtualCam
Source Filter
section of https://obsproject.com/forum/resources/obs-virtualcam.1744/
from mediapipe-touchdesigner.
I had another thought about this - I also have a webcam I can only run once, but I'm able to get this solution to work and I think the answer is not using source filters.
If you create 2 scenes in OBS and add the same webcam source to each, you can then crop the video n each scene using Alt + drag. That lets you have the same source in as many places as you want without issue.
Once you've set your scenes up, you then add a virtualcam filter to each scene to send it to a different virtual camera.
from mediapipe-touchdesigner.
hi @domisjustanumber,
Yes, it is working now. My only issue here, is that it looks like mediapipe stretch the analysed image to the 16:9 ratio, despite it is cropped to 8:9. It recognizes the hand gestures, but the overlay is shifted and stretched therefore I assume this workaround result in some kind of performance drop. Did you experience the same?
Again, it is working, so I am really appreciating your help! But in the long run, I believe this could be improved!
Thanks again!
from mediapipe-touchdesigner.
I made a quick tutorial video on how to set it all up so you get a non-stretched version for each side of the screen - hopefully it's what you're trying to achieve
from mediapipe-touchdesigner.
Hey Dom,
Thank you a lot, almost there! I still have some issues on maintaining the performance but on the way!
Thank you a lot for your kind help!
from mediapipe-touchdesigner.
Related Issues (20)
- VideoDeviceIn not running HOT 46
- Fixed: Sometimes ML not running. HOT 2
- Infinite Loading HOT 10
- SpoutCam not working in Mediapipe tox HOT 11
- Not saving anything I've added HOT 2
- How to close the green line and red points of the track? HOT 2
- Top input HOT 1
- file load version conflict HOT 18
- Mediapipe tox is empty HOT 12
- Num Poses HOT 1
- Spoutcam not showing up on the Mediapipe container HOT 4
- OBS Virtual Camera Not Working HOT 6
- No info from face_tracking blend_shapes HOT 3
- detecting 2 hands only HOT 1
- face tracking sample issues HOT 1
- Mac 2020 m1 webcam HOT 1
- Webcam picture visible, but models not working HOT 1
- Webcam initalization assumption HOT 7
- Multiple poses not outputting HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediapipe-touchdesigner.