0

I am working with an IP camera based on onvif standards. The scenario is the following one:

enter image description here

The RTP port and HTTP port are 22554 and 22280 respectively. I have no problem with this, I reroute the traffic from A to B in those ports to reach the camera. In fact, the RTP session is correctly established.

The problem comes in the SETUP message. Here A (which starts the session), establishes a new port (client port) for the UDP connection for video interchange. The same way, the camera also sets a new port (server port). As the server ports are not redirected in B, I am not able to receive anything.

I read that there is a possibility to used interleaved mode in order to use the same port used for RTSP messages (22554 in this case) for the video packets. But I do not know how to do this. For example, VLC tries the first option (new client-server ports) and as it does not work it successfuly setups another rtsp session with interleave mode.

I started working with this code (http://bit.ly/1Xvwqx9), which is based on Onvif libraries. But I cannot find anything regarding this aspect of interleaving.

Anyone can give me a hint? Thanks and kind regards.

bilbinight
  • 217
  • 3
  • 15

1 Answers1

0

Finally I found the solution. It is important to set these aspects:

protocol = TransportProtocol.rtsp
MediaStreamInfo.Transport transp = MediaStreamInfo.Transport.Tcp;
mpromonet
  • 11,326
  • 43
  • 62
  • 91
bilbinight
  • 217
  • 3
  • 15