[Documentation] [TitleIndex] [WordIndex

  Show EOL distros: 

Package Summary

HTTP Streaming of ROS Image Topics in Multiple Formats

Package Summary

HTTP Streaming of ROS Image Topics in Multiple Formats

Package Summary

HTTP Streaming of ROS Image Topics in Multiple Formats

Package Summary

HTTP Streaming of ROS Image Topics in Multiple Formats

Package Summary

HTTP Streaming of ROS Image Topics in Multiple Formats

About

This package provides a video stream of a ROS image transport topic that can be accessed via HTTP.

Parameters

~port (integer, default: 8080) ~address (string, default: 0.0.0.0) ~server_threads (integer, default: 1) ~ros_threads (integer, default: 2)

Usage

The web_video_server opens a local port and waits for incoming HTTP requests. As soon as a video stream of a ROS image topic is requested via HTTP, it subscribes to the corresponding topic and creates an instance of the video encoder. The encoded raw video packets are served to the client. Parameters can be specified by adding additional them to the query string. To connect to the node with your browser, use the following URLs:

Available URLs

Several parameters can be configure via the video stream URL - Example: http://localhost:8888/stream?topic=depthcloud_encoded&bitrate=250000&type=vp8

Image Parameters

These are the parameters that can be used to configure a stream or snapshot:

width (integer, default: original width)

height (integer, default: original height) quality (integer, default: 90) invert (none, default: )

Snapshot Parameters

These are the parameters that can be used to configure a snapshot:

quality (integer, default: 95)

Stream Parameters

These are the parameters that can be used to configure a stream:

type (string, default: mjpeg)

Additional parameters can be specified for each encoding type as described below.

Mjpeg Stream Parameters

These are the parameters that can be used to configure a mjpeg stream:

quality (integer, default: 95)

VP8 Stream Parameters

These are the parameters that can be used to configure a vp8 stream:

bitrate (integer, default: 100000)

qmin (integer, default: 10) qmax (integer, default: 42) gop (integer, default: 250) quality (string, default: realtime)

More information on the quality and profile parameter of the VP8 codec can be found here: http://www.webmproject.org/docs/encoder-parameters

Unsupported customizations

Control image subscription rate

Rate at which web_video_server subscribes a image topic depends on the publisher's publish rate. With a fast publish rate, a client host may unintentionally get busy.

As of version 0.2.1, web_video_server does not come with a feature to control the rate at which the frontend subscribes to an image topic. You can work this around on your client.

One way is to republish the image topic with a lower rate. You can use throttle from topic_tools package.

ROS-Compressed Stream Example

rostopic list output:

$ rostopic list
/usb_cam/camera_info
/usb_cam/image_raw/compressed

View compressed stream at: http://localhost:8080/stream?topic=/usb_cam/image_raw&type=ros_compressed

Latency

The web_video_server tries to minimize internal coding latency by avoiding a B-frame encoding scheme and by forcing the codec to keep its internal network buffer as small as possible. On the browser side, however, HTML5 does not allow any control of the video playback buffer. Depending on the Internet connection, the browser might cache a few seconds of video data first before starting the video playback. Best performance with respect to latency and stability has been achieve with recent versions of the Chrome browser.

Source Code

Source code is available at https://github.com/RobotWebTools/web_video_server.

Support

Please send bug reports to the GitHub Issue Tracker. Feel free to contact us at any point with questions and comments.


2019-08-17 13:24