From 77b303e4ba673cdcee258adb8f7f9b494caa6b8c Mon Sep 17 00:00:00 2001 From: Rhys Mainwaring Date: Mon, 24 Jun 2024 11:12:37 +0100 Subject: [PATCH] GstCameraPlugin: add usage section to README Signed-off-by: Rhys Mainwaring --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 6036e06..cedda89 100644 --- a/README.md +++ b/README.md @@ -200,6 +200,38 @@ greater than one: MANUAL> param set SIM_SPEEDUP 10 ``` +### 3. Streaming camera video + +Images from camera sensors may be streamed with GStreamer using +the `GstCameraPlugin` sensor plugin. The example gimbal models include the +plugin element: + +```xml + + 127.0.0.1 + 5600 + true + false + +``` + +The `` and `` parameters are deduced from the +topic name for the camera sensor, but may be overriden if required. + +The `gimbal.sdf` world includes a 3 degrees of freedom gimbal with a +zoomable camera. To start streaming: + +```bash +gz topic -t /world/gimbal/model/mount/model/gimbal/link/pitch_link/sensor/camera/image/enable_streaming -m gz.msgs.Boolean -p "data: 1" +``` + +Display the streamed video: + +```bash +gst-launch-1.0 -v udpsrc port=5600 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264' ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false +``` + ## Models In addition to the Iris and Zephyr models included here, a selection