ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Kinect v2 from image_color to /dev/video0 -- webcam streaming or other

asked 2016-12-10 19:18:33 -0600

ateator1 gravatar image

Hey there everyone. I used ROS quite a bit over summer under a different work account but now that I have learned to love ROS, I want to use it to help me stream RGB video from my Kinect v2 for xBox One. I am using Ubuntu 16.04 and ROS Kinetic I currently have libFreenect2, and iai_kinect2 working, and I can view my published ROS image topics, along with using Protonect and other test programs, but I have not found an elegant way of streaming this video as a linux video device such as /dev/video0

The brutal method I have got working is to roslaunch kinect2_bridge to publish the camera data, use image_view to view the published video in a window, then use ffmpeg with v4l2loopback to stream my entire desktop as the video device.

I have searched long and hard for a better way to do this, and I have had many ideas, but I just cant figure out how to take the image data directly from the camera and push it through as a video device so that I can have that run in the background as I use my desktop. Does anyone have any ideas or know of a better way?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-12-11 03:13:33 -0600

gvdhoorn gravatar image

See Can we publish Image topic from ROS to a virtual video device (via video from node to v4l2).

Only fork I can find of the mayfieldrobotics/ros-virtual-cam seems to be lucasw/ros-virtual-cam.

edit flag offensive delete link more


I don't know how I didnt find that. You rock, thank you! I'll check that out soon and follow up.

ateator1 gravatar image ateator1  ( 2016-12-11 08:40:16 -0600 )edit

Works almost perfectly out of the box. II can see my /dev/video0 stream on programs like "Cheese Webcam Booth" or "Skype", but not on websites such as . That's okay for my purpose, but in case I wanted to fix that issue.. any clues on where to start?

ateator1 gravatar image ateator1  ( 2016-12-11 08:59:10 -0600 )edit

Not sure. Could be a v4l vs v4l2 issue. See Adobe Flash and V4L2 webcams fi.

gvdhoorn gravatar image gvdhoorn  ( 2016-12-11 09:49:13 -0600 )edit

Your help is appreciated. Thank you

ateator1 gravatar image ateator1  ( 2016-12-11 09:59:27 -0600 )edit

Question Tools

1 follower


Asked: 2016-12-10 19:16:38 -0600

Seen: 1,859 times

Last updated: Dec 11 '16