1

I't trying to access to a dummy v4l2 camera from Unity3D.

The dummy camera is created with gstreamer

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=640,height=480 !v4l2sink device=/dev/video1 

and works when used like

gst-launch-1.0 v4l2src device=/dev/video1 ! xvimagesink

The output of v4l2-ctl

v4l2-ctl --list-formats-ext -d /dev/video1 
ioctl: VIDIOC_ENUM_FMT
    Index       : 0
    Type        : Video Capture
    Pixel Format: 'YUYV'
    Name        : YUYV 4:2:2
        Size: Discrete 640x480
            Interval: Discrete 0.033s (30.000 fps)

But the application - that works just fine with the webcam itself on /dev/video0 - when pointed to /dev/video1 just doesn't show anything.

Looking at Player.log in ~/.config/unity3d I find

    Camera 0: HP HD Camera (/dev/video0)

(Filename:  Line: 93)

Camera 1: Dummy video device (0x0000) (/dev/video1)

(Filename:  Line: 93)

UnityEngine.WebCamDevice[]

(Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

Error dequeuing image buffer: No such file or directory

(Filename:  Line: 326)

I'm not sure on how to proceed from here in fixing some error in the unity application and/or gstreamer pipeline.

  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. Also see [Where do I post questions about Dev Ops?](http://meta.stackexchange.com/q/134306) – jww Feb 10 '17 at 01:40
  • 2
    I've described the system setup because It's what is determining the problem. But the solution is probably modifying the unity code and/or debugging it. This is "programming" in my book. I just didn't include the code because it's quite standard. – Riccardo Cagnasso Feb 10 '17 at 10:27

0 Answers0