Ask Your Question

How to broadcast hardware-encoded video from the logitech C920 to ROS?

asked 2018-06-26 13:16:09 -0600

amburkoff gravatar image

The task is as follows: there is a camera logitech c920 with a built-in hardware video encoder in h264, it's connected to BeagleBone Blue (but it's really not important, since instead of it there may be at least raspberry pi, though a laptop, since it's still full of ubuntu ) on it, respectively, ubuntu 16.04 with ROS Kinetic slave and transfer the video over the local wifi network to the laptop with the ROS master. How to get the video from the camera already encoded and transmit it to the ROS master without re-encoding to BeagleBone Blue?

edit retag flag offensive close merge delete


What do you mean by

without re-encoding to BeagleBone Blue

jayess gravatar image jayess  ( 2018-06-26 13:59:31 -0600 )edit

beaglebone blue to get c camera c920 is already hardware-encoded video and send it as it is in the ROS or as a web server to send it in such a form to the laptop and there somehow shove it into the ROS (to not load the processor with video encoding on the beaglebone)

amburkoff gravatar image amburkoff  ( 2018-06-26 14:23:01 -0600 )edit

I believe this is a duplicate of #q232981.

gvdhoorn gravatar image gvdhoorn  ( 2018-06-26 15:07:06 -0600 )edit

There is a note about "publishing compressed images directly" on the compressed_image_transport page (here). That could work in this case as well, but there is no default x264 transport available.

gvdhoorn gravatar image gvdhoorn  ( 2018-06-26 15:08:13 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-28 09:03:31 -0600

amburkoff gravatar image

updated 2018-06-30 04:47:21 -0600

I solved the problem in half, help send the video stream to ROS. There are two ways to receive and translate a hardware-encoded video:


and my generalizing article in Russian:

As a result, according to the second variant, we get: Broadcast over the network via Gstreamer On the receiving computer, start the receiver:

gst-launch-1.0 -v udpsrc port=6666 ! application/x-rtp, encoding-name=H264 ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! autovideosink

On the device with the camera, we start the transfer of the hardware-coded video:

gst-launch-1.0 uvch264src name=src auto-start=true src.vidsrc ! video/x-h264,width=160,height=120,framerate=30/1 ! h264parse ! rtph264pay ! udpsink host= port=6666

And send this video stream to ROS via gscam in my arcticle:

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-06-26 13:16:09 -0600

Seen: 1,067 times

Last updated: Jun 30 '18