rsonvif: How to render metadata using onvifmetadataoverlay?

Mathieu Duponchelle mathieu at centricular.com
Thu Sep 14 10:56:37 UTC 2023


That's interesting, it would indicate that the width and height of a
given polygon are much larger than expected, perhaps some coordinate
translation is needed for your particular stream?

You probably want to enable verbose logs with
GST_DEBUG=onvifmetadataoverlay:9 , and look in particular for this log:

gst::trace!(CAT, imp: self, "Handling object {:?}", object);

Then look for the values for width and height.

Cheers,
Mathieu

On Mon, 2023-09-11 at 11:34 +0200, Daria Łach wrote:
> Hi Mathieu, many thanks for your response. I tried to use your
> sample. Video was displayed but with no metadata. 
> I've got below error message:
> 
> thread '<unnamed>' panicked at 'attempt to multiply with overflow',
> net\onvif\src\onvifmetadataoverlay\imp.rs:181:49
> note: run with `RUST_BACKTRACE=1` environment variable to display a
> backtrace
> ERROR: from element
> /GstPipeline:pipeline0/GstOnvifMetadataOverlay:onvifmetadataoverlay0:
> Panicked: attempt to multiply with overflow
> ERROR: from element
> /GstPipeline:pipeline0/GstOnvifMetadataOverlay:onvifmetadataoverlay0:
> Panicked
> Execution ended after 0:00:09.016280700
> Setting pipeline to NULL ...
> ERROR: from element
> /GstPipeline:pipeline0/GstOnvifMetadataOverlay:onvifmetadataoverlay0:
> Panicked
> ERROR: from element
> /GstPipeline:pipeline0/GstOnvifMetadataParse:onvifmetadataparse0:
> GStreamer encountered a general stream error.
> Additional debug info:
> net\onvif\src\onvifmetadataparse\imp.rs(1177):
> gstrsonvif::onvifmetadataparse::imp::OnvifMetadataParse::src_start_ta
> sk::{{closure}} ():
> /GstPipeline:pipeline0/GstOnvifMetadataParse:onvifmetadataparse0:
> Streaming stopped, reason: Error
> ERROR: from element
> /GstPipeline:pipeline0/GstOnvifMetadataOverlay:onvifmetadataoverlay0:
> Panicked
> ERROR: from element
> /GstPipeline:pipeline0/GstOnvifMetadataOverlay:onvifmetadataoverlay0:
> Panicked
> 
> Do you know what the reason can be?
> 
> Daria
> 
> 
> pt., 8 wrz 2023 o 13:21 Mathieu Duponchelle <mathieu at centricular.com>
> napisał(a):
> > Hey, here's a sample from my bash history:
> > 
> > gst-launch-1.0 onvifmetadatacombiner latency=500000000 name=omc !
> > videoconvert ! onvifmetadataoverlay ! videoconvert ! autovideosink
> > rtspsrc latency=500 add-reference-timestamp-meta=true
> > location="XXX"
> > name=src src. ! application/x-rtp, encoding-name=H264 !
> > rtph264depay !
> > h264parse ! avdec_h264 ! omc.media src. ! rtponvifmetadatadepay !
> > onvifmetadataparse ! omc.meta
> > 
> > Cheers,
> > Mathieu
> > 
> > On Tue, 2023-09-05 at 15:57 +0200, Daria Łach via gstreamer-devel
> > wrote:
> > > Hello,
> > > 
> > > I am creating an RTSP client which is going to display video and
> > > metadata (as bounding boxes and some other text information) from
> > > an
> > > IP camera supporting ONVIF profile M. I would like to use rsonvif
> > > plugins. 
> > > I am able to display video as well as display/save metadata as
> > > XML
> > > using for example: 
> > > gst-launch-1.0 rtspsrc location=rtsp://
> > > user:password at ip/rtsp/xxxx
> > > name=t t. ! queue ! application/x-rtp, media=video, clock-
> > > rate=90000,encoding-name=H264 ! rtph264depay ! avdec_h264 !
> > > videoconvert ! glimagesink sync=false t. ! queue ! application/x-
> > > rtp,
> > > media=application ! filesink location=data.txt
> > > I would like to use onvifmetadataoverlay to display metadata over
> > > video but I don't know how to do it. Do you have any examples of
> > > working pipelines with onvifmetadataoverlay? 
> > > 
> > > Many thanks!


More information about the gstreamer-devel mailing list