x


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?

more ▼

asked Apr 16 '12 at 11:45 AM

dnjata gravatar image

dnjata
241 3 4 7

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.

Apr 18 '12 at 05:25 PM DaveA

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

Nov 20 '12 at 10:21 AM JackRao
(comments are locked)
10|3000 characters needed characters left

-1 answers: sort voted first
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x283
x72
x57
x26
x1

asked: Apr 16 '12 at 11:45 AM

Seen: 1350 times

Last Updated: Nov 20 '12 at 10:21 AM