Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

Frame age p95 and bytes per viewer for H.264 versus MJPEG are measured on the public URL and written in the README #430

Merged opened this

Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.

Merged

Continues #430

Notes

shipped merged

opened this

Continues #430

Changes requested — before the latest push

The pull adds the measuring tool and its tests, but not what the title and issue #403 ask for: the numbers. The diff touches only Software/so101/bench/video-trial.{ts,test.ts}. There is no README change, so nothing says how to run the trial, and there is no measured frame age p95 or bytes per viewer for H.264 versus MJPEG on the public URL. Fix first: run bun run bench/video-trial.ts https://arm--forge-trevato-apps.open-platform.sh --feed frames,h264 --net wifi (and 4g if you can), and write the results in the README with the command, date and network. If the sandbox cannot reach the public URL for a run that long, say so and use the preview with a shorter --seconds. Add a short README how-to-run section for the script. Smaller points: the doc comment says frames/h264 are the default but the usage text lists stream too, which is fine, but the long comment line at the top is hard to read, so wrap it. The empty catch blocks in watch() and h264Trial swallow errors silently, and a comment on why would help. The tests look sound and cover the arguments and proxy handling.

commented

This pull adds Software/so101/bench/video-trial.ts, a tool that measures a deployed camera's video the way a viewer receives it. It also adds a Video trial section to Software/README.md with how to run it and the first numbers from the public URL. Issue #403 is not fully met: there are no H.264, home wifi or 4G numbers yet, and the README says so.

The tool (bun run so101/bench/video-trial.ts <url> [--feed frames,h264,stream] [--net wifi|4g] [--seconds 600] [--camera 1]) watches each feed in turn and prints one line per feed:

  • pictures per second and bytes per second to that one viewer;
  • freezes, meaning gaps of 1 s or more without a new picture, and the longest gap;
  • for H.264, the frame age p50/p95, taken the same way the page takes it;
  • with --net, whether the 250 ms (wifi) or 500 ms (4G) target with 0 freezes was met, printed as target MISSED when it wasn't.

Two limits are written in the README. The H.264 age covers relay to arrival only, not capture to shown. The JPEG feeds carry no timestamp, so their age can't be measured.

Measured on 2026-10-21 against production, run from the forge sandbox (a datacenter link, not wifi or 4G). The main run was 120 s, not 10 minutes:

FeedBytes per viewerfpsFreezes (longest gap)Target
frames (what the page shows)398.7 KiB/s10.11 (1648 ms); socket closed at 35.7 smissed
stream356.8 KiB/s9.03 (11 970 ms)missed
h264———not measurable
  • MJPEG cost: one MJPEG viewer costs about 3 Mb/s. That is roughly twice the 720p H.264 rung (~1.5 Mb/s) and 5× the 480p rung a watcher starts on.
  • No H.264 on production: production offers no H.264 for camera 1 (/cameras reports "h264": false and the socket is refused), so frame age p95 and H.264 bytes could not be taken.
  • Still owed: the H.264, wifi, 4G and 10-minute rows are in the README as "not measured yet". They need the Pi's renditions running, ARM_H264_1 set on the relay, and a person running the tool from each network.

Review points addressed: the README now has the how-to-run section and the results with command, date and network. The long header comment is wrapped. The two empty catch blocks now say why they ignore the error. I used production rather than a preview: production was reachable, and a preview offers no H.264 either.

Code notes:

  • Bun's WebSocket doesn't use HTTPS_PROXY by itself, so the tool passes the proxy explicitly and skips it for loopback and NO_PROXY hosts. That has its own test.
  • bun test bench/video-trial.test.ts passes, 8 tests. The bench/ folder is outside tsconfig's include, so I type-checked the two new files with a temporary config and they report no errors. The repository's own tsc --noEmit reports 32 lines of errors in src/; none come from these files, which it doesn't check.

🤖 Generated with Claude Code

Approved

Approved as an honest partial. The tool imports QUIET_MS, RETRY_MS and parseFrame from modules that really export them, so it reuses the page's own logic. The README states its limits: frame age is relay-to-arrival, the JPEG feeds have no timestamp, and the runs were 120 s from a datacenter link. Tests cover the percentile, freeze, age, argument and proxy logic, and run the three trials against a real relay. The preview's /cameras says h264:false, so no H.264 number can be taken there either. This is a bench tool with no write path, so the security and both-doors items do not apply.

Issue #430 itself is not met: there are no H.264, wifi or 4G numbers. Next:

  1. Do not close #430 on this pull. Keep it open, or re-brief it as blocked on the Pi renditions (8082-8084), ARM_H264_1 on the relay, and a person on wifi and then 4G, then fill the owed table.
  2. Order the README Measured rows by time (the 07:21 row comes after 07:28) and say in one line that bench/ is outside tsconfig, so tsc does not check it.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs