编辑:它是now supported
我想使用webrtc在chrome内部使用kinect。 在linux 。UYVY
is not supported
是否可以创建一个新的设备描述符(/ dev / video1),将/ {/ 1}}中的/ dev / video0转换为UYVY
?
答案 0 :(得分:2)
我们需要创建一个虚拟设备(环回)
git clone git@github.com:umlaeute/v4l2loopback.git
cd v4l2loopback
make
sudo make install
sudo modprobe v4l2loopback // creates /dev/video2 or /dev/videox ...
安装gstreamer
sudo apt-get install gstreamer0.10
从sRGB转换为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
测试一切是否正常
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
现在这应该通过虚拟视频设备(0x0000)
在chrome中工作