Monitor Config - Source Tab - Remote Method?

Forum for questions and support relating to the 1.30.x releases only.
Post Reply
ConcreteRooster
Posts: 24
Joined: Fri Jan 24, 2014 6:22 pm

Monitor Config - Source Tab - Remote Method?

Post by ConcreteRooster » Mon Jan 23, 2017 10:11 pm

I'm using ZM v1.30.0 on CentOS 7.3 installed via zmrepo. So far so good, just wanted a little clarification on something...

When adding a monitor, under the "Source" tab, the second field is "Remote Method". (This field is below "Source" and above "Options".)

The Remote Method options are RTP/Unicast, RTP/Multicast, RTP/RTSP, and RTP/RTSP/HTTP. I don't see where these are documented anywhere... looks like the official documentation might be a bit out of date? Or I'm overlooking something (wouldn't be the first time).

I have some intuitive idea of what they mean, but it's always nice to have the official docs.

FWIW, my Hikvision DS-2CD2132F-I seems to work with both RTP/Unicast and RTP/RTSP (see here). It might be better with the latter option (less smearing), though I changed that option along with a few others at the same time, so can't say for sure which change caused the improvement.

bbunge
Posts: 2401
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Monitor Config - Source Tab - Remote Method?

Post by bbunge » Wed Jan 25, 2017 3:42 pm

My guess is that it is an oversight and the user is expected to know something about network protocols. Will documentation ever get updated to include an explanation? Sure, when a volunteer takes the time to do it. Are you up to it?

As always, Google is your friend

ConcreteRooster
Posts: 24
Joined: Fri Jan 24, 2014 6:22 pm

Re: Monitor Config - Source Tab - Remote Method?

Post by ConcreteRooster » Wed Jan 25, 2017 10:15 pm

bbunge wrote:...the user is expected to know something about network protocols. [...] As always, Google is your friend
If you could kindly point me to a link or two that discusses these protocols and and how they are used in Zoneminder, I would appreciate it.

There is of course no shortage of pages discussing all these protocols, but they are either in a general sense or specific to some other application. I don't know enough about how Zoneminder uses those different protocols to talk to monitors. Hence, my question.

Like I said, my camera worked using two different options. Short of diving into the code, how am I supposed to know how those to options differ behind the scenes?

Or, for example, HTTP is built on TCP, which is is by definition a unicast protocol. So what's the difference between RTP/unicast and RTP/RTSP/HTTP?

If I thought my understanding of these things was such that I could write useful documentation that would help others, I'd be happy to take a stab at contributing to the official docs.

SteveGilvarry
Posts: 418
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Monitor Config - Source Tab - Remote Method?

Post by SteveGilvarry » Wed Feb 01, 2017 8:15 pm

Feel free to try and update the documents, if you need a hand with doing so let me know as that was how I started working on ZM. It is using Sphinx documentation and format is restructured text http://www.sphinx-doc.org/en/stable/res ... rst-primer.
Remote
You can try looking at RTSP transport details on google. The code below shows which options does what, so RTP_unicast is unicast on udp. RTP_MULTICAST is multicast on udp. And both RTP/RTSP and RTP/RTSP/HTTP are unicast on TCP. There is something elsewhere that HTTP does but I am not across remote monitor type as I work with ffmpeg mostly. But I am willing to guess that it is the same as the FFMpeg option, which in their linked document below describes it as http tunnelling rtsp data to get through proxies.

Code: Select all

switch( mMethod )
  {
    case RTP_UNICAST :
    {
      localPorts[0] = requestPorts();
      localPorts[1] = localPorts[0]+1;

      message = "SETUP "+trackUrl+" RTSP/1.0\r\nTransport: RTP/AVP;unicast;client_port="+stringtf( "%d", localPorts[0] )+"-"+stringtf( "%d", localPorts[1] )+"\r\n";
      break;
    }
    case RTP_MULTICAST :
    {
      message = "SETUP "+trackUrl+" RTSP/1.0\r\nTransport: RTP/AVP;multicast\r\n";
      break;
    }
    case RTP_RTSP :
    case RTP_RTSP_HTTP :
    {
      message = "SETUP "+trackUrl+" RTSP/1.0\r\nTransport: RTP/AVP/TCP;unicast\r\n";
      break;
    }
    default:
    {
      Panic( "Got unexpected method %d", mMethod );
      break;
    }
  }
FFmpeg
Used to set the network transport mechanism, shown here https://ffmpeg.org/ffmpeg-protocols.html#rtsp under rtsp_transport
I actually intend to modify the name and options in that configuration, I think someone reused the remote GUI component, they are similar in function but not clear what you are doing is setting unicast vs multicast, udp vs tcp etc. Below is the code that says which option in the dropdown equals which rtsp_transport option.

Code: Select all

// Set transport method as specified by method field, rtpUni is default
  if (Method() == "rtpMulti") {
    ret = av_dict_set(&opts, "rtsp_transport", "udp_multicast", 0);
  } else if (Method() == "rtpRtsp") {
    ret = av_dict_set(&opts, "rtsp_transport", "tcp", 0);
  } else if (Method() == "rtpRtspHttp") {
    ret = av_dict_set(&opts, "rtsp_transport", "http", 0);
  }
Production Zoneminder 1.32.3
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests