简体   繁体   English

为什么RTSP播放命令在RTP端口上收到设备篡改数据包?

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

I want to use RTSP protocol to connect to an IP Camera. 我想使用RTSP协议连接到IP摄像机。 I use Visual C++ for this purpose. 我为此目的使用Visual C ++。 I searched and find cURL library and downloaded rtsp.c from libcurl site. 我搜索并找到了cURL库,并从libcurl网站下载了rtsp.c。
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. 我使用CMake将cURL的代码转换为适合Visual Studio的sln文件,然后创建了一个解决方案并执行其他步骤来运行rtsp.c示例。 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. 现在,我可以使用rtsp.c连接到我的IP摄像机,并且没有运行时错误,但是在WireShark上收到“ ICMP目标不可达(端口不可达)消息,并且没有任何流接收。
On the Other side I can connect to my IP Camera with VLC Player. 在另一方面,我可以使用VLC Player连接到我的IP摄像机。 I changed port numbers on rtsp.c but the problem isn't solved. 我在rtsp.c上更改了端口号,但问题仍未解决。
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: 我使用了此RTSP代码此RTP代码 ,现在仅收到一个包含此消息的RTP数据包:

<?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: 编辑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? 我搜索了一下,现在我知道以上消息是设备篡改消息,该消息显示了摄像机上的运动检测事件,但我不知道为什么RTSP播放命令在RTP端口上接收设备篡改数据包?

In a RTSP resource, several media streams can be aggregated in the same URL. RTSP资源中,可以在同一URL中聚合几个媒体流。 Often, ONVIF cameras have three media streams: one for video, one for audio and one for metadata, to stream alerts to the client. 通常,ONVIF摄像机具有三种媒体流:一种用于视频,一种用于音频,另一种用于元数据,以将警报流传输到客户端。

The media streams are described by using the Session Description Protocol , which is used by the DESCRIBE command of RTSP . 媒体流通过使用会话描述协议描述 ,该协议RTSPDESCRIBE命令RTSP

You should check how the RTSP resource is organized, probably you're receiving the packets for the last media in the session. 您应该检查RTSP资源的组织方式,可能是您正在接收会话中最后一个媒体的数据包。 To inspect the RTSP stream, you can use openRTSP from the Live555 project. 要检查RTSP流,可以使用Live555项目中的openRTSP

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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