Message 1 of 5
Use webcam on texture with vrVideoGrab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
Id like to use this old example code snippet from VRED 2023 Help | Video grabbing example | Autodesk that makes use of the API v1 class 'vrVideoGrab' (VRED 2023 Help | vrVideoGrab | Autodesk).
screen = findNode("Screen")
if not screen.isValid():
screen = createPlane(2000, 1000, 1, 1, 0,0,0)
screen.setName("Screen")
screen.setRotation(90,0,0)
screen.setTranslation(0, 0, 500)
# (node, parameter, xres, yres, material, parameter, material, parameter, xres, yres)
vg = vrVideoGrab(screen.getMaterial(), "OBS Virtual Camera", 768, 432)
# specify a resolution.
vg.setActive(true)
# define key s to toggle videograbbing
keyS = vrKey(Key_S)
keyS.connect(vg, SWITCH_TOGGLE)
vrLogInfo("Press key s to toggle videograbbing")
Unfortunately, the "OBS Virtual Camera" can't be used:
Found device 0 'OBS Virtual Camera'
vrFrameGrabber::init : Couldn't get capture output pin!
Press key s to toggle videograbbing
Other forum posts that didn't help:
- What video devices are supported by vrVideoGrab in VRED 2018 - Autodesk Community - VRED
- Problem of The vrVideoGrab API - Autodesk Community - VRED <- I've got the same issue