What is the best solution to stream video frames over the network?

asked 2018-01-28 12:40:44 -0500

wojtasso gravatar image

I use ROS Lunar and I would like to stream video frames over the network (to browser or server). What is the best option? I found packages like mjpeg_server or web_video_server, but they are unavailable under ROS Lunar. I would like to create package by roscpp, and subscribe one topic which will deliver video frames to this node. So I wonder if ROS Lunar provide other package for video streaming or I should only subscribe topic and write my handler with e.g. gstreamer?

edit retag flag offensive close merge delete

Comments

1

That highly depends on your usecase. With GST you have access to many codecs with less data rate for the same quality at the cost of higher CPU usage. Personally I use my image_to_rtsp btw. Or you could build mjpeg_server from source under Lunar.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2018-01-29 02:14:54 -0500 )edit

Thanks. I've found jpeg_streamer which is available under ROS Lunar, but I could not find any tutorial. Do you think it will be sufficient?

wojtasso gravatar image wojtasso  ( 2018-01-29 03:52:30 -0500 )edit

Thats entirely up to you to decide if it fits your usecase or not.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2018-01-29 04:45:36 -0500 )edit

You can use gscam to stream video over udp: e.g. gst-launch-1.0 videotestsrc ! x264enc ! rtph264pay config-interval=10 pt=96 ! udpsink host=127.0.0.1 port=5000

You can change the host & port of course.

Tal Ma gravatar image Tal Ma  ( 2019-10-17 07:30:28 -0500 )edit