Is the Metadata means RTSP metadata stream? Could I use MIP SDK the receive the metadata stream if the camera dose not support Onvif metadata stream profile?

These samples can show you how to read metadata that is stored in XProtect.

https://doc.developer.milestonesys.com/html/index.html?base=samples/metadataplaybackviewer.html&tree=tree_search.html?search=metadataplaybackviewer

https://doc.developer.milestonesys.com/html/index.html?base=samples/metadataliveviewer.html&tree=tree_search.html?search=metadataliveviewer

Hi Rie,

I have tried those sample with my cameras, but the sample could not receive any metadata from the XProtect. Is any setting should I change? Is the camera necessary to support Onvif metadata profile?

If your cameras with metadata are not supported by Milestone then you can develop your own driver with Driver Framework.

Hi Rie,

Is Onvif RTSP metadata stream supported by Milestone? Because I want to know If my camera support onvif metadata, the metadata stream work on Milestone.

Yes, Milestone does support ONVIF RTSP Metadata stream from ONVIF devices using the ONVIF Driver.

For more information you can refer to the document “ONVIF Driver Overview”

https://content.milestonesys.com/l/3a85552d3a35f603/

Specifically section “6.8 Metadata”.

There are a couple ways to use the metadata coming from the device. If the metadata stream has bounding boxes you can see them in the Smart Client overlayed over the video. Also you can use the search functionality in Smart Client to search for specific objects.

If you need to troubleshoot, you can use the Metadata Viewer to see what kind of metadata has Milestone received from the device.

https://developer.milestonesys.com/s/article/How-to-view-device-metadata

Hi Maxim,

Thanks your reply. I have implement the ONVIF metadata stream in my camera and test with your sample metadataliveviewer, but I still could not receive the data. Thus I have an advanced question, according to the document, the metadata stream need specific XML format. If I just put some text to the stream without any XML format, the text could be received by your sample?

The metadata stream must be XML complying with the ONVIF Metadata schema:

https://www.onvif.org/ver10/schema/metadatastream.xsd?70a948&70a948

Hi Maxim,

Thanks your reply. The metadata stream works for me now. I have an advanced question. There are parameters beginTime/endTime in MetadataLiveContent class, the time is related to the PTS in the RTP packet? Could I refer the time to sync the frame of JPEGLiveSource?

Hi Brian,

I dont think you will find a exact match on the timestamps of the frames from video and metadata as these come in as 2 different streams and they dont have the exact same time. you need to match “around” time and here you need to decide if video is the master time and which direction you would like to match (forward/backward). So if you for example have a video with time 777 and there is metadata with time 776.9 or 777.1 you need to decide which one you “match”. It can of course happen that you do have an exact match but it is not a guarantee.

KR,

Artur

Hi Artur,

Thanks your reply. Are the parameters beginTime/endTime in MetadataLiveContent/JPEGLiveSource equal to the timestamp when MIP receive the data?

Hi Brian,

Yes, the timestamps you receive are always the original ones received at any point from the devices. We never change timestamps of the data we receive. Its either the timestamp that is provided by the device, or the original timestamp of reception of the data.

Hi Artur,

For now, I 'm working on metadata stream integration and find a situation. Sometimes, Milestone seems retry rtsp connection except for metadata stream. For this case, I have to restart the metadata server in client management App to establish the connection for metadata stream. Is this situation an issue or not?

Hi Brian,

I am not sure what you mean by “retry connection”. There is no special logic for the metadata stream, if you have a device then all streams on the device will retry if the connection fails. The streams are independent of each other, so if your video stream fails it does not mean all other streams are also failed/retried. I am also not sure what you mean by “metadata server”, if you have a hardware that has metadata device then that specific hardware will start its own metadata stream and retry in case of connection failure.

Hi Artur,

We have analyzed the network packet by WireShark, we found that Milestone open the other session to connect camera’s RTSP server when our stream was restarted(some stream settings were changed). In the new session, Milestone seems not to request metadata stream, thus our metadata could not be received after the action. To solve the problem, we have to restart the metadata connection by Milestone Client Management App. Do you have any idea for that?

Hi Brian,

XProtect uses independent sessions for each stream. So for example when the video stream stops (changed settings) and the timeout for no data received expires (5 seconds), XProtect starts a new session for video (without affecting all other sessions). The Metadata session handler does not have a timeout for no data received as the Metadata might be sporadic and infrequent. The Metadata stream will be reconnected only when a keep-alive fails. If configured, Keep-Alive-s are sent usually every 30 seconds.

Hi Maxim,

Thanks your information. About

“The Metadata stream will be reconnected only when a keep-alive fails. If configured, Keep-Alive-s are sent usually every 30 seconds.”, I want to know where I can set the configure. Could you provide me the information about that. By the way, in our implementation, the metadata stream would be restart with the video stream, thus the metadata stream should be disconnected too. Dose XProtect reconnect the metadata stream If I don’t change the configure?

Hi Maxim,

We found that XProtect use the port of metadata stream to request new RTSP connection for video stream timeout. Is that situation normal? We guess that action cause our metadata stream could not be sent out.

Hi Brian,

Are you using the MIP SDK to create a driver for your device or are you using a Milestone Native Driver (like ONVIF Driver or something else)?

Hi Maxim,

I used Onvif Driver.