Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
5
Question by $$anonymous$$ · Apr 16, 2012 at 11:45 AM · videowebcamtexturedevicewebcam

What is required from a device to be read in a WebcamTexture?

Hello

I created a directshow filter to create a virtual webcam device. It works with most software (VLC, Virtools, GraphEdit). But when I try to use it in Unity with WebcamTexture, it doesn't works.

  • The device is present in the array provided by WebcamTexture.devices

  • Creation of the WebcamTexture works. (For information, if I tried to create a WebcamTexture with an invalid device name, I would get this error : Cannot find webcam device BadName.)

  • When I try to use myWebCamTexture.Play() , I get this error :

    ERROR - Could not find specified video device

So, Unity sees my device (it appears in WebcamTexture.devices) but seems unable to use it. Why?

The very same scipt works perfectly with real webcams, and with other virtual cams (ex : e2esoft VCam).

I know this is a very specific question, but does anyone knows how does Unity handle webcam? (in particular, what in the difference with how other softwares handle it).

Edit :

My directshow filter implement these interfaces

  • IAMStreamConfig

  • IBaseFilter

  • IKsPropertySet

  • IMediaFilter

  • IPersist

  • ISpecifyPropertyPages

While another directshow filter (e2esoft vcam) that works within Unity implement these ones :

  • IAMFilterMiscFlags

  • IAMVideoControl

  • IAMVideoProcAmp

  • IBaseFilter

  • IKSPropertySet

  • IMediaFilter

  • IMediaSeeking

  • IPersist

  • IPersistStream

  • ISpecifyPropertyPages

In bold are the interfaces that are missing in my filter. Are these all required to be used as webcam by Unity? Or do I only need to implement a specific one?

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DaveA · Apr 18, 2012 at 05:25 PM 1
Share

Seems you asked this before: http://answers.unity3d.com/questions/232205/why-cant-i-use-a-virtual-device-with-webcamtexture.html Good question. To bump it, just edit it a little or add a comment.

avatar image JackRao · Nov 20, 2012 at 10:21 AM 0
Share

Hi buddy, I am running into the same problem. Did u figure it out?

avatar image SpriteGoblin · Dec 11, 2014 at 09:53 AM 0
Share

Hi, has anyone found the answer to this question? I've tried quite a few method to use a DirectShow filter in Unity with no luck.

avatar image nhamg · May 26, 2015 at 05:10 PM 0
Share

Same problem here.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by MetaAdam · Dec 17, 2016 at 11:09 PM

Sorry for bumping an old thread but in case anyone else runs into this issue here's a solution that worked for me.

Unity appears to use a library called VideoInput.

This checks for a Device Path. You can add one to your filter's registry entry during DllRegisterServer using the code snippet from this blog.

This adds a subkey called DevicePath with value of "foo:bar" (a dummy device path is fine).

Once I did this my filter was correctly showing in Unity.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Webcamtexture at 1080p 50fps produces black image 1 Answer

web cam texture to video file(editor and web both) 2 Answers

How can I save a webcam recording to a video file in Unity? 2 Answers

How do I set pixels with WebCamTexture.GetPixels 1 Answer

WebGL Webcam light keeps enabled after stoping WebCamTexture 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges