Why Your CCTV App Lags: Bandwidth Math for Remote Viewing in Kenya
The cameras record clean footage all day. It is only when you open the app from home or from another branch that the picture stutters, buffers, or refuses to load. This is one of the most common complaints we hear, and it is almost never the cameras. It is bandwidth, and specifically the half of your connection nobody quotes you on.
Remote viewing uses your upload, not your download
When you watch your cameras from somewhere else, the video has to leave the site. That uses upload bandwidth. Kenyan broadband is sold on the download figure, and upload is usually much smaller. A plan advertised at 30 Mbps down might give you only 5 Mbps up, sometimes less on the cheaper home packages that shops often run on.
So the question is not "how fast is my internet." It is "how much can my site upload at once," and that is the number that decides whether remote viewing works.
Do the bitrate math
Each camera streams at a bitrate. Rough figures for the full-quality (main) stream:
- 1080p camera on H.264: around 4 Mbps
- 1080p camera on H.265: around 2 Mbps
- 4MP camera: higher again, 4 to 8 Mbps depending on codec and scene
Now multiply. Four 1080p H.264 cameras at full quality is about 16 Mbps of upload if you view them all at once. Your 5 Mbps upload cannot carry that, so the app buffers and drops frames. The cameras are fine. The pipe out of the building is full.
The fix most installers skip: dual streams
Nearly every IP camera can send two streams at once. A high-bitrate main stream that the recorder stores locally, and a low-bitrate sub stream (often 512 Kbps to 1 Mbps) meant for live viewing over the internet. Your phone should be pulling the sub stream, not the main stream.
Configured properly, four cameras on sub streams need maybe 2 to 4 Mbps of upload total, which fits. You still keep the full-quality recording on the recorder for when you need to review or export an incident. Most laggy systems we are called to fix are simply set to serve the main stream to the app. Switch to the sub stream and the problem disappears without touching the hardware or the internet plan.
H.265 halves your bandwidth for free
If your cameras and recorder support H.265 (also called HEVC), turn it on. It gives roughly the same image quality as H.264 at about half the bitrate, which means half the upload and half the storage. Older phones or a mixed set of cameras sometimes force you back to H.264, so check compatibility, but where it works it is the cheapest upgrade you will ever make.
CGNAT: why you sometimes cannot connect at all
Bandwidth explains stuttering. A different problem explains "the app cannot reach the cameras" entirely. Many Kenyan connections, especially 4G routers and some fibre home plans, put you behind carrier-grade NAT (CGNAT). You do not get a real public IP address. You share one with many other customers.
That matters because the old approach of port forwarding, opening a port on your router so the app can dial in, simply does not work behind CGNAT. There is no address to dial. This is why so many DIY setups "work on the shop Wi-Fi but not from outside."
Two ways around it:
- Manufacturer P2P: most modern systems (Hikvision, Dahua, and the brands built on them) use a cloud relay with a QR-code scan. This punches through CGNAT without a public IP and is what we set up by default.
- A VPN back to the site: more private and more control, better for multi-branch operations, but needs a connection or router that supports it.
If remote access matters to you and you are on a 4G or budget fibre plan, ask your ISP whether you are behind CGNAT before anyone tries to configure port forwarding. It saves an afternoon of chasing a setting that was never going to work.
One more number: storage
The same bitrate that fills your upload also fills your hard drive. A single 1080p H.264 camera at 4 Mbps writes roughly 40 GB a day. Four of them recording around the clock is over 150 GB a day, so a 2 TB drive holds under two weeks. Switch those cameras to H.265 and you roughly double the days you keep before old footage is overwritten. Decide how many days of history you need, then size the drive to match. Working out how long footage lasts after an incident already happened is the wrong time to learn your retention was three days.
Want CCTV you can actually watch from your phone without the lag?
Talk to us