Skip to content

tingshao/vpx-image-transport

 
 

Repository files navigation

Image Transport for VPx

An image_transport plugin to tranport sensor_msg::Image data via VP8/VP9 encoded data stream within the WebM container.

Why Choose WebM?

WebM is an open source software project which is dedicated to develop a high-quality, open video format and codecs for the web that is freely available for anyone. It maintains the open video format which is widely supported by the modern browsers (Chromium, Firefox, Edge, etc.) and web engine based application runtimes (NW.js, Electron, etc.). The video format and the VPX encoders/decoders (including VP8, VP9 and VP10) are totally free to use without any potential proprietary license issue.

Environment

Installation

Install ROS

  • Follow the ROS Kinetic instruction in ROS Wiki to install the ROS Kinetic version onto your Ubuntu.

  • Then setup your ROS environment and create your ROS workspace. Follow the instruction here.

Install libvpx-dev and libva-dev

Before building the project, you need to install libvpx-dev and libva-dev to make it compile:

sudo apt-get install libvpx-dev libva-dev

Install Image Transport for VPx Plugin

All you need to is to clone this repository into the src directory of your workspace and build it with catkin_make:

cd ~/catkin_ws/src
git clone <this_repository_url>
cd ..
catkin_make

Usage

Publish Image with WebM/VPX Data Stream

Firstly your ROS node should publish the sensor_msg::Image message through the image_transport. For more details on how to write your codes to publish through image_transport, please refer to the image transport wiki.

After you successfully hook up the sensor_msg::Image message with image_transport, the Image Transport for VPx plugin will be loaded automatically by image_transport and the WebM/VPX encoded data stream will be published at <image_topic_name>/vpx.

Subscribe to WebM/VPX Data Stream

As browser / web application runtime has the ability to decode the WebM/VPX data stream, we can feed the data stream directly into the HTML5 VideoElement by creating a MediaSource for it and append the WebM/VPX encoded data into the SourceBuffer. You can follow the instruction of the sample here to create a NW.js application to display the Image data.

License

Image Transport for VPx project is available under the BSD license. See the LICENSE file for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 78.5%
  • CMake 18.2%
  • Python 3.3%