Connecting Nx server with the camera behind a router
CompletedHi,
We are trying to connect a camera that is connected to a router to the Nx media server + client (hosted on a different network).
We have enabled the port forwarding for the camera in the router (RTSP port 554). But the nx media client is not able to detect the camera.
Can you please help to advise how to connect a camera behind a router using the router WAN port/interface.
-
Typically, an HTTP or HTTPS port is required as well, typically these are port 80 or port 443, but you should check this with your camera supplier.
-
Hi Norman,
Can you please explain the data flow when we initiate a "Search device" from the Nx client.. I presume the nx media server will send the discovery messages to search for the camera.
Can you please help to clarify how does this device discovery algorithm works. I mean what ports it uses to detect a device HTTP, RTSP etc.,
In our setup the camera is in a different network (mobile i.e. connected to the media server thru cellular). There are multiple routing domains from the source to the destination (where the nx media server & client) is installed.
We want to know the list of ports that need to be opened/white listed for the device discovery to work in our network.
Thank you -
We use mDNS, or multicast DNS for that purpose, which is a protocol used to discover devices on a local network. It allows devices on the same network to find each other without the need for a central server or naming authority.
When a device starts up on the network, it sends out an mDNS query asking if there are any other devices with a particular name or service type. This query is sent to a multicast IP address (224.0.0.251) and port (5353), which all devices on the network listen to.
If another device on the network has the name or service type being requested, it responds with its IP address and other relevant information. This response is sent back to the originating device using the same multicast IP address and port.
Once the device has received a response from another device, it can use the IP address to communicate with that device directly.
mDNS only works within the same subnet or broadcast domain. This means that devices must be connected to the same local network and have IP addresses within the same range in order to discover each other using mDNS.
If devices are on different subnets, they will not be able to communicate with each other using mDNS, as the multicast packets will not be routed between the subnets by default. In such cases, manual discovery of IP addresses is required to enable communication between devices and the Nx Mediaserver on different subnets.
-
You can do both. Default is HTTP, but HTTPS or RTSP is also possible.
For HTTP/HTTPS the Onvif API is used, unless there is a native integration (like for Axis, Hanhwa, etc.).
For RTSP, it is just the video stream in the as is state that is added and not further options are possible. -
Hi Norman,
For testing purpose can I use a media-server test camera app as a simulator (test camera device).
My intent is to verify the data ingestion over mobile network (5g) + NX media server + client running on the edge compute platform..
I mean I can point a test camera app (server ip: port no) as a device in the Nx client configuration.Could you please advise whether such a setup would work ? thanks
-
Thank you for your question about testing data consumption and bandwidth use for your particular situation. While it is possible to conduct a test to measure these metrics, it's important to note that the outcome of such a test might not be fully representative of your situation.
This is because data consumption and bandwidth use can vary significantly depending on the specific codecs being used, such as h.264 or h.265, as well as other factors such as network conditions, video resolution, and frame rate. Therefore, the results of a test conducted in one particular situation may not be applicable to another situation.
It's essential to conduct tests in different scenarios and situations to gain a more comprehensive understanding of data consumption and bandwidth use. Doing so will enable you to identify trends and patterns that will help you make more informed decisions about your video streaming requirements.
If you have any further questions, please don't hesitate to ask. We are always here to help you with any information you need.
-
When you execute the testcamera application, with the parameter --help, all possible configurations are shown.
--discovery-port[=]<value>
Port on which testcamera expects discovery messages from Servers which have camera
auto-discovery feature enabled. When running multiple testcamera processes on a single host,
even if in different subnets via --local-interface, using the same discovery ports is possible
only with --reuse-discovery-port and different values of --mac-address-prefix.
--media-port[=]<value>
Port on which testcamera serves the media stream. When running multiple testcamera processes
on a single host, even if in different subnets via --local-interface, media ports must be
different. -
I checked, and the testcamera application is available for Windows as well in the download section of the My Nx portal.
-
I recommend checking out the documentation that's available through the --help parameter. It's packed with useful information that can guide you through the different steps of using the app and answer any questions you may have.
Remember, learning by doing is one of the best ways to gain a deeper understanding of a new technology. So don't be afraid to experiment, try new things, and see what works best for you. And of course, if you do have any questions along the way, don't hesitate to reach out for assistance.
-
sorry.. This link is broken...How can I get the .35744 version of the server, client, test camera.. The docker version is a slightly older version of the server..
-
Sorry... reg ur earlier message on discovery port & media port, I think the test camera app works on the basis of the media server discovering the test camera app (mDNS)..
Since we are sending the stream across different routing domains, I would need a manual way of specifying the RTSP/HTTP port in the Test client without using the discovery feature of the media server. Is this feasible ?
Please find the below log of the testcamera..I'm not sure how to add the access control policies since some of the ports are dynamic...Loaded 1 video file(s). Starting 1 camera(s)...
2023-02-20 09:46:32.910 2cfc INFO nx::vms::testcamera::CameraPool(0x19d77b09870): Server started at 0.0.0.0:4985
2023-02-20 09:46:38.000 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:54293
2023-02-20 09:46:38.002 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:54294
2023-02-20 09:46:38.005 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:54295
2023-02-20 09:46:53.001 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:54293
2023-02-20 09:46:53.001 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:54294
2023-02-20 09:46:53.002 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:54295
2023-02-20 09:46:55.495 14d4 INFO Camera(92-61-00-00-00-01): Start streaming at 30 FPS. Server 169.254.68.2:51371, primary stream
2023-02-20 09:46:55.496 15b8 INFO Camera(92-61-00-00-00-01): Start streaming at 7 FPS. Server 169.254.68.2:51372, secondary stream
2023-02-20 09:47:07.989 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:54293
2023-02-20 09:47:07.990 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:54294
2023-02-20 09:47:07.991 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:54295
2023-02-20 09:47:13.666 14d4 WARNING Camera(92-61-00-00-00-01): Connection was closed by the Server. Server 169.254.68.2:51371, primary stream, file #0, frame #545 with PTS 1420504236253000 us
2023-02-20 09:47:13.667 14d4 INFO Camera(92-61-00-00-00-01): Stop streaming: Frame sending failed due to the above reason. Server 169.254.68.2:51371, primary stream, file #0, frame #545 with PTS 1420504236253000 us
2023-02-20 09:47:13.792 15b8 WARNING Camera(92-61-00-00-00-01): Connection was closed by the Server. Server 169.254.68.2:51372, secondary stream, file #0, frame #128 with PTS 1420504222353000 us
2023-02-20 09:47:13.792 15b8 INFO Camera(92-61-00-00-00-01): Stop streaming: Frame sending failed due to the above reason. Server 169.254.68.2:51372, secondary stream, file #0, frame #128 with PTS 1420504222353000 us
2023-02-20 09:47:13.794 15b8 INFO nx::vms::testcamera::CameraPool(0x19d77b09870): All active streams closed.
2023-02-20 09:47:23.089 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:54293
2023-02-20 09:47:23.090 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:54294
2023-02-20 09:47:23.092 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:54295
2023-02-20 09:47:38.033 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:54293
2023-02-20 09:47:38.033 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:54294
2023-02-20 09:47:38.033 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:54295
2023-02-20 09:47:41.929 aa4 ERROR CameraRequestProcessor(127.0.0.1:51388): Invalid MAC address "GET /axis-cgi/param.cgi" in received URL "GET /axis-cgi/param.cgi?action=list&group=root.Brand.ProdShortName,root.Network.eth0.MACAddress,root.ImageSource.NbrOfSources HT".
2023-02-20 09:47:42.197 1498 ERROR CameraRequestProcessor(127.0.0.1:51389): Invalid MAC address "" in received URL "\000\x01""\000\000\000\r\x01""\x10""'\x0F""\000\x03""\x06""$01M\r\000".
2023-02-20 09:47:42.453 149c ERROR CameraRequestProcessor(127.0.0.1:51390): Invalid MAC address "" in received URL "GET /page/factory/production/info HTTP/1.1\r\nAccept-Encoding: gzip\r\nConnection: keep-alive\r\nDate: Mon, 20 Feb 2023 01:47:42 GMT\r\n".
2023-02-20 09:47:42.706 35cc ERROR CameraRequestProcessor(127.0.0.1:51392): Invalid MAC address "GET /get" in received URL "GET /get?model HTTP/1.1\r\nAccept-Encoding: gzip\r\nConnection: keep-alive\r\nDate: Mon, 20 Feb 2023 01:47:42 GMT\r\nHost: 127.0.0.1:498".
2023-02-20 09:47:42.707 3260 ERROR CameraRequestProcessor(127.0.0.1:51393): Invalid MAC address "" in received URL "GET /common/info.cgi HTTP/1.1\r\nAccept-Encoding: gzip\r\nConnection: keep-alive\r\nDate: Mon, 20 Feb 2023 01:47:42 GMT\r\nHost: 127.0.0".
2023-02-20 09:47:42.716 2360 ERROR CameraRequestProcessor(127.0.0.1:51396): Invalid MAC address "GET /api/param.cgi" in received URL "GET /api/param.cgi?req=General.Brand.CompanyName&req=General.Brand.ModelName HTTP/1.1\r\nAccept-Encoding: gzip\r\nConnection: keep-a".
2023-02-20 09:47:42.717 2ffc ERROR CameraRequestProcessor(127.0.0.1:51395): Invalid MAC address "" in received URL "GET /cgi-bin/design/html_template/Login.html HTTP/1.1\r\nAccept-Encoding: gzip\r\nConnection: keep-alive\r\nDate: Mon, 20 Feb 2023 01:".
2023-02-20 09:47:42.717 31c8 ERROR CameraRequestProcessor(127.0.0.1:51397): Invalid MAC address "GET /get.oid" in received URL "GET /get.oid?2.27 HTTP/1.1\r\nAccept-Encoding: gzip\r\nConnection: keep-alive\r\nDate: Mon, 20 Feb 2023 01:47:42 GMT\r\nHost: 127.0.0.1:".
2023-02-20 09:47:42.717 36bc ERROR CameraRequestProcessor(127.0.0.1:51398): Invalid MAC address "GET /cgi-bin/cmd/system" in received URL "GET /cgi-bin/cmd/system?SYSTEM_INFO HTTP/1.1\r\nAccept-Encoding: gzip\r\nConnection: keep-alive\r\nDate: Mon, 20 Feb 2023 01:47:42 GMT".
2023-02-20 09:47:42.718 1c4c ERROR CameraRequestProcessor(127.0.0.1:51399): Invalid MAC address "" in received URL "GET /ISAPI/System/Network/Integrate HTTP/1.1\r\nAccept-Encoding: gzip\r\nConnection: keep-alive\r\nDate: Mon, 20 Feb 2023 01:47:42 GMT".
2023-02-20 09:47:42.718 37a0 ERROR CameraRequestProcessor(127.0.0.1:51400): Invalid MAC address "" in received URL "GET /stw-cgi/attributes.cgi/attributes HTTP/1.1\r\nAccept-Encoding: gzip\r\nConnection: keep-alive\r\nDate: Mon, 20 Feb 2023 01:47:42 ".
2023-02-20 09:47:42.718 1260 ERROR CameraRequestProcessor(127.0.0.1:51401): Invalid MAC address "GET /api/param.cgi" in received URL "GET /api/param.cgi?req=General.Brand.CompanyName&req=General.Brand.ModelName HTTP/1.1\r\nAccept-Encoding: gzip\r\nConnection: keep-a".
2023-02-20 09:47:42.722 35ec ERROR CameraRequestProcessor(127.0.0.1:51403): Invalid MAC address "" in received URL "GET /ISAPI/Security/ONVIF/users/ HTTP/1.1\r\nAccept-Encoding: gzip\r\nConnection: keep-alive\r\nDate: Mon, 20 Feb 2023 01:47:42 GMT\r\nH".
2023-02-20 09:47:42.767 371c ERROR CameraRequestProcessor(127.0.0.1:51404): Invalid MAC address "GET /get" in received URL "GET /get?model HTTP/1.1\r\nAccept-Encoding: gzip\r\nConnection: keep-alive\r\nDate: Mon, 20 Feb 2023 01:47:42 GMT\r\nHost: 127.0.0.1:498".
2023-02-20 09:47:42.778 1ec8 ERROR CameraRequestProcessor(127.0.0.1:51405): Invalid MAC address "" in received URL "POST /onvif/device_service HTTP/1.1\r\nHost: 127.0.0.1:4985\r\nUser-Agent: gSOAP/2.8\r\nContent-Type: application/soap+xml; charset=ut".
2023-02-20 09:47:42.815 c88 ERROR CameraRequestProcessor(127.0.0.1:51406): Invalid MAC address "GET /get" in received URL "GET /get?model HTTP/1.1\r\nAccept-Encoding: gzip\r\nConnection: keep-alive\r\nDate: Mon, 20 Feb 2023 01:47:42 GMT\r\nHost: 127.0.0.1:498".
2023-02-20 09:47:42.816 17ec ERROR CameraRequestProcessor(127.0.0.1:51407): Invalid MAC address "" in received URL "POST /onvif/device_service HTTP/1.1\r\nHost: 127.0.0.1:4985\r\nUser-Agent: gSOAP/2.8\r\nContent-Type: application/soap+xml; charset=ut".
2023-02-20 09:47:42.831 3594 ERROR CameraRequestProcessor(127.0.0.1:51408): Invalid MAC address "GET /get" in received URL "GET /get?model HTTP/1.1\r\nAccept-Encoding: gzip\r\nConnection: keep-alive\r\nDate: Mon, 20 Feb 2023 01:47:42 GMT\r\nHost: 127.0.0.1:498".
2023-02-20 09:47:42.834 309c ERROR CameraRequestProcessor(127.0.0.1:51409): Invalid MAC address "" in received URL "POST /onvif/device_service HTTP/1.1\r\nHost: 127.0.0.1:4985\r\nUser-Agent: gSOAP/2.8\r\nContent-Type: application/soap+xml; charset=ut".
2023-02-20 09:47:43.105 2564 ERROR CameraRequestProcessor(127.0.0.1:51410): Invalid MAC address "" in received URL "POST /onvif/device_service HTTP/1.1\r\nHost: 127.0.0.1:4985\r\nUser-Agent: gSOAP/2.8\r\nContent-Type: application/soap+xml; charset=ut".
2023-02-20 09:47:52.982 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:54293
2023-02-20 09:47:52.983 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:54294
2023-02-20 09:47:52.997 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:54295
2023-02-20 09:48:07.985 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:54293
2023-02-20 09:48:07.986 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:54294
2023-02-20 09:48:07.988 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:54295
2023-02-20 09:48:09.968 2fa8 INFO Camera(92-61-00-00-00-01): Start streaming at 30 FPS. Server 169.254.68.2:51974, primary stream
2023-02-20 09:48:10.069 c38 INFO Camera(92-61-00-00-00-01): Start streaming at 7 FPS. Server 169.254.68.2:51975, secondary stream
2023-02-20 09:48:22.998 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:54293
2023-02-20 09:48:22.998 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:54294
2023-02-20 09:48:23.004 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:54295
2023-02-20 09:48:38.019 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:54293
2023-02-20 09:48:38.019 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:54294
2023-02-20 09:48:38.029 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:54295
2023-02-20 09:48:53.041 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:49267
2023-02-20 09:48:53.041 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:49268
2023-02-20 09:48:53.043 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:49269
2023-02-20 09:48:54.146 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:49267
2023-02-20 09:48:54.147 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:49268
2023-02-20 09:48:54.153 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:49269
2023-02-20 09:49:08.029 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:49267
2023-02-20 09:49:08.029 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:49268
2023-02-20 09:49:08.031 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:49269
2023-02-20 09:49:23.037 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:49267
2023-02-20 09:49:23.037 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:49268
2023-02-20 09:49:23.040 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:49269
2023-02-20 09:49:38.049 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:49267
2023-02-20 09:49:38.049 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:49268
2023-02-20 09:49:38.066 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:49269
2023-02-20 09:49:53.058 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:49267
2023-02-20 09:49:53.059 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:49268
2023-02-20 09:49:53.063 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:49269
2023-02-20 09:50:08.063 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:49267
2023-02-20 09:50:08.063 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:49268
2023-02-20 09:50:08.080 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:49269
2023-02-20 09:50:23.069 2cc4 INFO CameraPool: Got discovery message from Server 169.254.68.2:49267
2023-02-20 09:50:25.782 2cc4 INFO CameraPool: Got discovery message from Server 172.20.0.177:49268
2023-02-20 09:50:25.783 2cc4 INFO CameraPool: Got discovery message from Server 127.0.0.1:49269
Please sign in to leave a comment.
Comments
15 comments