Skip to content

Latest commit

 

History

History
64 lines (34 loc) · 1.83 KB

File metadata and controls

64 lines (34 loc) · 1.83 KB

RTPReceiverAPI

NOTE: this project is Linux only

This repository provides an example for receiving the synchronized RTP data from dweOS and dweOS Pro.

What is the synchronized RTP data?

dweOS provides a method for synchronizing two usb cameras (stellarHD and explore3D) and streaming them under a custom rtp protocol.

How to setup in dweOS

dweOS configuration UI

Steps

  1. Make sure both streams are STOPPED. There is a known bug that can cause issues if both are not stopped.

  2. Add the second camera as a follower of the first one. The left camera is defined as the leader. Currently, our protocol only allows for two cameras.

Add follower

  1. Start the leader stream.

Receive Streams

To receive streams, you can use the example provided in src/main.cpp.

Building

mkdir build && cd build

cmake ..

make

Building the example does require OpenCV, but the api does not require it for receiving. If OpenCV is not used, another jpeg decoder will be used. Please reach out to us if you require example code for another jpeg decoder.

Hardware decoding

On NVIDIA hardware, hardware jpeg decoding is often available and will massively improve performance. If this is required, please reach out to us and we can provide a hardware decoding interface.

Protocol

The protocol is an extremely simple, customized version of RTP that sends the following payload:

left_size: uint64_t
right_size: uint64_t
left_data: uint8_t[left_size]
right_data: uint8_t[right_size]

Where left_data and right_data are both jpeg data.

FAQ

If you are experiencing frame errors (or to just increase reliability), please run the following command prior to running the program:

sudo sysctl -w net.core.rmem_max=425984

This increases the buffer size and will limit frame issues.