![]() |
web_video_server package from web_video_server repoweb_video_server |
Package Summary
Tags | No category tags. |
Version | 2.0.1 |
License | BSD |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | HTTP Streaming of ROS Image Topics in Multiple Formats |
Checkout URI | https://github.com/RobotWebTools/web_video_server.git |
VCS Type | git |
VCS Version | ros2 |
Last Updated | 2025-04-23 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Błażej Sowa
Authors
- Mitchell Wills
web_video_server - HTTP Streaming of ROS Image Topics in Multiple Formats
This node provides HTTP streaming of ROS image topics in various formats, making it easy to view robot camera feeds and other image topics in a web browser without requiring special plugins or extensions.
Features
- Stream ROS image topics over HTTP in multiple formats:
- MJPEG (Motion JPEG)
- VP8 (WebM)
- VP9 (WebM)
- H264 (MP4)
- PNG streams
- ROS compressed image topics
- Adjustable quality, size, and other streaming parameters
- Web interface to browse available image topics
- Single image snapshot capability
- Support for different QoS profiles in ROS 2
Installation
Dependencies
- ROS (Noetic) or ROS 2 (Humble+)
- OpenCV
- FFmpeg/libav
- Boost
- async_web_server_cpp
Installing packages
For newer ROS2 distributions (humble, jazzy, rolling) it is possible to install web_video_server as a package:
sudo apt install ros-${ROS_DISTRO}-web-video-server
Building from Source
Create a ROS workspace if you don’t have one:
mkdir -p ~/ros_ws/src
cd ~/ros_ws/src
Clone this repository:
# ROS 2
git clone https://github.com/RobotWebTools/web_video_server.git
# ROS 1
git clone https://github.com/RobotWebTools/web_video_server.git -b ros1
Install dependencies with rosdep:
cd ~/ros_ws
rosdep update
rosdep install --from-paths src -i
Build the package and source your workspace:
colcon build --packages-select web_video_server
source install/setup.bash
Usage
Starting the Server
# ROS 1
rosrun web_video_server web_video_server
# ROS 2
ros2 run web_video_server web_video_server
Configuration
Server Configuration Parameters
Parameter | Type | Default | Possible Values | Description |
---|---|---|---|---|
port |
int | 8080 | Any valid port number | HTTP server port |
address |
string | “0.0.0.0” | Any valid IP address | HTTP server address (0.0.0.0 allows external connections) |
server_threads |
int | 1 | 1+ | Number of server threads for handling HTTP requests |
ros_threads |
int | 2 | 1+ | Number of threads for ROS message handling |
verbose |
bool | false | true, false | Enable verbose logging |
default_stream_type |
string | “mjpeg” | “mjpeg”, “vp8”, “vp9”, “h264”, “png”, “ros_compressed” | Default format for video streams |
publish_rate |
double | -1.0 | -1.0 or positive value | Rate for republishing images (-1.0 means no republishing) |
Running with Custom Parameters
You can configure the server by passing parameters via the command line:
# ROS 1
rosrun web_video_server web_video_server _port:=8081 _address:=localhost _server_threads:=4
# ROS 2
ros2 run web_video_server web_video_server --ros-args -p port:=8081 -p address:=localhost -p server_threads:=4
View Available Streams
http://localhost:8080/
The interface allows quick navigation between different topics and formats without having to manually construct URLs.
This page displays:
- All available ROS image topics currently being published
- Direct links to view each topic in different formats:
- Web page with streaming image
- Direct stream
- Single image snapshot
Stream an Image Topic
There are two ways to stream the Image, as a HTML page via
http://localhost:8080/stream_viewer?topic=/camera/image_raw
or as a HTTP multipart stream on
http://localhost:8080/stream?topic=/camera/image_raw
URL Parameters for Streaming
The following parameters can be added to the stream URL:
Parameter | Type | Default | Possible Values | Description |
---|---|---|---|---|
topic |
string | (required) | Any valid ROS image topic | The ROS image topic to stream |
type |
string | “mjpeg” | “mjpeg”, “vp8”, “vp9”, “h264”, “png”, “ros_compressed” | Stream format |
width |
int | 0 | 0+ | Width of output stream (0 = original width) |
height |
int | 0 | 0+ | Height of output stream (0 = original height) |
quality |
int | 95 | 1-100 | Quality for MJPEG and PNG streams |
bitrate |
int | 100000 | Positive integer | Bitrate for H264/VP8/VP9 streams in bits/second |
invert |
flag | not present | present/not present | Invert image when parameter is present |
default_transport |
string | “raw” | “raw”, “compressed”, “theora” | Image transport to use |
qos_profile |
string | “default” | “default”, “system_default”, “sensor_data”, “services_default” | QoS profile for ROS 2 subscribers |
Examples:
# Stream an MJPEG at 640x480 with 90% quality
http://localhost:8080/stream?topic=/camera/image_raw&type=mjpeg&width=640&height=480&quality=90
# Stream H264 with higher bitrate
http://localhost:8080/stream?topic=/camera/image_raw&type=h264&bitrate=500000
# Stream with inverted image (rotated 180°)
http://localhost:8080/stream?topic=/camera/image_raw&invert
Get a Snapshot
It is also possible to get a single image snapshot
http://localhost:8080/snapshot?topic=/camera/image_raw
URL Parameters for Snapshot
Parameter | Type | Default | Possible Values | Description |
---|---|---|---|---|
topic |
string | (required) | Any valid ROS image topic | The ROS image topic to stream |
width |
int | 0 | 0+ | Width of output picture (0 = original width) |
height |
int | 0 | 0+ | Height of output picture (0 = original height) |
quality |
int | 95 | 1-100 | Quality for JPEG snapshots |
invert |
flag | not present | present/not present | Invert image when parameter is present |
default_transport |
string | “raw” | “raw”, “compressed”, “theora” | Image transport to use |
qos_profile |
string | “default” | “default”, “system_default”, “sensor_data”, “services_default” | QoS profile for ROS 2 subscribers |
About
This project is released as part of the Robot Web Tools effort.
License
web_video_server is released with a BSD license. For full terms and conditions, see the LICENSE file.
Authors
See the AUTHORS file for a full list of contributors.
Changelog for package web_video_server
2.0.1 (2024-10-26)
- Add ros_environment to test dependencies (#166)
- Contributors: Błażej Sowa
2.0.0 (2024-10-11)
- Replace boost with std (#164)
- Add ament_cpplint test, resolve TODOs (#162)
- Add license headers to all C++ source files, update copyrights (#161)
- Add support for alpha pngs by adding per stream type decode functions (backport #106) (#163)
- Add link to /stream in stream list (backport #118) (#160)
- Add support for jpg compression format (backport #142) (#159)
- Reformat the code with uncrustify (#158)
- Use hpp extension for headers (#157)
- Fix request logging, remove global parameters (#156)
- Replace nh with node (#155)
- Fix declaring and retrieving node parameters (#154)
- Fix usage of deprecated libavcodec functions (#150)
- Use cv_bridge hpp headers when available (#149)
- Use target_link_libraries instead of ament_target_dependencies where applicable
- Don't install headers
- Add CI workflow and ament_lint tests (#148)
- Update package maintainer
- allow topic searches to continue past invalid multi-type topics. (#146)
- Add QoS profile query parameters (#133)
- Fix build for ROS2 Humble (#129)
- Fix build for ROS2 Foxy (#111)
- Contributors: Błażej Sowa, Domenic Rodriguez, Robert Brothers, Sebastian Castro, Tina Tian, TobinHall, Matthew Bries
1.0.0 (2019-09-20)
- Port to ROS 2
0.2.1 (2019-06-05)
- Restream buffered frames with minimum publish rate
(#88)
- Restream buffered frames with minimum publish rate
- Implement restreaming for ros_compressed_streamer
- Update travis config (#89)
- Fall back to mjpeg if ros_compressed is unavailable (#87)
- Contributors: Jihoon Lee, Viktor Kunovski, sfalexrog
0.2.0 (2019-01-30)
- Add "default_stream_type" parameter (#84) This allows users to specify default stream type in their .launch files. Using a "ros_compressed" stream type sometimes results in a much lower resource consumption, and having it set as a default is much nicer for end users.
- Add a workaround for MultipartStream constant busy state
(#83)
- Add a workaround for MultipartStream constant busy state
- Remove C++11 features
- lax rule for topic name (#77)
- Add PngStreamer (#74)
- fix SteadyTimer check for backported ROS versions (#71) i.e. on current kinetic
- Pkg format 2
(#68)
- use package format 2
- add missing dependency on sensor_msgs
- fixed undeclared CODEC_FLAG_GLOBAL_HEADER (#65)
- Contributors: Andreas Klintberg, Dirk Thomas, Felix Ruess, Kazuto Murase, Viktor Kunovski, sfalexrog
0.1.0 (2018-07-01)
- Avoid queuing of images on slow ethernet connection (#64)
-
use SteadyTimer (if available) for cleaning up inactive streams (#63) * use SteadyTimer for cleaning up inactive streams so that cleanup works correctly even if system time changes SteadyTimer is available since roscpp 1.13.1 * possibility to use SteadyTimer on older ROS versions when SteadyTimer has been backported to those...
- Fix segfault in libav_streamer destructor (resolves #59) (#60)
- Fix vp8 in kinetic add vp9 and h264 support
(#52)
- fix vp8 in kinetic
- add h264 and vp9 support
- Add Indigo test matrix in travis configuration (#50)
- Set image streamer as inactive if topic is not available
(#53)
- Resolves #38
- Fix Build for ubuntu 14.04
(#48)
- fix issue #47
- fix double free
- Revert "use SteadyTimer for cleaning up inactive streams (#45)" (#51) This reverts commit ae74f19ada22f288a7c7a99ada7a1b9b6037c7ce.
- use SteadyTimer for cleaning up inactive streams (#45) so that cleanup works correctly even if system time changes
- Use trusty instead of xenial. See
travis-ci/travis-ci#7260
(#49)
- Also see RobotWebTools/rosbridge_suite#311
- Contributors: Felix Ruess, James Bailey, Jihoon Lee, randoms, schallerr
0.0.7 (2017-11-20)
- Ffmpeg 3
(#43)
* Correct use of deprecated parameters
codec_context_->rc_buffer_aggressivity marked as "currently
useless", so removed codec_context_->frame_skip_threshold
access through new priv_data api
- New names for pixel formats
- AVPicture is deprecated, use AVFrame
- Switch to non-deprecated free functions
- Use new encoding api for newer versions
- codec_context is deprecated, use packet flags
- Update travis configuration to test against kinetic (#44)
- fixed misuse of remove_if (#35)
- Merge pull request #33 from achim-k/patch-1 web_video_server: fix bool function not returning This fix is required when compiling the package with [clang]{.title-ref}. Otherwise a SIGILL (Illegal instruction) is triggered.
- Contributors: Hans-Joachim Krauch, Jan, Jihoon Lee, russelhowe
0.0.6 (2017-01-17)
- Fixed topic list to display all image topics, fixing Issue #18.
- Contributors: Eric
0.0.5 (2016-10-13)
- Merge pull request #23 from iki-wgt/develop More information when server creation is failed
- Removed empty line
- More detailed exception message Programm behavior is not changed since the exception is rethrown.
- Contributors: BennyRe, Russell Toris
0.0.4 (2015-08-18)
- Merge pull request #16 from mitchellwills/compressed Adds support for streaming ROS compressed image topics without the need to reencode them
- Switch to checkout async_web_server_cpp from source
- Upgrade for change in signature of async_web_server_cpp request handler
- Added ros compressed video streamer type This directly passes the ros compressed frame data to the http socket without reencoding it
- Switched from passing image transport to passing node handle to streamer constructors
- Added default transport parameter for regular image streamers
- Contributors: Mitchell Wills, Russell Toris
0.0.3 (2015-05-07)
- added verbose flag
- Contributors: Russell Toris
0.0.2 (2015-02-20)
- Merge pull request #10 from mitchellwills/develop Added option to specify server address
- Added option to specify server address
- Merge pull request #3 from mitchellwills/develop Remove old http_server implementation and replace it with async_web_server_cpp package
- Moved from using built in http server to new async_web_server_cpp package
- Did some cleanup of streamers
- Update package.xml
- Contributors: Mitchell Wills, Russell Toris
0.0.1 (2014-10-30)
- missed travis file
- cleanup and travis build
- ROS auto-format
- Merge pull request #1 from mitchellwills/develop Initial implementation of a http web server that serves ROS image topics as multiple web compatible formats
- Made some changes suggested by catkin_lint and did some package cleanup
- Added support for libavstreamer on Ubuntu 13.10 version of libav
- Added support for specifying vp8 quality parameter
- Implemented lazy initialization for libav buffers so that output size can be infered from the first image
- Updated README
- Added vp8 support
- Broke image encodings out into different files
- Made write operations async Send timestamps for mjpeg stream
- Initial commit
- Update README.md
- Update README.md
- Update README.md
- Initial commit
- Contributors: Mitchell Wills, Russell Toris
Wiki Tutorials
Package Dependencies
System Dependencies
Name |
---|
ffmpeg |
pkg-config |
Dependant Packages
Name | Deps |
---|---|
leo_bringup |
Launch files
Messages
Services
Plugins
Recent questions tagged web_video_server at Robotics Stack Exchange
![]() |
web_video_server package from web_video_server repoweb_video_server |
Package Summary
Tags | No category tags. |
Version | 2.0.1 |
License | BSD |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | HTTP Streaming of ROS Image Topics in Multiple Formats |
Checkout URI | https://github.com/RobotWebTools/web_video_server.git |
VCS Type | git |
VCS Version | ros2 |
Last Updated | 2025-04-23 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Błażej Sowa
Authors
- Mitchell Wills
web_video_server - HTTP Streaming of ROS Image Topics in Multiple Formats
This node provides HTTP streaming of ROS image topics in various formats, making it easy to view robot camera feeds and other image topics in a web browser without requiring special plugins or extensions.
Features
- Stream ROS image topics over HTTP in multiple formats:
- MJPEG (Motion JPEG)
- VP8 (WebM)
- VP9 (WebM)
- H264 (MP4)
- PNG streams
- ROS compressed image topics
- Adjustable quality, size, and other streaming parameters
- Web interface to browse available image topics
- Single image snapshot capability
- Support for different QoS profiles in ROS 2
Installation
Dependencies
- ROS (Noetic) or ROS 2 (Humble+)
- OpenCV
- FFmpeg/libav
- Boost
- async_web_server_cpp
Installing packages
For newer ROS2 distributions (humble, jazzy, rolling) it is possible to install web_video_server as a package:
sudo apt install ros-${ROS_DISTRO}-web-video-server
Building from Source
Create a ROS workspace if you don’t have one:
mkdir -p ~/ros_ws/src
cd ~/ros_ws/src
Clone this repository:
# ROS 2
git clone https://github.com/RobotWebTools/web_video_server.git
# ROS 1
git clone https://github.com/RobotWebTools/web_video_server.git -b ros1
Install dependencies with rosdep:
cd ~/ros_ws
rosdep update
rosdep install --from-paths src -i
Build the package and source your workspace:
colcon build --packages-select web_video_server
source install/setup.bash
Usage
Starting the Server
# ROS 1
rosrun web_video_server web_video_server
# ROS 2
ros2 run web_video_server web_video_server
Configuration
Server Configuration Parameters
Parameter | Type | Default | Possible Values | Description |
---|---|---|---|---|
port |
int | 8080 | Any valid port number | HTTP server port |
address |
string | “0.0.0.0” | Any valid IP address | HTTP server address (0.0.0.0 allows external connections) |
server_threads |
int | 1 | 1+ | Number of server threads for handling HTTP requests |
ros_threads |
int | 2 | 1+ | Number of threads for ROS message handling |
verbose |
bool | false | true, false | Enable verbose logging |
default_stream_type |
string | “mjpeg” | “mjpeg”, “vp8”, “vp9”, “h264”, “png”, “ros_compressed” | Default format for video streams |
publish_rate |
double | -1.0 | -1.0 or positive value | Rate for republishing images (-1.0 means no republishing) |
Running with Custom Parameters
You can configure the server by passing parameters via the command line:
# ROS 1
rosrun web_video_server web_video_server _port:=8081 _address:=localhost _server_threads:=4
# ROS 2
ros2 run web_video_server web_video_server --ros-args -p port:=8081 -p address:=localhost -p server_threads:=4
View Available Streams
http://localhost:8080/
The interface allows quick navigation between different topics and formats without having to manually construct URLs.
This page displays:
- All available ROS image topics currently being published
- Direct links to view each topic in different formats:
- Web page with streaming image
- Direct stream
- Single image snapshot
Stream an Image Topic
There are two ways to stream the Image, as a HTML page via
http://localhost:8080/stream_viewer?topic=/camera/image_raw
or as a HTTP multipart stream on
http://localhost:8080/stream?topic=/camera/image_raw
URL Parameters for Streaming
The following parameters can be added to the stream URL:
Parameter | Type | Default | Possible Values | Description |
---|---|---|---|---|
topic |
string | (required) | Any valid ROS image topic | The ROS image topic to stream |
type |
string | “mjpeg” | “mjpeg”, “vp8”, “vp9”, “h264”, “png”, “ros_compressed” | Stream format |
width |
int | 0 | 0+ | Width of output stream (0 = original width) |
height |
int | 0 | 0+ | Height of output stream (0 = original height) |
quality |
int | 95 | 1-100 | Quality for MJPEG and PNG streams |
bitrate |
int | 100000 | Positive integer | Bitrate for H264/VP8/VP9 streams in bits/second |
invert |
flag | not present | present/not present | Invert image when parameter is present |
default_transport |
string | “raw” | “raw”, “compressed”, “theora” | Image transport to use |
qos_profile |
string | “default” | “default”, “system_default”, “sensor_data”, “services_default” | QoS profile for ROS 2 subscribers |
Examples:
# Stream an MJPEG at 640x480 with 90% quality
http://localhost:8080/stream?topic=/camera/image_raw&type=mjpeg&width=640&height=480&quality=90
# Stream H264 with higher bitrate
http://localhost:8080/stream?topic=/camera/image_raw&type=h264&bitrate=500000
# Stream with inverted image (rotated 180°)
http://localhost:8080/stream?topic=/camera/image_raw&invert
Get a Snapshot
It is also possible to get a single image snapshot
http://localhost:8080/snapshot?topic=/camera/image_raw
URL Parameters for Snapshot
Parameter | Type | Default | Possible Values | Description |
---|---|---|---|---|
topic |
string | (required) | Any valid ROS image topic | The ROS image topic to stream |
width |
int | 0 | 0+ | Width of output picture (0 = original width) |
height |
int | 0 | 0+ | Height of output picture (0 = original height) |
quality |
int | 95 | 1-100 | Quality for JPEG snapshots |
invert |
flag | not present | present/not present | Invert image when parameter is present |
default_transport |
string | “raw” | “raw”, “compressed”, “theora” | Image transport to use |
qos_profile |
string | “default” | “default”, “system_default”, “sensor_data”, “services_default” | QoS profile for ROS 2 subscribers |
About
This project is released as part of the Robot Web Tools effort.
License
web_video_server is released with a BSD license. For full terms and conditions, see the LICENSE file.
Authors
See the AUTHORS file for a full list of contributors.
Changelog for package web_video_server
2.0.1 (2024-10-26)
- Add ros_environment to test dependencies (#166)
- Contributors: Błażej Sowa
2.0.0 (2024-10-11)
- Replace boost with std (#164)
- Add ament_cpplint test, resolve TODOs (#162)
- Add license headers to all C++ source files, update copyrights (#161)
- Add support for alpha pngs by adding per stream type decode functions (backport #106) (#163)
- Add link to /stream in stream list (backport #118) (#160)
- Add support for jpg compression format (backport #142) (#159)
- Reformat the code with uncrustify (#158)
- Use hpp extension for headers (#157)
- Fix request logging, remove global parameters (#156)
- Replace nh with node (#155)
- Fix declaring and retrieving node parameters (#154)
- Fix usage of deprecated libavcodec functions (#150)
- Use cv_bridge hpp headers when available (#149)
- Use target_link_libraries instead of ament_target_dependencies where applicable
- Don't install headers
- Add CI workflow and ament_lint tests (#148)
- Update package maintainer
- allow topic searches to continue past invalid multi-type topics. (#146)
- Add QoS profile query parameters (#133)
- Fix build for ROS2 Humble (#129)
- Fix build for ROS2 Foxy (#111)
- Contributors: Błażej Sowa, Domenic Rodriguez, Robert Brothers, Sebastian Castro, Tina Tian, TobinHall, Matthew Bries
1.0.0 (2019-09-20)
- Port to ROS 2
0.2.1 (2019-06-05)
- Restream buffered frames with minimum publish rate
(#88)
- Restream buffered frames with minimum publish rate
- Implement restreaming for ros_compressed_streamer
- Update travis config (#89)
- Fall back to mjpeg if ros_compressed is unavailable (#87)
- Contributors: Jihoon Lee, Viktor Kunovski, sfalexrog
0.2.0 (2019-01-30)
- Add "default_stream_type" parameter (#84) This allows users to specify default stream type in their .launch files. Using a "ros_compressed" stream type sometimes results in a much lower resource consumption, and having it set as a default is much nicer for end users.
- Add a workaround for MultipartStream constant busy state
(#83)
- Add a workaround for MultipartStream constant busy state
- Remove C++11 features
- lax rule for topic name (#77)
- Add PngStreamer (#74)
- fix SteadyTimer check for backported ROS versions (#71) i.e. on current kinetic
- Pkg format 2
(#68)
- use package format 2
- add missing dependency on sensor_msgs
- fixed undeclared CODEC_FLAG_GLOBAL_HEADER (#65)
- Contributors: Andreas Klintberg, Dirk Thomas, Felix Ruess, Kazuto Murase, Viktor Kunovski, sfalexrog
0.1.0 (2018-07-01)
- Avoid queuing of images on slow ethernet connection (#64)
-
use SteadyTimer (if available) for cleaning up inactive streams (#63) * use SteadyTimer for cleaning up inactive streams so that cleanup works correctly even if system time changes SteadyTimer is available since roscpp 1.13.1 * possibility to use SteadyTimer on older ROS versions when SteadyTimer has been backported to those...
- Fix segfault in libav_streamer destructor (resolves #59) (#60)
- Fix vp8 in kinetic add vp9 and h264 support
(#52)
- fix vp8 in kinetic
- add h264 and vp9 support
- Add Indigo test matrix in travis configuration (#50)
- Set image streamer as inactive if topic is not available
(#53)
- Resolves #38
- Fix Build for ubuntu 14.04
(#48)
- fix issue #47
- fix double free
- Revert "use SteadyTimer for cleaning up inactive streams (#45)" (#51) This reverts commit ae74f19ada22f288a7c7a99ada7a1b9b6037c7ce.
- use SteadyTimer for cleaning up inactive streams (#45) so that cleanup works correctly even if system time changes
- Use trusty instead of xenial. See
travis-ci/travis-ci#7260
(#49)
- Also see RobotWebTools/rosbridge_suite#311
- Contributors: Felix Ruess, James Bailey, Jihoon Lee, randoms, schallerr
0.0.7 (2017-11-20)
- Ffmpeg 3
(#43)
* Correct use of deprecated parameters
codec_context_->rc_buffer_aggressivity marked as "currently
useless", so removed codec_context_->frame_skip_threshold
access through new priv_data api
- New names for pixel formats
- AVPicture is deprecated, use AVFrame
- Switch to non-deprecated free functions
- Use new encoding api for newer versions
- codec_context is deprecated, use packet flags
- Update travis configuration to test against kinetic (#44)
- fixed misuse of remove_if (#35)
- Merge pull request #33 from achim-k/patch-1 web_video_server: fix bool function not returning This fix is required when compiling the package with [clang]{.title-ref}. Otherwise a SIGILL (Illegal instruction) is triggered.
- Contributors: Hans-Joachim Krauch, Jan, Jihoon Lee, russelhowe
0.0.6 (2017-01-17)
- Fixed topic list to display all image topics, fixing Issue #18.
- Contributors: Eric
0.0.5 (2016-10-13)
- Merge pull request #23 from iki-wgt/develop More information when server creation is failed
- Removed empty line
- More detailed exception message Programm behavior is not changed since the exception is rethrown.
- Contributors: BennyRe, Russell Toris
0.0.4 (2015-08-18)
- Merge pull request #16 from mitchellwills/compressed Adds support for streaming ROS compressed image topics without the need to reencode them
- Switch to checkout async_web_server_cpp from source
- Upgrade for change in signature of async_web_server_cpp request handler
- Added ros compressed video streamer type This directly passes the ros compressed frame data to the http socket without reencoding it
- Switched from passing image transport to passing node handle to streamer constructors
- Added default transport parameter for regular image streamers
- Contributors: Mitchell Wills, Russell Toris
0.0.3 (2015-05-07)
- added verbose flag
- Contributors: Russell Toris
0.0.2 (2015-02-20)
- Merge pull request #10 from mitchellwills/develop Added option to specify server address
- Added option to specify server address
- Merge pull request #3 from mitchellwills/develop Remove old http_server implementation and replace it with async_web_server_cpp package
- Moved from using built in http server to new async_web_server_cpp package
- Did some cleanup of streamers
- Update package.xml
- Contributors: Mitchell Wills, Russell Toris
0.0.1 (2014-10-30)
- missed travis file
- cleanup and travis build
- ROS auto-format
- Merge pull request #1 from mitchellwills/develop Initial implementation of a http web server that serves ROS image topics as multiple web compatible formats
- Made some changes suggested by catkin_lint and did some package cleanup
- Added support for libavstreamer on Ubuntu 13.10 version of libav
- Added support for specifying vp8 quality parameter
- Implemented lazy initialization for libav buffers so that output size can be infered from the first image
- Updated README
- Added vp8 support
- Broke image encodings out into different files
- Made write operations async Send timestamps for mjpeg stream
- Initial commit
- Update README.md
- Update README.md
- Update README.md
- Initial commit
- Contributors: Mitchell Wills, Russell Toris
Wiki Tutorials
Package Dependencies
System Dependencies
Name |
---|
ffmpeg |
pkg-config |
Dependant Packages
Name | Deps |
---|---|
leo_bringup |
Launch files
Messages
Services
Plugins
Recent questions tagged web_video_server at Robotics Stack Exchange
![]() |
web_video_server package from web_video_server repoweb_video_server |
Package Summary
Tags | No category tags. |
Version | 2.0.1 |
License | BSD |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | HTTP Streaming of ROS Image Topics in Multiple Formats |
Checkout URI | https://github.com/RobotWebTools/web_video_server.git |
VCS Type | git |
VCS Version | ros2 |
Last Updated | 2025-04-23 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Błażej Sowa
Authors
- Mitchell Wills
web_video_server - HTTP Streaming of ROS Image Topics in Multiple Formats
This node provides HTTP streaming of ROS image topics in various formats, making it easy to view robot camera feeds and other image topics in a web browser without requiring special plugins or extensions.
Features
- Stream ROS image topics over HTTP in multiple formats:
- MJPEG (Motion JPEG)
- VP8 (WebM)
- VP9 (WebM)
- H264 (MP4)
- PNG streams
- ROS compressed image topics
- Adjustable quality, size, and other streaming parameters
- Web interface to browse available image topics
- Single image snapshot capability
- Support for different QoS profiles in ROS 2
Installation
Dependencies
- ROS (Noetic) or ROS 2 (Humble+)
- OpenCV
- FFmpeg/libav
- Boost
- async_web_server_cpp
Installing packages
For newer ROS2 distributions (humble, jazzy, rolling) it is possible to install web_video_server as a package:
sudo apt install ros-${ROS_DISTRO}-web-video-server
Building from Source
Create a ROS workspace if you don’t have one:
mkdir -p ~/ros_ws/src
cd ~/ros_ws/src
Clone this repository:
# ROS 2
git clone https://github.com/RobotWebTools/web_video_server.git
# ROS 1
git clone https://github.com/RobotWebTools/web_video_server.git -b ros1
Install dependencies with rosdep:
cd ~/ros_ws
rosdep update
rosdep install --from-paths src -i
Build the package and source your workspace:
colcon build --packages-select web_video_server
source install/setup.bash
Usage
Starting the Server
# ROS 1
rosrun web_video_server web_video_server
# ROS 2
ros2 run web_video_server web_video_server
Configuration
Server Configuration Parameters
Parameter | Type | Default | Possible Values | Description |
---|---|---|---|---|
port |
int | 8080 | Any valid port number | HTTP server port |
address |
string | “0.0.0.0” | Any valid IP address | HTTP server address (0.0.0.0 allows external connections) |
server_threads |
int | 1 | 1+ | Number of server threads for handling HTTP requests |
ros_threads |
int | 2 | 1+ | Number of threads for ROS message handling |
verbose |
bool | false | true, false | Enable verbose logging |
default_stream_type |
string | “mjpeg” | “mjpeg”, “vp8”, “vp9”, “h264”, “png”, “ros_compressed” | Default format for video streams |
publish_rate |
double | -1.0 | -1.0 or positive value | Rate for republishing images (-1.0 means no republishing) |
Running with Custom Parameters
You can configure the server by passing parameters via the command line:
# ROS 1
rosrun web_video_server web_video_server _port:=8081 _address:=localhost _server_threads:=4
# ROS 2
ros2 run web_video_server web_video_server --ros-args -p port:=8081 -p address:=localhost -p server_threads:=4
View Available Streams
http://localhost:8080/
The interface allows quick navigation between different topics and formats without having to manually construct URLs.
This page displays:
- All available ROS image topics currently being published
- Direct links to view each topic in different formats:
- Web page with streaming image
- Direct stream
- Single image snapshot
Stream an Image Topic
There are two ways to stream the Image, as a HTML page via
http://localhost:8080/stream_viewer?topic=/camera/image_raw
or as a HTTP multipart stream on
http://localhost:8080/stream?topic=/camera/image_raw
URL Parameters for Streaming
The following parameters can be added to the stream URL:
Parameter | Type | Default | Possible Values | Description |
---|---|---|---|---|
topic |
string | (required) | Any valid ROS image topic | The ROS image topic to stream |
type |
string | “mjpeg” | “mjpeg”, “vp8”, “vp9”, “h264”, “png”, “ros_compressed” | Stream format |
width |
int | 0 | 0+ | Width of output stream (0 = original width) |
height |
int | 0 | 0+ | Height of output stream (0 = original height) |
quality |
int | 95 | 1-100 | Quality for MJPEG and PNG streams |
bitrate |
int | 100000 | Positive integer | Bitrate for H264/VP8/VP9 streams in bits/second |
invert |
flag | not present | present/not present | Invert image when parameter is present |
default_transport |
string | “raw” | “raw”, “compressed”, “theora” | Image transport to use |
qos_profile |
string | “default” | “default”, “system_default”, “sensor_data”, “services_default” | QoS profile for ROS 2 subscribers |
Examples:
# Stream an MJPEG at 640x480 with 90% quality
http://localhost:8080/stream?topic=/camera/image_raw&type=mjpeg&width=640&height=480&quality=90
# Stream H264 with higher bitrate
http://localhost:8080/stream?topic=/camera/image_raw&type=h264&bitrate=500000
# Stream with inverted image (rotated 180°)
http://localhost:8080/stream?topic=/camera/image_raw&invert
Get a Snapshot
It is also possible to get a single image snapshot
http://localhost:8080/snapshot?topic=/camera/image_raw
URL Parameters for Snapshot
Parameter | Type | Default | Possible Values | Description |
---|---|---|---|---|
topic |
string | (required) | Any valid ROS image topic | The ROS image topic to stream |
width |
int | 0 | 0+ | Width of output picture (0 = original width) |
height |
int | 0 | 0+ | Height of output picture (0 = original height) |
quality |
int | 95 | 1-100 | Quality for JPEG snapshots |
invert |
flag | not present | present/not present | Invert image when parameter is present |
default_transport |
string | “raw” | “raw”, “compressed”, “theora” | Image transport to use |
qos_profile |
string | “default” | “default”, “system_default”, “sensor_data”, “services_default” | QoS profile for ROS 2 subscribers |
About
This project is released as part of the Robot Web Tools effort.
License
web_video_server is released with a BSD license. For full terms and conditions, see the LICENSE file.
Authors
See the AUTHORS file for a full list of contributors.
Changelog for package web_video_server
2.0.1 (2024-10-26)
- Add ros_environment to test dependencies (#166)
- Contributors: Błażej Sowa
2.0.0 (2024-10-11)
- Replace boost with std (#164)
- Add ament_cpplint test, resolve TODOs (#162)
- Add license headers to all C++ source files, update copyrights (#161)
- Add support for alpha pngs by adding per stream type decode functions (backport #106) (#163)
- Add link to /stream in stream list (backport #118) (#160)
- Add support for jpg compression format (backport #142) (#159)
- Reformat the code with uncrustify (#158)
- Use hpp extension for headers (#157)
- Fix request logging, remove global parameters (#156)
- Replace nh with node (#155)
- Fix declaring and retrieving node parameters (#154)
- Fix usage of deprecated libavcodec functions (#150)
- Use cv_bridge hpp headers when available (#149)
- Use target_link_libraries instead of ament_target_dependencies where applicable
- Don't install headers
- Add CI workflow and ament_lint tests (#148)
- Update package maintainer
- allow topic searches to continue past invalid multi-type topics. (#146)
- Add QoS profile query parameters (#133)
- Fix build for ROS2 Humble (#129)
- Fix build for ROS2 Foxy (#111)
- Contributors: Błażej Sowa, Domenic Rodriguez, Robert Brothers, Sebastian Castro, Tina Tian, TobinHall, Matthew Bries
1.0.0 (2019-09-20)
- Port to ROS 2
0.2.1 (2019-06-05)
- Restream buffered frames with minimum publish rate
(#88)
- Restream buffered frames with minimum publish rate
- Implement restreaming for ros_compressed_streamer
- Update travis config (#89)
- Fall back to mjpeg if ros_compressed is unavailable (#87)
- Contributors: Jihoon Lee, Viktor Kunovski, sfalexrog
0.2.0 (2019-01-30)
- Add "default_stream_type" parameter (#84) This allows users to specify default stream type in their .launch files. Using a "ros_compressed" stream type sometimes results in a much lower resource consumption, and having it set as a default is much nicer for end users.
- Add a workaround for MultipartStream constant busy state
(#83)
- Add a workaround for MultipartStream constant busy state
- Remove C++11 features
- lax rule for topic name (#77)
- Add PngStreamer (#74)
- fix SteadyTimer check for backported ROS versions (#71) i.e. on current kinetic
- Pkg format 2
(#68)
- use package format 2
- add missing dependency on sensor_msgs
- fixed undeclared CODEC_FLAG_GLOBAL_HEADER (#65)
- Contributors: Andreas Klintberg, Dirk Thomas, Felix Ruess, Kazuto Murase, Viktor Kunovski, sfalexrog
0.1.0 (2018-07-01)
- Avoid queuing of images on slow ethernet connection (#64)
-
use SteadyTimer (if available) for cleaning up inactive streams (#63) * use SteadyTimer for cleaning up inactive streams so that cleanup works correctly even if system time changes SteadyTimer is available since roscpp 1.13.1 * possibility to use SteadyTimer on older ROS versions when SteadyTimer has been backported to those...
- Fix segfault in libav_streamer destructor (resolves #59) (#60)
- Fix vp8 in kinetic add vp9 and h264 support
(#52)
- fix vp8 in kinetic
- add h264 and vp9 support
- Add Indigo test matrix in travis configuration (#50)
- Set image streamer as inactive if topic is not available
(#53)
- Resolves #38
- Fix Build for ubuntu 14.04
(#48)
- fix issue #47
- fix double free
- Revert "use SteadyTimer for cleaning up inactive streams (#45)" (#51) This reverts commit ae74f19ada22f288a7c7a99ada7a1b9b6037c7ce.
- use SteadyTimer for cleaning up inactive streams (#45) so that cleanup works correctly even if system time changes
- Use trusty instead of xenial. See
travis-ci/travis-ci#7260
(#49)
- Also see RobotWebTools/rosbridge_suite#311
- Contributors: Felix Ruess, James Bailey, Jihoon Lee, randoms, schallerr
0.0.7 (2017-11-20)
- Ffmpeg 3
(#43)
* Correct use of deprecated parameters
codec_context_->rc_buffer_aggressivity marked as "currently
useless", so removed codec_context_->frame_skip_threshold
access through new priv_data api
- New names for pixel formats
- AVPicture is deprecated, use AVFrame
- Switch to non-deprecated free functions
- Use new encoding api for newer versions
- codec_context is deprecated, use packet flags
- Update travis configuration to test against kinetic (#44)
- fixed misuse of remove_if (#35)
- Merge pull request #33 from achim-k/patch-1 web_video_server: fix bool function not returning This fix is required when compiling the package with [clang]{.title-ref}. Otherwise a SIGILL (Illegal instruction) is triggered.
- Contributors: Hans-Joachim Krauch, Jan, Jihoon Lee, russelhowe
0.0.6 (2017-01-17)
- Fixed topic list to display all image topics, fixing Issue #18.
- Contributors: Eric
0.0.5 (2016-10-13)
- Merge pull request #23 from iki-wgt/develop More information when server creation is failed
- Removed empty line
- More detailed exception message Programm behavior is not changed since the exception is rethrown.
- Contributors: BennyRe, Russell Toris
0.0.4 (2015-08-18)
- Merge pull request #16 from mitchellwills/compressed Adds support for streaming ROS compressed image topics without the need to reencode them
- Switch to checkout async_web_server_cpp from source
- Upgrade for change in signature of async_web_server_cpp request handler
- Added ros compressed video streamer type This directly passes the ros compressed frame data to the http socket without reencoding it
- Switched from passing image transport to passing node handle to streamer constructors
- Added default transport parameter for regular image streamers
- Contributors: Mitchell Wills, Russell Toris
0.0.3 (2015-05-07)
- added verbose flag
- Contributors: Russell Toris
0.0.2 (2015-02-20)
- Merge pull request #10 from mitchellwills/develop Added option to specify server address
- Added option to specify server address
- Merge pull request #3 from mitchellwills/develop Remove old http_server implementation and replace it with async_web_server_cpp package
- Moved from using built in http server to new async_web_server_cpp package
- Did some cleanup of streamers
- Update package.xml
- Contributors: Mitchell Wills, Russell Toris
0.0.1 (2014-10-30)
- missed travis file
- cleanup and travis build
- ROS auto-format
- Merge pull request #1 from mitchellwills/develop Initial implementation of a http web server that serves ROS image topics as multiple web compatible formats
- Made some changes suggested by catkin_lint and did some package cleanup
- Added support for libavstreamer on Ubuntu 13.10 version of libav
- Added support for specifying vp8 quality parameter
- Implemented lazy initialization for libav buffers so that output size can be infered from the first image
- Updated README
- Added vp8 support
- Broke image encodings out into different files
- Made write operations async Send timestamps for mjpeg stream
- Initial commit
- Update README.md
- Update README.md
- Update README.md
- Initial commit
- Contributors: Mitchell Wills, Russell Toris
Wiki Tutorials
Package Dependencies
System Dependencies
Name |
---|
ffmpeg |
pkg-config |
Dependant Packages
Name | Deps |
---|---|
leo_bringup |
Launch files
Messages
Services
Plugins
Recent questions tagged web_video_server at Robotics Stack Exchange
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | BSD |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | Navigator, our self-driving vehicle software stack |
Checkout URI | https://github.com/nova-utd/navigator.git |
VCS Type | git |
VCS Version | dev |
Last Updated | 2025-04-11 |
Dev Status | UNKNOWN |
CI status | No Continuous Integration |
Released | UNRELEASED |
Tags | robotics ros autonomous-driving autonomous-vehicles self-driving ros2 |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Russell Toris
Authors
- Mitchell Wills
web_video_server
HTTP Streaming of ROS Image Topics in Multiple Formats
This node combines the capabilities of ros_web_video and mjpeg_server into a single node.
For full documentation, see the ROS wiki.
Doxygen files can be found on the ROS wiki.
This project is released as part of the Robot Web Tools effort.
License
web_video_server is released with a BSD license. For full terms and conditions, see the LICENSE file.
Authors
See the AUTHORS file for a full list of contributors.
Changelog for package web_video_server
1.0.0 (2019-09-20)
- Port to ROS 2
0.2.1 (2019-06-05)
- Restream buffered frames with minimum publish rate
(#88)
- Restream buffered frames with minimum publish rate
- Implement restreaming for ros_compressed_streamer
- Update travis config (#89)
- Fall back to mjpeg if ros_compressed is unavailable (#87)
- Contributors: Jihoon Lee, Viktor Kunovski, sfalexrog
0.2.0 (2019-01-30)
- Add "default_stream_type" parameter (#84) This allows users to specify default stream type in their .launch files. Using a "ros_compressed" stream type sometimes results in a much lower resource consumption, and having it set as a default is much nicer for end users.
- Add a workaround for MultipartStream constant busy state
(#83)
- Add a workaround for MultipartStream constant busy state
- Remove C++11 features
- lax rule for topic name (#77)
- Add PngStreamer (#74)
- fix SteadyTimer check for backported ROS versions (#71) i.e. on current kinetic
- Pkg format 2
(#68)
- use package format 2
- add missing dependency on sensor_msgs
- fixed undeclared CODEC_FLAG_GLOBAL_HEADER (#65)
- Contributors: Andreas Klintberg, Dirk Thomas, Felix Ruess, Kazuto Murase, Viktor Kunovski, sfalexrog
0.1.0 (2018-07-01)
- Avoid queuing of images on slow ethernet connection (#64)
-
use SteadyTimer (if available) for cleaning up inactive streams (#63) * use SteadyTimer for cleaning up inactive streams so that cleanup works correctly even if system time changes SteadyTimer is available since roscpp 1.13.1 * possibility to use SteadyTimer on older ROS versions when SteadyTimer has been backported to those...
- Fix segfault in libav_streamer destructor (resolves #59) (#60)
- Fix vp8 in kinetic add vp9 and h264 support
(#52)
- fix vp8 in kinetic
- add h264 and vp9 support
- Add Indigo test matrix in travis configuration (#50)
- Set image streamer as inactive if topic is not available
(#53)
- Resolves #38
- Fix Build for ubuntu 14.04
(#48)
- fix issue #47
- fix double free
- Revert "use SteadyTimer for cleaning up inactive streams (#45)" (#51) This reverts commit ae74f19ada22f288a7c7a99ada7a1b9b6037c7ce.
- use SteadyTimer for cleaning up inactive streams (#45) so that cleanup works correctly even if system time changes
- Use trusty instead of xenial. See
travis-ci/travis-ci#7260
(#49)
- Also see RobotWebTools/rosbridge_suite#311
- Contributors: Felix Ruess, James Bailey, Jihoon Lee, randoms, schallerr
0.0.7 (2017-11-20)
- Ffmpeg 3
(#43)
* Correct use of deprecated parameters
codec_context_->rc_buffer_aggressivity marked as "currently
useless", so removed codec_context_->frame_skip_threshold
access through new priv_data api
- New names for pixel formats
- AVPicture is deprecated, use AVFrame
- Switch to non-deprecated free functions
- Use new encoding api for newer versions
- codec_context is deprecated, use packet flags
- Update travis configuration to test against kinetic (#44)
- fixed misuse of remove_if (#35)
- Merge pull request #33 from achim-k/patch-1 web_video_server: fix bool function not returning This fix is required when compiling the package with [clang]{.title-ref}. Otherwise a SIGILL (Illegal instruction) is triggered.
- Contributors: Hans-Joachim Krauch, Jan, Jihoon Lee, russelhowe
0.0.6 (2017-01-17)
- Fixed topic list to display all image topics, fixing Issue #18.
- Contributors: Eric
0.0.5 (2016-10-13)
- Merge pull request #23 from iki-wgt/develop More information when server creation is failed
- Removed empty line
- More detailed exception message Programm behavior is not changed since the exception is rethrown.
- Contributors: BennyRe, Russell Toris
0.0.4 (2015-08-18)
- Merge pull request #16 from mitchellwills/compressed Adds support for streaming ROS compressed image topics without the need to reencode them
- Switch to checkout async_web_server_cpp from source
- Upgrade for change in signature of async_web_server_cpp request handler
- Added ros compressed video streamer type This directly passes the ros compressed frame data to the http socket without reencoding it
- Switched from passing image transport to passing node handle to streamer constructors
- Added default transport parameter for regular image streamers
- Contributors: Mitchell Wills, Russell Toris
0.0.3 (2015-05-07)
- added verbose flag
- Contributors: Russell Toris
0.0.2 (2015-02-20)
- Merge pull request #10 from mitchellwills/develop Added option to specify server address
- Added option to specify server address
- Merge pull request #3 from mitchellwills/develop Remove old http_server implementation and replace it with async_web_server_cpp package
- Moved from using built in http server to new async_web_server_cpp package
- Did some cleanup of streamers
- Update package.xml
- Contributors: Mitchell Wills, Russell Toris
0.0.1 (2014-10-30)
- missed travis file
- cleanup and travis build
- ROS auto-format
- Merge pull request #1 from mitchellwills/develop Initial implementation of a http web server that serves ROS image topics as multiple web compatible formats
- Made some changes suggested by catkin_lint and did some package cleanup
- Added support for libavstreamer on Ubuntu 13.10 version of libav
- Added support for specifying vp8 quality parameter
- Implemented lazy initialization for libav buffers so that output size can be infered from the first image
- Updated README
- Added vp8 support
- Broke image encodings out into different files
- Made write operations async Send timestamps for mjpeg stream
- Initial commit
- Update README.md
- Update README.md
- Update README.md
- Initial commit
- Contributors: Mitchell Wills, Russell Toris
Wiki Tutorials
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged web_video_server at Robotics Stack Exchange
![]() |
web_video_server package from web_video_server repoweb_video_server |
Package Summary
Tags | No category tags. |
Version | 2.0.1 |
License | BSD |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | HTTP Streaming of ROS Image Topics in Multiple Formats |
Checkout URI | https://github.com/RobotWebTools/web_video_server.git |
VCS Type | git |
VCS Version | ros2 |
Last Updated | 2025-04-23 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Błażej Sowa
Authors
- Mitchell Wills
web_video_server - HTTP Streaming of ROS Image Topics in Multiple Formats
This node provides HTTP streaming of ROS image topics in various formats, making it easy to view robot camera feeds and other image topics in a web browser without requiring special plugins or extensions.
Features
- Stream ROS image topics over HTTP in multiple formats:
- MJPEG (Motion JPEG)
- VP8 (WebM)
- VP9 (WebM)
- H264 (MP4)
- PNG streams
- ROS compressed image topics
- Adjustable quality, size, and other streaming parameters
- Web interface to browse available image topics
- Single image snapshot capability
- Support for different QoS profiles in ROS 2
Installation
Dependencies
- ROS (Noetic) or ROS 2 (Humble+)
- OpenCV
- FFmpeg/libav
- Boost
- async_web_server_cpp
Installing packages
For newer ROS2 distributions (humble, jazzy, rolling) it is possible to install web_video_server as a package:
sudo apt install ros-${ROS_DISTRO}-web-video-server
Building from Source
Create a ROS workspace if you don’t have one:
mkdir -p ~/ros_ws/src
cd ~/ros_ws/src
Clone this repository:
# ROS 2
git clone https://github.com/RobotWebTools/web_video_server.git
# ROS 1
git clone https://github.com/RobotWebTools/web_video_server.git -b ros1
Install dependencies with rosdep:
cd ~/ros_ws
rosdep update
rosdep install --from-paths src -i
Build the package and source your workspace:
colcon build --packages-select web_video_server
source install/setup.bash
Usage
Starting the Server
# ROS 1
rosrun web_video_server web_video_server
# ROS 2
ros2 run web_video_server web_video_server
Configuration
Server Configuration Parameters
Parameter | Type | Default | Possible Values | Description |
---|---|---|---|---|
port |
int | 8080 | Any valid port number | HTTP server port |
address |
string | “0.0.0.0” | Any valid IP address | HTTP server address (0.0.0.0 allows external connections) |
server_threads |
int | 1 | 1+ | Number of server threads for handling HTTP requests |
ros_threads |
int | 2 | 1+ | Number of threads for ROS message handling |
verbose |
bool | false | true, false | Enable verbose logging |
default_stream_type |
string | “mjpeg” | “mjpeg”, “vp8”, “vp9”, “h264”, “png”, “ros_compressed” | Default format for video streams |
publish_rate |
double | -1.0 | -1.0 or positive value | Rate for republishing images (-1.0 means no republishing) |
Running with Custom Parameters
You can configure the server by passing parameters via the command line:
# ROS 1
rosrun web_video_server web_video_server _port:=8081 _address:=localhost _server_threads:=4
# ROS 2
ros2 run web_video_server web_video_server --ros-args -p port:=8081 -p address:=localhost -p server_threads:=4
View Available Streams
http://localhost:8080/
The interface allows quick navigation between different topics and formats without having to manually construct URLs.
This page displays:
- All available ROS image topics currently being published
- Direct links to view each topic in different formats:
- Web page with streaming image
- Direct stream
- Single image snapshot
Stream an Image Topic
There are two ways to stream the Image, as a HTML page via
http://localhost:8080/stream_viewer?topic=/camera/image_raw
or as a HTTP multipart stream on
http://localhost:8080/stream?topic=/camera/image_raw
URL Parameters for Streaming
The following parameters can be added to the stream URL:
Parameter | Type | Default | Possible Values | Description |
---|---|---|---|---|
topic |
string | (required) | Any valid ROS image topic | The ROS image topic to stream |
type |
string | “mjpeg” | “mjpeg”, “vp8”, “vp9”, “h264”, “png”, “ros_compressed” | Stream format |
width |
int | 0 | 0+ | Width of output stream (0 = original width) |
height |
int | 0 | 0+ | Height of output stream (0 = original height) |
quality |
int | 95 | 1-100 | Quality for MJPEG and PNG streams |
bitrate |
int | 100000 | Positive integer | Bitrate for H264/VP8/VP9 streams in bits/second |
invert |
flag | not present | present/not present | Invert image when parameter is present |
default_transport |
string | “raw” | “raw”, “compressed”, “theora” | Image transport to use |
qos_profile |
string | “default” | “default”, “system_default”, “sensor_data”, “services_default” | QoS profile for ROS 2 subscribers |
Examples:
# Stream an MJPEG at 640x480 with 90% quality
http://localhost:8080/stream?topic=/camera/image_raw&type=mjpeg&width=640&height=480&quality=90
# Stream H264 with higher bitrate
http://localhost:8080/stream?topic=/camera/image_raw&type=h264&bitrate=500000
# Stream with inverted image (rotated 180°)
http://localhost:8080/stream?topic=/camera/image_raw&invert
Get a Snapshot
It is also possible to get a single image snapshot
http://localhost:8080/snapshot?topic=/camera/image_raw
URL Parameters for Snapshot
Parameter | Type | Default | Possible Values | Description |
---|---|---|---|---|
topic |
string | (required) | Any valid ROS image topic | The ROS image topic to stream |
width |
int | 0 | 0+ | Width of output picture (0 = original width) |
height |
int | 0 | 0+ | Height of output picture (0 = original height) |
quality |
int | 95 | 1-100 | Quality for JPEG snapshots |
invert |
flag | not present | present/not present | Invert image when parameter is present |
default_transport |
string | “raw” | “raw”, “compressed”, “theora” | Image transport to use |
qos_profile |
string | “default” | “default”, “system_default”, “sensor_data”, “services_default” | QoS profile for ROS 2 subscribers |
About
This project is released as part of the Robot Web Tools effort.
License
web_video_server is released with a BSD license. For full terms and conditions, see the LICENSE file.
Authors
See the AUTHORS file for a full list of contributors.
Changelog for package web_video_server
2.0.1 (2024-10-26)
- Add ros_environment to test dependencies (#166)
- Contributors: Błażej Sowa
2.0.0 (2024-10-11)
- Replace boost with std (#164)
- Add ament_cpplint test, resolve TODOs (#162)
- Add license headers to all C++ source files, update copyrights (#161)
- Add support for alpha pngs by adding per stream type decode functions (backport #106) (#163)
- Add link to /stream in stream list (backport #118) (#160)
- Add support for jpg compression format (backport #142) (#159)
- Reformat the code with uncrustify (#158)
- Use hpp extension for headers (#157)
- Fix request logging, remove global parameters (#156)
- Replace nh with node (#155)
- Fix declaring and retrieving node parameters (#154)
- Fix usage of deprecated libavcodec functions (#150)
- Use cv_bridge hpp headers when available (#149)
- Use target_link_libraries instead of ament_target_dependencies where applicable
- Don't install headers
- Add CI workflow and ament_lint tests (#148)
- Update package maintainer
- allow topic searches to continue past invalid multi-type topics. (#146)
- Add QoS profile query parameters (#133)
- Fix build for ROS2 Humble (#129)
- Fix build for ROS2 Foxy (#111)
- Contributors: Błażej Sowa, Domenic Rodriguez, Robert Brothers, Sebastian Castro, Tina Tian, TobinHall, Matthew Bries
1.0.0 (2019-09-20)
- Port to ROS 2
0.2.1 (2019-06-05)
- Restream buffered frames with minimum publish rate
(#88)
- Restream buffered frames with minimum publish rate
- Implement restreaming for ros_compressed_streamer
- Update travis config (#89)
- Fall back to mjpeg if ros_compressed is unavailable (#87)
- Contributors: Jihoon Lee, Viktor Kunovski, sfalexrog
0.2.0 (2019-01-30)
- Add "default_stream_type" parameter (#84) This allows users to specify default stream type in their .launch files. Using a "ros_compressed" stream type sometimes results in a much lower resource consumption, and having it set as a default is much nicer for end users.
- Add a workaround for MultipartStream constant busy state
(#83)
- Add a workaround for MultipartStream constant busy state
- Remove C++11 features
- lax rule for topic name (#77)
- Add PngStreamer (#74)
- fix SteadyTimer check for backported ROS versions (#71) i.e. on current kinetic
- Pkg format 2
(#68)
- use package format 2
- add missing dependency on sensor_msgs
- fixed undeclared CODEC_FLAG_GLOBAL_HEADER (#65)
- Contributors: Andreas Klintberg, Dirk Thomas, Felix Ruess, Kazuto Murase, Viktor Kunovski, sfalexrog
0.1.0 (2018-07-01)
- Avoid queuing of images on slow ethernet connection (#64)
-
use SteadyTimer (if available) for cleaning up inactive streams (#63) * use SteadyTimer for cleaning up inactive streams so that cleanup works correctly even if system time changes SteadyTimer is available since roscpp 1.13.1 * possibility to use SteadyTimer on older ROS versions when SteadyTimer has been backported to those...
- Fix segfault in libav_streamer destructor (resolves #59) (#60)
- Fix vp8 in kinetic add vp9 and h264 support
(#52)
- fix vp8 in kinetic
- add h264 and vp9 support
- Add Indigo test matrix in travis configuration (#50)
- Set image streamer as inactive if topic is not available
(#53)
- Resolves #38
- Fix Build for ubuntu 14.04
(#48)
- fix issue #47
- fix double free
- Revert "use SteadyTimer for cleaning up inactive streams (#45)" (#51) This reverts commit ae74f19ada22f288a7c7a99ada7a1b9b6037c7ce.
- use SteadyTimer for cleaning up inactive streams (#45) so that cleanup works correctly even if system time changes
- Use trusty instead of xenial. See
travis-ci/travis-ci#7260
(#49)
- Also see RobotWebTools/rosbridge_suite#311
- Contributors: Felix Ruess, James Bailey, Jihoon Lee, randoms, schallerr
0.0.7 (2017-11-20)
- Ffmpeg 3
(#43)
* Correct use of deprecated parameters
codec_context_->rc_buffer_aggressivity marked as "currently
useless", so removed codec_context_->frame_skip_threshold
access through new priv_data api
- New names for pixel formats
- AVPicture is deprecated, use AVFrame
- Switch to non-deprecated free functions
- Use new encoding api for newer versions
- codec_context is deprecated, use packet flags
- Update travis configuration to test against kinetic (#44)
- fixed misuse of remove_if (#35)
- Merge pull request #33 from achim-k/patch-1 web_video_server: fix bool function not returning This fix is required when compiling the package with [clang]{.title-ref}. Otherwise a SIGILL (Illegal instruction) is triggered.
- Contributors: Hans-Joachim Krauch, Jan, Jihoon Lee, russelhowe
0.0.6 (2017-01-17)
- Fixed topic list to display all image topics, fixing Issue #18.
- Contributors: Eric
0.0.5 (2016-10-13)
- Merge pull request #23 from iki-wgt/develop More information when server creation is failed
- Removed empty line
- More detailed exception message Programm behavior is not changed since the exception is rethrown.
- Contributors: BennyRe, Russell Toris
0.0.4 (2015-08-18)
- Merge pull request #16 from mitchellwills/compressed Adds support for streaming ROS compressed image topics without the need to reencode them
- Switch to checkout async_web_server_cpp from source
- Upgrade for change in signature of async_web_server_cpp request handler
- Added ros compressed video streamer type This directly passes the ros compressed frame data to the http socket without reencoding it
- Switched from passing image transport to passing node handle to streamer constructors
- Added default transport parameter for regular image streamers
- Contributors: Mitchell Wills, Russell Toris
0.0.3 (2015-05-07)
- added verbose flag
- Contributors: Russell Toris
0.0.2 (2015-02-20)
- Merge pull request #10 from mitchellwills/develop Added option to specify server address
- Added option to specify server address
- Merge pull request #3 from mitchellwills/develop Remove old http_server implementation and replace it with async_web_server_cpp package
- Moved from using built in http server to new async_web_server_cpp package
- Did some cleanup of streamers
- Update package.xml
- Contributors: Mitchell Wills, Russell Toris
0.0.1 (2014-10-30)
- missed travis file
- cleanup and travis build
- ROS auto-format
- Merge pull request #1 from mitchellwills/develop Initial implementation of a http web server that serves ROS image topics as multiple web compatible formats
- Made some changes suggested by catkin_lint and did some package cleanup
- Added support for libavstreamer on Ubuntu 13.10 version of libav
- Added support for specifying vp8 quality parameter
- Implemented lazy initialization for libav buffers so that output size can be infered from the first image
- Updated README
- Added vp8 support
- Broke image encodings out into different files
- Made write operations async Send timestamps for mjpeg stream
- Initial commit
- Update README.md
- Update README.md
- Update README.md
- Initial commit
- Contributors: Mitchell Wills, Russell Toris
Wiki Tutorials
Package Dependencies
System Dependencies
Name |
---|
ffmpeg |
pkg-config |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged web_video_server at Robotics Stack Exchange
![]() |
web_video_server package from web_video_server repoweb_video_server |
Package Summary
Tags | No category tags. |
Version | 2.0.1 |
License | BSD |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | HTTP Streaming of ROS Image Topics in Multiple Formats |
Checkout URI | https://github.com/RobotWebTools/web_video_server.git |
VCS Type | git |
VCS Version | ros2 |
Last Updated | 2025-04-23 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Błażej Sowa
Authors
- Mitchell Wills
web_video_server - HTTP Streaming of ROS Image Topics in Multiple Formats
This node provides HTTP streaming of ROS image topics in various formats, making it easy to view robot camera feeds and other image topics in a web browser without requiring special plugins or extensions.
Features
- Stream ROS image topics over HTTP in multiple formats:
- MJPEG (Motion JPEG)
- VP8 (WebM)
- VP9 (WebM)
- H264 (MP4)
- PNG streams
- ROS compressed image topics
- Adjustable quality, size, and other streaming parameters
- Web interface to browse available image topics
- Single image snapshot capability
- Support for different QoS profiles in ROS 2
Installation
Dependencies
- ROS (Noetic) or ROS 2 (Humble+)
- OpenCV
- FFmpeg/libav
- Boost
- async_web_server_cpp
Installing packages
For newer ROS2 distributions (humble, jazzy, rolling) it is possible to install web_video_server as a package:
sudo apt install ros-${ROS_DISTRO}-web-video-server
Building from Source
Create a ROS workspace if you don’t have one:
mkdir -p ~/ros_ws/src
cd ~/ros_ws/src
Clone this repository:
# ROS 2
git clone https://github.com/RobotWebTools/web_video_server.git
# ROS 1
git clone https://github.com/RobotWebTools/web_video_server.git -b ros1
Install dependencies with rosdep:
cd ~/ros_ws
rosdep update
rosdep install --from-paths src -i
Build the package and source your workspace:
colcon build --packages-select web_video_server
source install/setup.bash
Usage
Starting the Server
# ROS 1
rosrun web_video_server web_video_server
# ROS 2
ros2 run web_video_server web_video_server
Configuration
Server Configuration Parameters
Parameter | Type | Default | Possible Values | Description |
---|---|---|---|---|
port |
int | 8080 | Any valid port number | HTTP server port |
address |
string | “0.0.0.0” | Any valid IP address | HTTP server address (0.0.0.0 allows external connections) |
server_threads |
int | 1 | 1+ | Number of server threads for handling HTTP requests |
ros_threads |
int | 2 | 1+ | Number of threads for ROS message handling |
verbose |
bool | false | true, false | Enable verbose logging |
default_stream_type |
string | “mjpeg” | “mjpeg”, “vp8”, “vp9”, “h264”, “png”, “ros_compressed” | Default format for video streams |
publish_rate |
double | -1.0 | -1.0 or positive value | Rate for republishing images (-1.0 means no republishing) |
Running with Custom Parameters
You can configure the server by passing parameters via the command line:
# ROS 1
rosrun web_video_server web_video_server _port:=8081 _address:=localhost _server_threads:=4
# ROS 2
ros2 run web_video_server web_video_server --ros-args -p port:=8081 -p address:=localhost -p server_threads:=4
View Available Streams
http://localhost:8080/
The interface allows quick navigation between different topics and formats without having to manually construct URLs.
This page displays:
- All available ROS image topics currently being published
- Direct links to view each topic in different formats:
- Web page with streaming image
- Direct stream
- Single image snapshot
Stream an Image Topic
There are two ways to stream the Image, as a HTML page via
http://localhost:8080/stream_viewer?topic=/camera/image_raw
or as a HTTP multipart stream on
http://localhost:8080/stream?topic=/camera/image_raw
URL Parameters for Streaming
The following parameters can be added to the stream URL:
Parameter | Type | Default | Possible Values | Description |
---|---|---|---|---|
topic |
string | (required) | Any valid ROS image topic | The ROS image topic to stream |
type |
string | “mjpeg” | “mjpeg”, “vp8”, “vp9”, “h264”, “png”, “ros_compressed” | Stream format |
width |
int | 0 | 0+ | Width of output stream (0 = original width) |
height |
int | 0 | 0+ | Height of output stream (0 = original height) |
quality |
int | 95 | 1-100 | Quality for MJPEG and PNG streams |
bitrate |
int | 100000 | Positive integer | Bitrate for H264/VP8/VP9 streams in bits/second |
invert |
flag | not present | present/not present | Invert image when parameter is present |
default_transport |
string | “raw” | “raw”, “compressed”, “theora” | Image transport to use |
qos_profile |
string | “default” | “default”, “system_default”, “sensor_data”, “services_default” | QoS profile for ROS 2 subscribers |
Examples:
# Stream an MJPEG at 640x480 with 90% quality
http://localhost:8080/stream?topic=/camera/image_raw&type=mjpeg&width=640&height=480&quality=90
# Stream H264 with higher bitrate
http://localhost:8080/stream?topic=/camera/image_raw&type=h264&bitrate=500000
# Stream with inverted image (rotated 180°)
http://localhost:8080/stream?topic=/camera/image_raw&invert
Get a Snapshot
It is also possible to get a single image snapshot
http://localhost:8080/snapshot?topic=/camera/image_raw
URL Parameters for Snapshot
Parameter | Type | Default | Possible Values | Description |
---|---|---|---|---|
topic |
string | (required) | Any valid ROS image topic | The ROS image topic to stream |
width |
int | 0 | 0+ | Width of output picture (0 = original width) |
height |
int | 0 | 0+ | Height of output picture (0 = original height) |
quality |
int | 95 | 1-100 | Quality for JPEG snapshots |
invert |
flag | not present | present/not present | Invert image when parameter is present |
default_transport |
string | “raw” | “raw”, “compressed”, “theora” | Image transport to use |
qos_profile |
string | “default” | “default”, “system_default”, “sensor_data”, “services_default” | QoS profile for ROS 2 subscribers |
About
This project is released as part of the Robot Web Tools effort.
License
web_video_server is released with a BSD license. For full terms and conditions, see the LICENSE file.
Authors
See the AUTHORS file for a full list of contributors.
Changelog for package web_video_server
2.0.1 (2024-10-26)
- Add ros_environment to test dependencies (#166)
- Contributors: Błażej Sowa
2.0.0 (2024-10-11)
- Replace boost with std (#164)
- Add ament_cpplint test, resolve TODOs (#162)
- Add license headers to all C++ source files, update copyrights (#161)
- Add support for alpha pngs by adding per stream type decode functions (backport #106) (#163)
- Add link to /stream in stream list (backport #118) (#160)
- Add support for jpg compression format (backport #142) (#159)
- Reformat the code with uncrustify (#158)
- Use hpp extension for headers (#157)
- Fix request logging, remove global parameters (#156)
- Replace nh with node (#155)
- Fix declaring and retrieving node parameters (#154)
- Fix usage of deprecated libavcodec functions (#150)
- Use cv_bridge hpp headers when available (#149)
- Use target_link_libraries instead of ament_target_dependencies where applicable
- Don't install headers
- Add CI workflow and ament_lint tests (#148)
- Update package maintainer
- allow topic searches to continue past invalid multi-type topics. (#146)
- Add QoS profile query parameters (#133)
- Fix build for ROS2 Humble (#129)
- Fix build for ROS2 Foxy (#111)
- Contributors: Błażej Sowa, Domenic Rodriguez, Robert Brothers, Sebastian Castro, Tina Tian, TobinHall, Matthew Bries
1.0.0 (2019-09-20)
- Port to ROS 2
0.2.1 (2019-06-05)
- Restream buffered frames with minimum publish rate
(#88)
- Restream buffered frames with minimum publish rate
- Implement restreaming for ros_compressed_streamer
- Update travis config (#89)
- Fall back to mjpeg if ros_compressed is unavailable (#87)
- Contributors: Jihoon Lee, Viktor Kunovski, sfalexrog
0.2.0 (2019-01-30)
- Add "default_stream_type" parameter (#84) This allows users to specify default stream type in their .launch files. Using a "ros_compressed" stream type sometimes results in a much lower resource consumption, and having it set as a default is much nicer for end users.
- Add a workaround for MultipartStream constant busy state
(#83)
- Add a workaround for MultipartStream constant busy state
- Remove C++11 features
- lax rule for topic name (#77)
- Add PngStreamer (#74)
- fix SteadyTimer check for backported ROS versions (#71) i.e. on current kinetic
- Pkg format 2
(#68)
- use package format 2
- add missing dependency on sensor_msgs
- fixed undeclared CODEC_FLAG_GLOBAL_HEADER (#65)
- Contributors: Andreas Klintberg, Dirk Thomas, Felix Ruess, Kazuto Murase, Viktor Kunovski, sfalexrog
0.1.0 (2018-07-01)
- Avoid queuing of images on slow ethernet connection (#64)
-
use SteadyTimer (if available) for cleaning up inactive streams (#63) * use SteadyTimer for cleaning up inactive streams so that cleanup works correctly even if system time changes SteadyTimer is available since roscpp 1.13.1 * possibility to use SteadyTimer on older ROS versions when SteadyTimer has been backported to those...
- Fix segfault in libav_streamer destructor (resolves #59) (#60)
- Fix vp8 in kinetic add vp9 and h264 support
(#52)
- fix vp8 in kinetic
- add h264 and vp9 support
- Add Indigo test matrix in travis configuration (#50)
- Set image streamer as inactive if topic is not available
(#53)
- Resolves #38
- Fix Build for ubuntu 14.04
(#48)
- fix issue #47
- fix double free
- Revert "use SteadyTimer for cleaning up inactive streams (#45)" (#51) This reverts commit ae74f19ada22f288a7c7a99ada7a1b9b6037c7ce.
- use SteadyTimer for cleaning up inactive streams (#45) so that cleanup works correctly even if system time changes
- Use trusty instead of xenial. See
travis-ci/travis-ci#7260
(#49)
- Also see RobotWebTools/rosbridge_suite#311
- Contributors: Felix Ruess, James Bailey, Jihoon Lee, randoms, schallerr
0.0.7 (2017-11-20)
- Ffmpeg 3
(#43)
* Correct use of deprecated parameters
codec_context_->rc_buffer_aggressivity marked as "currently
useless", so removed codec_context_->frame_skip_threshold
access through new priv_data api
- New names for pixel formats
- AVPicture is deprecated, use AVFrame
- Switch to non-deprecated free functions
- Use new encoding api for newer versions
- codec_context is deprecated, use packet flags
- Update travis configuration to test against kinetic (#44)
- fixed misuse of remove_if (#35)
- Merge pull request #33 from achim-k/patch-1 web_video_server: fix bool function not returning This fix is required when compiling the package with [clang]{.title-ref}. Otherwise a SIGILL (Illegal instruction) is triggered.
- Contributors: Hans-Joachim Krauch, Jan, Jihoon Lee, russelhowe
0.0.6 (2017-01-17)
- Fixed topic list to display all image topics, fixing Issue #18.
- Contributors: Eric
0.0.5 (2016-10-13)
- Merge pull request #23 from iki-wgt/develop More information when server creation is failed
- Removed empty line
- More detailed exception message Programm behavior is not changed since the exception is rethrown.
- Contributors: BennyRe, Russell Toris
0.0.4 (2015-08-18)
- Merge pull request #16 from mitchellwills/compressed Adds support for streaming ROS compressed image topics without the need to reencode them
- Switch to checkout async_web_server_cpp from source
- Upgrade for change in signature of async_web_server_cpp request handler
- Added ros compressed video streamer type This directly passes the ros compressed frame data to the http socket without reencoding it
- Switched from passing image transport to passing node handle to streamer constructors
- Added default transport parameter for regular image streamers
- Contributors: Mitchell Wills, Russell Toris
0.0.3 (2015-05-07)
- added verbose flag
- Contributors: Russell Toris
0.0.2 (2015-02-20)
- Merge pull request #10 from mitchellwills/develop Added option to specify server address
- Added option to specify server address
- Merge pull request #3 from mitchellwills/develop Remove old http_server implementation and replace it with async_web_server_cpp package
- Moved from using built in http server to new async_web_server_cpp package
- Did some cleanup of streamers
- Update package.xml
- Contributors: Mitchell Wills, Russell Toris
0.0.1 (2014-10-30)
- missed travis file
- cleanup and travis build
- ROS auto-format
- Merge pull request #1 from mitchellwills/develop Initial implementation of a http web server that serves ROS image topics as multiple web compatible formats
- Made some changes suggested by catkin_lint and did some package cleanup
- Added support for libavstreamer on Ubuntu 13.10 version of libav
- Added support for specifying vp8 quality parameter
- Implemented lazy initialization for libav buffers so that output size can be infered from the first image
- Updated README
- Added vp8 support
- Broke image encodings out into different files
- Made write operations async Send timestamps for mjpeg stream
- Initial commit
- Update README.md
- Update README.md
- Update README.md
- Initial commit
- Contributors: Mitchell Wills, Russell Toris
Wiki Tutorials
Package Dependencies
System Dependencies
Name |
---|
ffmpeg |
pkg-config |