简体   繁体   中英

Why RTSP Play Command Receives Device Tampering Packet on RTP Port?

I want to use RTSP protocol to connect to an IP Camera. I use Visual C++ for this purpose. I searched and find cURL library and downloaded rtsp.c from libcurl site.
I used CMake to convert codes of cURL to suitable sln file for Visual Studio then I created a solution and do other steps to run rtsp.c example. Now I can connect to my IP Camera with rtsp.c and receives no run time error but I receive " ICMP Destination Unreachable (Port Unreachable) " on WireShark and no stream receives.
On the Other side I can connect to my IP Camera with VLC Player. I changed port numbers on rtsp.c but the problem isn't solved.
I read this but I don't know where is the problem? and how can i solve it?

EDITED:
I used this RTSP code and this RTP code and now I Receive only one RTP Packet that contains this message:

<?xml version="1.0" encoding="UTF-8"?>  
<tt:MetaDataStream xmnls:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">  
<tt:Event>  
    <wsnt:NotificationMessage>  
          <wsnt:Topic Dialect="http://www.onvif.org/ver10/tec/topicExpression/ConcreteSet">  
           tns1:Device/Tampering  
           </wsnt:Topic>  
           <wsnt:Message>  
                 <tt:Message UtcTime="2016-05-03T00:14:33.775">  
                     <tt:Source>
                         <tt:SimpleItem Name="VideoSourceConfigurationToken" Value="VideoSource0">  
                          </tt:SimpleItem>
                      </tt:Source>
                      <tt:Data>
                          <tt:SimpleItem Name="Level" Value="Trigger">
                          </tt:SimpleItem>
                          <tt:SimpleItem Name="Percentage" Value="32">
                          </tt:SimpleItem>
                       </tt:Data>
                  </tt:Message>
                </wsnt:Message>
           </wsnt:NotificationMessage>
       </tt:Event>

EDITED-2:
I searched and now I know above message is a Device Tampering message that shows an motion detection event on camera but I don't khow Why RTSP Play Command Receives Device Tampering Packet on RTP Port?

In a RTSP resource, several media streams can be aggregated in the same URL. Often, ONVIF cameras have three media streams: one for video, one for audio and one for metadata, to stream alerts to the client.

The media streams are described by using the Session Description Protocol , which is used by the DESCRIBE command of RTSP .

You should check how the RTSP resource is organized, probably you're receiving the packets for the last media in the session. To inspect the RTSP stream, you can use openRTSP from the Live555 project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM