How can you use kinect camera inside google chrome?

EDIT : now supported

I want to use kinect inside chrome using webrtc. Not supported on linuxUYVY

.

Is it possible to create a new device descriptor (/ dev / video1) that transforms / dev / video 0s UYVY

to YUYV

?

+3


source to share


1 answer


We need to create a virtual device (loopback)

git clone git@github.com:umlaeute/v4l2loopback.git
cd v4l2loopback
make
sudo make install
sudo modprobe v4l2loopback // creates /dev/video2 or /dev/videox ...

      

install gstreamer

sudo apt-get install gstreamer0.10

      

convert from sRGB to YUY2 (YUYV)



gst-launch-0.10 -v v4l2src device=/dev/video0 ! \
   ffmpegcolorspace ! \
   video/x-raw-rgb ! \
   ffmpegcolorspace ! \
   video/x-raw-yuv,format=\(fourcc\)YUY2 ! \
   v4l2sink device=/dev/video2

      

check if everything works

gst-launch v4l2src device=/dev/video2 ! xvimagesink

v4l2-ctl -d /dev/video2 --all
Driver Info (not using libv4l2):
    Driver name   : v4l2 loopback
    Card type     : Dummy video device (0x0000)
    Bus info      : v4l2loopback:0
    Driver version: 0.8.0
    Capabilities  : 0x05000001
        Video Capture
        Read/Write
        Streaming
Video input : 0 (loopback: ok)
Video output: 0 (loopback in)
Format Video Capture:
    Width/Height  : 1280/1024
    Pixel Format  : 'YUYV'
    Field         : None
    Bytes per Line: 2560
    Size Image    : 2621440
    Colorspace    : SRGB
Format Video Output:
    Width/Height  : 1280/1024
    Pixel Format  : 'YUYV'
    Field         : None
    Bytes per Line: 2560
    Size Image    : 2621440
    Colorspace    : SRGB
Streaming Parameters Video Capture:
    Frames per second: 30.000 (30000/1000)
    Read buffers     : 8
Streaming Parameters Video Output:
    Frames per second: 30.000 (30000/1000)
    Write buffers    : 8
                    keep_format (bool)   : default=0 value=0
              sustain_framerate (bool)   : default=0 value=0
                        timeout (int)    : min=0 max=100000000 step=1 default=0 value=0
               timeout_image_io (bool)   : default=0 value=0

      

This should now work in chrome via Dummy video device (0x0000)

kinect capture smilling

+2


source







All Articles