hjdhjd / homebridge-unifi-protect

:video_camera: Complete HomeKit integration for all UniFi Protect device types with full support for most features including HomeKit Secure Video, and more. https://homebridge.io
Other
1.46k stars 93 forks source link

Best/supported settings for Video Quality? #1132

Closed PrzemyslawKlys closed 1 week ago

PrzemyslawKlys commented 1 week ago

Homebridge UniFi Protect Version

v7.6.0

Homebridge Platform and OS

Ubuntu

Homebridge Version

v1.8.4

Node Version

v20.17.0

UniFi OS Version

v4.0.18

UniFi Protect Controller Version

v5.0.34

Describe the problem

Hi,

I've been wondering what's the best/correct settings in the new protect for working with HomeKit? There's new option Enhanced and it seems to work although there's a blank page for half a second in homekit when you enter the stream. Not much changed.

image image

Does it even matter?

Homebridge HBUP JSON configuration

Not nessecary

Relevant log output

[9/30/2024, 6:02:08 AM] [homebridge-unifi-protect] Dzwonek [G4 Doorbell Pro]: HKSV: 1600x1200@30fps (High) [HEVC], 2,000 kbps (10 second timeshift buffer).
[9/30/2024, 6:02:08 AM] [homebridge-unifi-protect] Furtka Dzwonek [G4 Doorbell Pro]: HKSV: 1600x1200@30fps (High) [HEVC], 2,000 kbps (10 second timeshift buffer).
[9/30/2024, 6:02:08 AM] [homebridge-unifi-protect] Kamera Garaz Front [G4 Dome]: HKSV: 2688x1512@24fps (High) [H264], 2,000 kbps (10 second timeshift buffer).
9/30/2024, 6:04:51 AM] [homebridge-unifi-protect] Furtka Dzwonek [G4 Doorbell Pro]: Streaming request from 192.168.241.134: 640x480@30fps, 164 kbps. Transcoding 1600x1200@30fps (High) [HEVC], 6,000 kbps [API].
[9/30/2024, 6:04:52 AM] [Siegenia Okno] Device status for Okno Salon is CLOSED
[9/30/2024, 6:04:54 AM] [homebridge-unifi-protect] Furtka Dzwonek [G4 Doorbell Pro]: Stopped video streaming session.
[9/30/2024, 6:04:57 AM] [Siegenia Okno] Device status for Okno Salon is CLOSED
[9/30/2024, 6:05:02 AM] [Siegenia Okno] Device status for Okno Salon is CLOSED
[9/30/2024, 6:05:03 AM] [homebridge-unifi-protect] Dzwonek [G4 Doorbell Pro]: Streaming request from 192.168.241.134: 640x480@30fps, 164 kbps. Transcoding 1600x1200@30fps (High) [HEVC], 6,000 kbps [API].
[9/30/2024, 6:05:06 AM] [homebridge-unifi-protect] Dzwonek [G4 Doorbell Pro]: Stopped video streaming session.
[9/30/2024, 6:05:07 AM] [Siegenia Okno] Device status for Okno Salon is CLOSED
[9/30/2024, 6:05:12 AM] [Siegenia Okno] Device status for Okno Salon is CLOSED
[9/30/2024, 6:05:13 AM] [homebridge-unifi-protect] Kamera Dom Jadalnia [G4 Pro]: Unable to retrieve a snapshot.
[9/30/2024, 6:05:13 AM] [homebridge-unifi-protect] Kamera Prawa Przod [G4 Pro]: Streaming request from 192.168.241.134: 1280x720@30fps, 299 kbps. Transcoding 1280x720@24fps (Medium) [H264], 2,000 kbps [RTSP].

Acknowledgment that you are only running UniFi OS and UniFi Protect releases from the Ubiquiti Official release channel

hjdhjd commented 1 week ago

The best settings are whatever you want to choose. HBUP fully supports HEVC and H.264 (HEVC = Enhanced Encoding in Protect parlance). If you're asking my recommendations:

  1. HEVC gains you nothing other than some storage space on your Protect controller, if you want it. HomeKit requires H.264, so you're definitely transcoding from one format to the other...which leads to...
  2. HEVC from Protect has its quirks/issues...which is the "blank" or "grey" screen you see at first is part of that. Keyframes can be weird/quirky in Protect HEVC streams. macOS with hardware acceleration seems to work pretty well with it, meaning those issues don't occur there.
  3. Don't mess with the defaults in HBUP aside from adjusting bitrates, if you'd like. HBUP will always choose the best quality available for the job.

TL;DR: don't enable enhanced encoding unless you have a need to - it's meaningless to HBUP/HomeKit. Enable the bitrate-related feature options (under the video section) for both low and high-latency streams. The defaults (2000/1000kbps) provide a good quality with appropriate speed/size/bandwidth tradeoffs, but play with them if you'd like.

Hope this helps!

github-actions[bot] commented 1 week ago

This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.