Ask Your Question
0

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

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

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

Comments

What do you mean by

without re-encoding to BeagleBone Blue

jayess gravatar image jayess  ( 2018-06-26 13:59:31 -0500 )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 -0500 )edit

I believe this is a duplicate of #q232981.

gvdhoorn gravatar image gvdhoorn  ( 2018-06-26 15:07:06 -0500 )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 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

amburkoff gravatar image

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

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:

https://wiki.matthiasbock.net/index.p...

and

http://oz9aec.net/software/gstreamer/...

and my generalizing article in Russian:

https://habr.com/post/415567/

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=192.168.1.196 port=6666

And send this video stream to ROS via gscam in my arcticle: https://habr.com/post/415735/

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

Stats

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

Seen: 759 times

Last updated: Jun 30 '18