Repository navigation
fix(video): the panel's video bandwidth is an option, 256 kbit/s by default - #161
Conversation
|
Thanks, this is a clear report and a small, readable fix: the numbers (10× the packets, losses in bursts, 321 ms on A few things before it goes in:
I'll try both values on my 40507 (2-wire, local) before merging. Thanks again! |
|
Tried this on my 40515 over the Vimar cloud (TLS + SRTP), 1.0.21 with this PR merged on top: 8 outside view calls of 15 to 19 s at each value, one a minute, switching from the options page (the entry reloads by itself, nice).
Medians over the clean calls (6 at 2048, 7 at 256). One call at each value had the panel stop sending video after half a second while audio went on, so that looks unrelated to the bandwidth. I dropped one more 2048 call because someone actually rang the door in the middle of it (the only packet loss of the whole test was there). At 256 this panel doesn't just squeeze the bitrate, it drops to 320x240 at 15 fps. So the "same 720x576" note in My take on the default: startup is the same either way, and my cloud path had zero loss at 2048 in the clean calls, so here 256 only costs picture size and I'd keep 2048 for myself. If you go with lollox80's "Automatic = 256 on the cloud", that's fine by me as long as the option text says 256 can mean a smaller picture, something like |
|
Hi @m4r1k, a short follow-up to my comment above, now that @Apeiv has measured both values on his 40515 over the cloud (thanks, Apeiv!):
Points 1-3 of my earlier comment still apply (the Before you update line, the option in |
…default 1.0.19 (ha-vimar#84) asks every panel for 2 Mbit/s of video instead of 256 kbit/s. It was measured on a 40515, whose relay path loses nothing. A Tab 7S Up 40517 over the cloud relay honours it too: in HomeKit views on 1.0.20 the re-encoder received about 200 video packets per second, against about 20 on 1.0.18, and 21 of them were lost in one 12 s view (bursts of up to 7), where the same views lost 0-2 before. On the phone and in the card the video smeared, froze and lagged; the re-encoder's frame delay went back to 321 ms on the first view (47-72 ms before). The bandwidth is now an option on the HomeKit page, next to the re-encoding switch, though it applies to every video from the panel (card, camera, /av, HomeKit): 256 kbit/s (default, the value before 1.0.19) or 2 Mbit/s. runtime keeps the pair (video, session) and the SDP reads it; an unknown value falls back to the default. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It changes every video from the panel (card, camera, /av, HomeKit), so it belongs on "Vimar Intercom settings", next to the other media options, not on the HomeKit page where someone without HomeKit would never look. A saved choice is kept when the page is saved without it, and the HomeKit page keeps it untouched. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tate From @lollox80's and @Apeiv's reviews of ha-vimar#161: - The default is "Automatic", like view_keepalive's: 2048 on local UDP, 256 over the cloud relay; 256 and 2048 stay as manual choices, no values in between (runtime.video_bandwidth_choice; an unknown value is automatic). - The comment above the constants said the 40515 keeps 720x576 at 256: Apeiv measured it drops to 320x240 at 15 fps (720x576 at 24 fps at 2048, no loss on his cloud path, same first-frame time). It now gives both panels' measurements. - Labels and descriptions (it, en) say what each value costs: 256 is "lower resolution on some panels", 2 Mbit/s needs a clean connection. - docs/CONFIGURATION(.it).md list the option; TROUBLESHOOTING(.it).md get a row for smeared, frozen or lagging video. - The SDP test restored nothing after runtime.configure(): it now puts every runtime global back through monkeypatch, and covers automatic on both transports, both forced values and an unknown one. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
bac91de to
9fdccc8
Compare
|
@lollox80 @Apeiv thanks both, and for the measurements on the 40515. All addressed in
Looking forward to your 40507 run. |
|
Thanks @m4r1k, this covers everything we asked: Automatic by transport (2048 on local UDP, 256 over the cloud) plus the two fixed values, honest labels, the corrected note in const.py, docs and troubleshooting rows in both languages, and the |
lollox80
left a comment
There was a problem hiding this comment.
Thanks, this covers everything from both reviews:
- "Automatic" by transport (2048 on local UDP, 256 over the cloud), 256/2048 as manual choices, unknown values fall back to automatic.
- The const.py comment now has Apeiv's 40515 numbers and the 40517 ones.
- Labels say what each value costs; CONFIGURATION and TROUBLESHOOTING (it/en) updated.
- The SDP test restores runtime's globals through monkeypatch and covers both transports, both forced values and an unknown one.
- The "Before you update" line is in the changelog section, good: existing cloud installs have no saved value and move from 2048 to 256 on update.
I ran the full suite on 9fdccc8: 2177 passed, ruff clean; CI is green too.
Approving. Before merging I'll still check it on my 40507 (2-wire, local UDP): automatic should send b=AS:2048/2200, forcing 256 should send 256/512.
What and why
Since 1.0.19 (#84) the integration asks every panel for 2 Mbit/s of video instead of 256 kbit/s. That was measured on a Tab 5S Up 40515, with no loss on its path. A Tab 7S Up 40517 over the cloud relay honours the request too, and its relay loses packets.
Measured in HomeKit views (no ring), from the integration's debug log:
On the phone and in the card the video smeared, froze and lagged. That was during two real deliveries, and in a preview that took about 20 s to show anything, although HA had sent the picture after 2.3 s. Ten times the packets through a relay that drops a few percent means ten times the damaged frames.
@Apeiv measured both values on his 40515 over the cloud: 720x576 at 24 fps (~1.9 Mbit/s) at 2048, 320x240 at 15 fps (~240 kbit/s) at 256, no loss at either, and the same first-frame time (~1.8-1.9 s).
So the bandwidth is now an option, "Video quality from the panel", on the general Vimar Intercom settings page. It applies to every video from the panel: card, camera,
/avand HomeKit.view_keepalive's default already follows the transport.Tested on
9fdccc8: an outside view on Automatic (existing entry, option never set) and one with 256 forced from the options. Saving the option reloaded the entry. Both views fine, no errors; the panel sent the same stream both times (~32 video packets/s, 15-55 bytes each, the same NAL mix, 0 SRTP failures), so the 2-wire Tab seems to ignore the requested bandwidth, at least on local UDP. Nothing changes on this plant; option set back to Automatic.Docs
Docs: CONFIGURATION.md and .it.md (the option), TROUBLESHOOTING.md and .it.md (a row for smeared, frozen or lagging video).
Changelog
Changelog: Bug fixes - Over the cloud the panel's video is back to 256 kbit/s by default: 2 Mbit/s smeared, froze and lagged on a Tab 7S Up 40517. A new setting, "Video quality from the panel", picks Automatic (2 Mbit/s on local UDP, 256 kbit/s over the cloud), 256 kbit/s or 2 Mbit/s.
Before you update: If your video was fine at 2 Mbit/s over the cloud (e.g. a Tab 5S Up 40515), set "Video quality from the panel" to 2 Mbit/s in the settings.
🤖 Generated with Claude Code