HTTP video streaming of ROS image topics
Maintainer: Julius Kammerl
- License: BSD
Bugtracker: https://github.com/RobotWebTools/ros_web_video/issues
Source: https://github.com/RobotWebTools/ros_web_video
Contents
About
This package provides a video stream of a ROS image transport topic that can be accessed via HTTP.
Parameters
~port (integer, default: 8888)- Port number to listen for http requests.
- Select video codec. At the moment only "webm" is supported.
- Maximum bitrate setting. Note that a small bitrate could significantly increase the latency due to a delayed transmission of larger intra frames.
- Framerate of encoded video. If the frame rate on the corresponding ROS topic is higher, frames will be dropped.
- Intra frame rate (group of pictures)
- With in pixels of output video
- Height in pixels of output video
- Webm coding profile (see http://www.webmproject.org/docs/encoder-parameters)
- Image transport plugin used to subscribe to ROS image topic
- Enable www file server. Note: The file server runs with user permissions and serves all accessible files.
- Root folder of www file server.
Usage
The ros_web_video 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. To connect to the node with your browser, use the following URLS:
Overview of available ROS topics: http://localhost:8888/
Webpage showing a video stream: http://localhost:8888/www/{ROS_TOPIC}
Video stream URL: http://localhost:8888/streams/{ROS_TOPIC}.webm?{PARAMETERS}
Several parameters can be configure via the video stream URL - Example: http://localhost:8888/streams/depthcloud_encoded.webm?bitrate=250000&framerate=15.
These are the parameters that can be used to configure the video feed via HTTP:
- codec
- bitrate
- framerate
- gop
- quality
- width
- height
- profile
More information on the quality and profile parameter of the VP8 codec can be found here: http://www.webmproject.org/docs/encoder-parameters
Latency
The ros_web_streamer 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/ros_web_video.
Support
Please send bug reports to the GitHub Issue Tracker. Feel free to contact us at any point with questions and comments.