Sixteen 1080p channels on RK3588, and the encoder that stops you at twelve
Sixteen cameras at 1080p and 25 frames per second is 400 frames a second and about 830 million pixels a second. An RK3588 has the decode side for that: Rockchip rates the decoder at 8K at 60 fps, and appliances built on the chip are routinely quoted at around 32 channels of 1080p. What a finished box actually promises is lower, and the reason is not the neural network.
A published engineering walk-through of one 16-channel appliance makes the point explicitly. Its ceiling is the shared hardware encoder, at roughly 12 to 16 channels of 1080p H.265, and the team plans stable deployments at about 12 channels while keeping 16 as a boundary test. Rockchip's own product page lists 8K at 30 fps for encoding and no channel count at all, so the 12-to-16 band is one integrator's derating of a shared resource, not a specification you can hold a supplier to. Keeping those two kinds of number apart is the difference between a capacity plan and an argument.
One channel, hop by hop
The interesting part of the design is how little of the frame is ever touched. A pipeline that converts every frame to BGR and back spends its CPU on pixels nobody will look at; this one converts only the frames it recognises.
| Stage | What the data is at that point |
|---|---|
| Arrival | H.264 or H.265 access units with PTS, DTS and keyframe flags, still compressed |
| Decode | NV12 in DMA buffers, two planes with stride and dma_fd, CPU not in the pixel path |
| Frame selection | the scheduler marks a frame as recognition, plain output, or droppable |
| Recognition frame only | NV12 converted to a BGR24 matrix, which is what every algorithm consumes |
| Inference | a UINT8 NHWC RGB tensor handed to the NPU, one run per selected frame |
| Composite | a single BGR frame carrying detections, regions and rule state together |
| Encode and delivery | back to NV12, MPP hardware encode, then WebRTC, RTMP, FLV, HLS or MP4 |
Two details in that table are worth more than the rest. The first is that one composited frame is shared by streaming, alarms and business logic, so the box does not render the same picture three times. The second is that a channel with no algorithm and no overlay can forward the original packets without decoding at all, which removes it from the encoder budget entirely.
Decode is not the bottleneck; encode is
The counters are asymmetric, and that asymmetry is the whole design constraint.
| Resource | Rating quoted in the walk-through | Where it bites |
|---|---|---|
| Hardware decode | about 32 channels of 1080p, 8 channels of 4K at 25, one stream of 8K at 60 | rarely the limit |
| Hardware encode | about 12 to 16 channels of 1080p at 25 in H.265, 3 to 4 channels of 4K | the limit, once each channel is overlaid and re-encoded |
| NPU | 6 TOPS across three cores; no channel cap in the algorithm code | depends on model, interval and combination |
The arithmetic that follows is the kind of thing that decides a purchase order. Overlaying a result image and re-encoding every channel is what saturates the encoder, not the inference. Passthrough channels avoid it, lower resolution or frame rate delays it, and nothing about the model quality moves it. A twelve-channel deployment with headroom and a sixteen-channel demonstration are different products, and only one of them should be sold as sixteen.
One detection, eleven rules
The reason a multi-channel box can run many algorithms per camera is that most of those algorithms are not models. A single general object detector runs once per interval on a channel, and eleven rule families consume its output: region intrusion, line crossing, area alert, loitering, tracking, absence from post, directional movement, virtual fence, illegal parking, congestion and object co-occurrence.
Adding a rule costs CPU time for rule evaluation and drawing. It does not cost another inference. Per-channel dedicated models are the exception: a channel that needs its own class set or thresholds loads its own compiled model and its own parameters, and pays a separate preprocess, inference and postprocess on that channel's budget. Targeted libraries for face, plate, OCR and person re-identification combine with both, per channel.
Capacity in this scheme is not a count of supported algorithm types. It is the per-inference cost multiplied by the number of calls per second. One detection per second per channel across sixteen channels is 16 calls a second; a 200 ms interval makes it 80. A dedicated model on every channel adds 16 more; an OCR pass adds another 16, at a heavier per-frame cost. That is the number to size hardware against, and it is why the same box can be described honestly as sixteen channels or as four.
Three queues and two layers of dropping
The failure mode that kills multi-channel appliances is not a slow model. It is one queue that every stage waits on. This design keeps three: a sync queue between pulling and decoding, an alarm queue between recognition and HTTP delivery, and a per-channel stream queue between compositing and the output library.
Each has its own consumer, and each has an overflow policy that is written down rather than discovered in the field. The stream queue drops old plain frames first and protects recognition frames and keyframes; if nothing plain is left, a newer protected frame may replace an older one, because a queue that only holds stale results is worse than a queue that holds fewer frames. The alarm queue retries with backoff up to ten attempts and is bounded, so a broken receiver cannot eat memory. The sync queue holds compressed packets at a depth of about ten and deliberately does not discard packets to stay short, since dropping from a real-time H.264 stream breaks the reference chain for every frame that follows.
Above the queues sits a per-channel scheduler that aggregates pressure every 500 ms and hands out a rolling processing budget of roughly 900 ms per second. Inside the budget it raises the recognition rate; under congestion it lowers the quota; on recovery it eases back with hysteresis so the box does not oscillate between full speed and throttled. Frame dropping happens in two places — after decode, where expired non-recognition frames are skipped, and in the stream queue, where the output interval is adjusted to what the encoder can actually deliver.
The zero-copy path they abandoned
The most useful section of the write-up is the one that explains why colour conversion is still on the CPU, given that the silicon has a 2D accelerator for exactly this job.
The chain needs RGB tensors, and the decoder emits NV12. Something has to convert. The hardware route is the RGA 2D engine reading dma-buf handles; the software route is OpenCV. This team tried the hardware route in parallel across channels and hit crashes and hangs — concurrent RGA contexts, dma-buf import and export, cache maintenance and driver scheduling contention — and concluded it was not stable enough for sixteen channels running continuously. Their OCR detector carries a comment to the same effect: RGA fails on buffers that are not dma-buf, and its internal CPU fallback is slower than plain OpenCV at eight channels, so that path converts and resizes on the CPU instead.
The fast path exists in the tree and is disabled: a variant that points the RGA destination directly at a preallocated RGB matrix, avoiding the extra copy, is hard-wired to return false because the driver was unstable at eight concurrent channels even with a mutex. The preallocated buffers that remain in the code do address alignment and stride packing, not colour conversion.
So the honest accounting is that low CPU utilisation here comes from doing less work, not from doing the work in hardware. Only recognition frames are converted, non-recognition frames exit early, the result image is reused, and passthrough channels skip everything. On a four-channel sample with regions configured, the same write-up reports CPU at about 41 per cent, with non-recognition frame conversion between 9 and 38 ms and rule drawing between 1.6 and 7.7 ms. It states plainly that this cannot be extrapolated linearly to sixteen channels.
An LLM in the loop, off the critical path
The box also supports model-based review of alarms, and the architecture is more interesting than the feature. Review never sits in front of decode, inference or streaming: it is throttled, asynchronous, and resolved by callback.
A review binding carries an interval, a set of model tasks, keywords and a prompt. For a device with no algorithm, only keyframes are decoded and only when the interval has elapsed; a keyword hit is enough to raise an alarm. For an algorithm alarm, the composited result image and the alarm JSON are submitted at most once per interval, de-duplicated by a signature of that payload. The request goes out asynchronously with a strict-JSON contract, and the callback reads a verdict of confirmed, rejected or invalid.
The interesting rules are what happens when the model does not answer cleanly. An explicit rejection drops the alarm and marks its private recording for deletion. A confirmation keeps both and writes the verdict back into the alarm JSON. A timeout or an unparseable verdict falls back to delivering the original alarm, so a flaky model cannot suppress a real event; only candidates that exist purely because of model review, with no algorithm hit behind them, are dropped, so the same failure cannot manufacture a false one either.
How to accept one of these
The measuring plan in the write-up is the part a buyer should copy. Load is added in stages with camera settings, firmware and measurement method held constant: sixteen channels of ingest, then sixteen channels with overlay and streaming, then region rules enabled channel by channel, then dedicated and targeted models, then recording, review and real clients.
Per channel, the recorded set is input frame rate and decode success, recognition frame rate and interval, output frame rate and encode time, end-to-end latency at the 50th, 95th and 99th percentile, sync and stream queue peaks, CPU, NPU, memory and temperature, and drop rate against recording continuity. Three of those numbers are kept apart on purpose: recognition frame rate, output frame rate and end-to-end latency are different measurements, and a system that reports one of them as though it were the others is hiding the trade it made.
There is no fixed latency figure anywhere in the design, and that refusal is the most credible thing in it. Latency depends on channel count, model, encoder load, network, client and configuration. What the design guarantees instead is direction: the chain keeps moving, recognition keeps producing at the budgeted rate, and the client receives the newest frame available rather than one queued behind a backlog. That is a weaker promise than a millisecond number and a much more useful one to design a deployment around.