Closed pork94 closed 3 years ago
I have no experience with metadata from onvif camera. If you have an RTSP URI for metadata you can use the RtspClientExample to try to connect to this url and change around line 754 to accept this stream of metadata.
Alright thanks for the answer, however i have hit another stumbling block. I have a Samsung Techwin Camera and the RtspClientExample cant seems to grab the rtsp stream.
2021-09-06 14:12:08.9897|WARN|Rtsp.RtspListener|Unknow Error 2021-09-06 14:12:08.9897|DEBUG|Rtsp.RtspListener|Connection Close 2021-09-06 14:12:28.9637|DEBUG|Rtsp.RtspListener|Send Message 2021-09-06 14:12:28.9637|DEBUG|Rtsp.Messages.RtspMessage|Commande : GET_PARAMETER rtsp://192.168.1.100/0/onvif/profile1/media.smp RTSP/1.0 2021-09-06 14:12:28.9637|DEBUG|Rtsp.Messages.RtspMessage|Header : Session: 2021-09-06 14:12:28.9667|DEBUG|Rtsp.Messages.RtspMessage|Header : CSeq: 3 2021-09-06 14:12:48.9703|DEBUG|Rtsp.RtspListener|Send Message 2021-09-06 14:12:48.9703|DEBUG|Rtsp.Messages.RtspMessage|Commande : GET_PARAMETER rtsp://192.168.1.100/0/onvif/profile1/media.smp RTSP/1.0 2021-09-06 14:12:48.9703|DEBUG|Rtsp.Messages.RtspMessage|Header : Session: 2021-09-06 14:12:48.9703|DEBUG|Rtsp.Messages.RtspMessage|Header : CSeq: 4 2021-09-06 14:13:08.9743|DEBUG|Rtsp.RtspListener|Send Message 2021-09-06 14:13:08.9743|DEBUG|Rtsp.Messages.RtspMessage|Commande : GET_PARAMETER rtsp://192.168.1.100/0/onvif/profile1/media.smp RTSP/1.0 2021-09-06 14:13:08.9743|DEBUG|Rtsp.Messages.RtspMessage|Header : Session: 2021-09-06 14:13:08.9743|DEBUG|Rtsp.Messages.RtspMessage|Header : CSeq: 5
Alright thanks for the answer, however i have hit another stumbling block. I have a Samsung Techwin Camera and the RtspClientExample cant seems to grab the rtsp stream.
2021-09-06 14:12:08.9897|WARN|Rtsp.RtspListener|Unknow Error 2021-09-06 14:12:08.9897|DEBUG|Rtsp.RtspListener|Connection Close 2021-09-06 14:12:28.9637|DEBUG|Rtsp.RtspListener|Send Message 2021-09-06 14:12:28.9637|DEBUG|Rtsp.Messages.RtspMessage|Commande : GET_PARAMETER rtsp://192.168.1.100/0/onvif/profile1/media.smp RTSP/1.0 2021-09-06 14:12:28.9637|DEBUG|Rtsp.Messages.RtspMessage|Header : Session: 2021-09-06 14:12:28.9667|DEBUG|Rtsp.Messages.RtspMessage|Header : CSeq: 3 2021-09-06 14:12:48.9703|DEBUG|Rtsp.RtspListener|Send Message 2021-09-06 14:12:48.9703|DEBUG|Rtsp.Messages.RtspMessage|Commande : GET_PARAMETER rtsp://192.168.1.100/0/onvif/profile1/media.smp RTSP/1.0 2021-09-06 14:12:48.9703|DEBUG|Rtsp.Messages.RtspMessage|Header : Session: 2021-09-06 14:12:48.9703|DEBUG|Rtsp.Messages.RtspMessage|Header : CSeq: 4 2021-09-06 14:13:08.9743|DEBUG|Rtsp.RtspListener|Send Message 2021-09-06 14:13:08.9743|DEBUG|Rtsp.Messages.RtspMessage|Commande : GET_PARAMETER rtsp://192.168.1.100/0/onvif/profile1/media.smp RTSP/1.0 2021-09-06 14:13:08.9743|DEBUG|Rtsp.Messages.RtspMessage|Header : Session: 2021-09-06 14:13:08.9743|DEBUG|Rtsp.Messages.RtspMessage|Header : CSeq: 5
I have solved this issue due to camera giving MJPEG instead of h264 stream.
But i modified the client a bit and found that there is only 2 streams from the RTSP. It seems that the metadata is embedded in RTP instead of RTSP.
@ngraziano I have managed to stream metadata from the camera and stream the xml by converting the bytes to string. Thanks alot for the help!
@pork94 I'm also in a situation to get the events. Could you please tell how to get this information and what changes you did in the rtsp cliënt?
Hi,
I am trying to build a school project reading analytic metadata from a onvif camera. However i am stuck and no idea on how to move forward. Could you give me some pointers on how to leverage on SharpRTSP to move forward?
Thanks and Best Regards!