Skip to main content

Video

Warning

Please note that this component is deprecated, you should use the new "Gstreamer" component instead, it has better performance and configurability. But you will need to replace you widgets with a new widget so please contact support for help.

The video plugin allows peer-to-peer (P2P) streaming of video from a robot to a user's web browser; the use of a P2P connection ensures that video is delivered with the lowest possible latency, to enhance situational awareness during teleoperations.

The video plugin will attempt to establish a direct connection, where video data is straight from the robot to the destination web browser without travelling through any intermediary servers. If this is not possible, for example due to firewall configuration on one of the networks being traversed, then the video system will automatically attempt to fall back to relaying video through a DroneDeploy server. In both cases, video is encrypted before being sent by the agent, and is only decrypted once received by the destination web browser.

Note

The video plugin uses GStreamer, a common cross-platform video handling library in order capture, encode and ingest video from camera devices on the robot. Before attempting to set up the video plugin, ensure that GStreamer1.0 is installed on the host computer, including any GStreamer plugin libraries required for pipeline elements to be used.

In order to use the video plugin, you should already have a functional GStreamer pipeline which is able to capture video from the camera on your robot, and record it to a file or display it on screen.

For more information on how to configure peer to peer video streams for your robot, visit this page.

Configuration

To use the Video plugin, your agent will need a section in its agent-settings.json file which enables the video component, as shown below. For more information on how to configure the agent plugins, see Agent Configuration.

...
"components": [
{
"enabled": true,
"id": "video",
"settings": {
"logLevel": 5,
"namedStreams": [
"videotest"
]
}
},
...
]

The video plugin understands the following configuration parameters:

NameDescriptionUnitsDefault
enabledWhether to enable the video plugin or not.false
nameHow this instance of the video plugin should be named.video
logLevelThe logging verbosity: 1 - very quiet, 6 - very talkative.4
addressThe address of the DroneDeploy video server the plugin will use to initiate the video stream. If empty, the plugin will use the agent's default API address.
namedStreamsAn array whose elements are strings which each name a video source which the video plugin should advertise. The agent automatically creates and advertises video sources for V4L2 camera devices; if you want to stream video from a source which is not a V4L2 device, you will need to add an entry in this list. By default, there is always an source named "videotest" in this list, so allow streaming of a test pattern to test correct video operation.["videotest"]

GStreamer Pipeline Configuration

The pipeline which is configured in the video widget in the DroneDeploy Robotics Portal should not end with a sink element; the agent will automatically add its own sink element on to the end of the provided pipeline in order to ingest the video stream.

The sink capabilities are quite strict; your pipeline must end with:

video/x-h264,stream-format=byte-stream,alignment=au,profile=constrained-baseline

Warning

For Agent versions prior to v1.3.2:

Additionally, the maximum buffer size which the sink is able to accept is limited to 65000B. You should make sure that your pipeline only generates buffers under this limit. If your H264 encoder is configured to generate a total bitrate (in b/s) of B, encoding video with framerate (in frames/s) F, then ensure that:

B/(8F) < 65000

Some sample pipelines suitable for use with the agent are available for reference: GStreamer Pipeline Samples