Limited upload bandwidth with scattered network cameras.

DZSYSTEMS

n3wb
Joined
Oct 31, 2016
Messages
12
Reaction score
1
I have deployed several 4MP hikvision cameras through out a point to point wireless network in a rural area. The wireless network vendor notified me that we were saturating the upload bandwidth on one of the locations that has 4 cameras installed. Due to limitations on the network I installed a video server (Trying blue Iris, and PCNVR, not at the same time) to pull the streams to a location off of the wireless network to one location for ease of viewing.

The vendor has customer isolation and even with public IP address's the individual locations cannot be viewed while on their network. So viewing has to be done from that particular site or from off network.

I am looking for a solution that would only pull the stream when requested, similar to how IVMS works on a cell/tablet when accessing individual cameras, but act like a video server in that all streams can be viewed as one source.

Looking for suggestions.

Thanks
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,007
Location
USA
Unfortunately most NVR programs continuously stream video. To use them, you'd either have to host the video servers locally and forget about having one centralized place to view the streams, or cut the streaming bit rates drastically so the network operator doesn't have a problem with it anymore. Unless installing and maintaining your own network is an option.

I have a project that might interest you. bp2008/cameraproxy However it is extremely limited in what it does, and not user-friendly. It will pull H.264 streams from any number of cameras only when requested, but it doesn't know how to stream H.264 so you're stuck with MJPEG as an output format.

Whatever you do, do not expose cameras directly to the internet (e.g. with port forwarding or UPnP) as they will be hacked. The same applies to NVRs, particularly those that are infrequently or never updated. These devices get hacked on an hourly basis and become part of a botnet, hacking other devices and participating in DDOS attacks, and could easily be contributing to a network saturation problem.
 

DZSYSTEMS

n3wb
Joined
Oct 31, 2016
Messages
12
Reaction score
1
bp2008
Your project does look interesting. I need to re-visit some of my current practices regarding forwarding and move to VPN connections.

With your cameraproxy, would I need a windows computer at each location or would I use VPN to connect each camera to a outside network PC?

I haven't fininshed reading the VPN thread, so maybe the answer can be quick and not distract to far off this original topic. Is using a VPN user friendly for customers that want remote access to NVR's to view from their device. In other words is there multiple steps involved or do they just use the app like normal? (ie IVMS)?
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,007
Location
USA
VPNs are not customer-friendly. Not in the slightest. Some VPN types have built-in support in most modern operating systems, but still require additional steps that most users have never done before, setting up the VPN connection and connecting to it before they are able to even begin connecting to the NVR.

The way the camera proxy app works, you install it on a windows machine somewhere with sufficient network connectivity to the cameras and to the rest of the world. People connect to camera proxy's built-in web server via a forwarded port. Camera proxy then connects to individual cameras and pulls their streams, transcodes to jpeg, and provides jpeg frames to the user. So the cameras either need to be on the same network as the camera proxy server, or accessible via an always-on VPN, or the cameras need to have their RTSP ports forwarded. It is much safer to port forward to a camera if you can restrict the source address to a single IP address (of your camera proxy / Blue Iris / whatever server). I think most routers support source address restrictions for their port forwarding rules.

Camera proxy does not have a modern web UI though. You either need to develop that yourself or just use the included pages which are very crude.
 

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,342
Reaction score
3,524
If you have line of sight, you could make your own point-to-point network directly between the nodes.
 

DZSYSTEMS

n3wb
Joined
Oct 31, 2016
Messages
12
Reaction score
1
If you have line of sight, you could make your own point-to-point network directly between the nodes.
We thought about it originally. It was going to be too difficult, and expensive, to deploy which is why we went with the current wireless point to point network operator.

Camera proxy does not have a modern web UI though. You either need to develop that yourself or just use the included pages which are very crude.
Can the jpeg frames be embedded into something like freeboard.io?
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,007
Location
USA
We thought about it originally. It was going to be too difficult, and expensive, to deploy which is why we went with the current wireless point to point network operator.
The hardware is actually surprisingly cheap. For less than the cost of one good starlight camera, and a setup process that is no more technical than setting up cameras, you could set up a 5+ mile point-to-point radio link that delivers > 100 Mbps of throughput reliably. Where it gets expensive is when you don't have line of sight between the locations you have access to, and you have to establish a repeater site.

Can the jpeg frames be embedded into something like freeboard.io?
I don't know anything about freeboard.io, so I don't know how much scripting it would take, but I imagine you could.
 

DZSYSTEMS

n3wb
Joined
Oct 31, 2016
Messages
12
Reaction score
1
Where it gets expensive is when you don't have line of sight between the locations you have access to, and you have to establish a repeater site.
This is exactly the reason we didn't. There is no line of sight and the network operator has already established repeaters to support their customers.

I'll give it a shot over the weekend and see what I can come up with. Thanks for your suggestions.
 

DZSYSTEMS

n3wb
Joined
Oct 31, 2016
Messages
12
Reaction score
1
So the cameras either need to be on the same network as the camera proxy server, or accessible via an always-on VPN, or the cameras need to have their RTSP ports forwarded.
So I tried using the forwarded RTSP port but didn't have much luck. It actually locked one of the cameras for too many password attempts. However using the jpg camera type works using the picture stream from the hikvision camera.

If the camera needs RTSP authentication am I to use
Code:
rtsp://username:password@ipaddress:port/Streaming/channels/101 ?
The port to serve the RTSP on setting, is that supposed to match the camera port or be an open available port on the windows machine?
 

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,457
Reaction score
38,173
Location
Alabama
@DZSYSTEMS , If you use Blue Iris, you want have any cameras exposed directly to the Internet. Blue Iris can send a JPEG snapshot on demand or stream MJPG to a valid remote user.

Just create a new user in BI with password. You can decide how long to allow streaming and also limit bandwidth.
Use these URL for the camera or cameras.

For the user to receive a snapshot, they would use the URL http://Your-WAN-IP:BlueIris-PORT/image/Cam3?q=50&s=80 .
That example URL used optional quality (q) and scale (s) parameters. Quality is a percentage from 1-100, and scale may be any number >0.
Replace 'BlueIris-PORT' with your Blue Iris server's port and 'Cam3' with the short name of the camera desired to supply the snapshot.

To test on your LAN, use the LAN IP of the Blue Iris server in place of the WAN IP above.

To request remotely a MJPG stream from a camera, use the URL stream http://Your-WAN-IP:BlueIris-PORT/mjpg/Cam3/video.mjpg
Just like in the case of the JPEG snapshot, replace 'BlueIris-PORT' with your Blue Iris server's port and 'Cam3' with the short name of the camera desired to supply the stream.

Configure settings on the 'user' page to set limits on bandwidth, log on time, etc.

Windows PC's can use any browser to view the JPEG snapshot and VLC to view the MJPG stream (open VLC and enter the URL under 'Media', then 'Open Network Stream' . An iPhone using Safari can view the JPG snapshot and the MJPG stream.

In both cases, either requesting a snapshot or a stream, after the URL has been entered, the user will be presented with a Blue Iris login screen. After successfully logging in, the snapshot or stream can be viewed.

I created a DDNS hostname for the test and you might find that helpful to control the remote user instead of handing out your WAN IP. If you decide to disable all remote viewers just disable the hostname or disable a specific user.

EDIT: I jumped the gun on this method: in order to keep the remote user from changing camera short name in URL and viewing a camera you do NOT want them to view or changing URL to a valid Blue Iris .htm file in the 'www' directory, you must configure the user and create a simple .htm file and place in BI's 'www' directory as described in my post #7 ==>> here.

I apologize if this has caused any inconvenience.
 
Last edited:

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,457
Reaction score
38,173
Location
Alabama
@TonyR Wouldn't blue iris need to constantly pull the streams for this to function?
Yes, but only on the LAN (camera to BI server). My understanding was the need for low bandwidth when remotely (WAN) requesting & receiving the stream. I though the cams & server was at one location and you were looking to receive those streams off-site.

I guess I misinterpreted the description of your requirement.
 
Top