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.39k stars 84 forks source link

Enhanced Encoding in Protect 4.0 does not work #1082

Closed Stroell closed 1 month ago

Stroell commented 1 month ago

Homebridge UniFi Protect Version

6.22.0

Homebridge Platform and OS

Docker on Synology

Homebridge Version

v1.8.2

Node Version

20.12.2

UniFi OS Version

3.2.12

UniFi Protect Controller Version

4.0.21

Describe the problem

Hi, the latest Unifi Protect Version offers a new Encoding Feature for some Cameras: https://community.ui.com/releases/UniFi-Protect-Application-4-0-21/6890a055-2a90-4011-a3e6-18f8e290244f G4, G5, and AI cameras now support Enhanced Encoding for improved live streaming and recording retention efficiency.

image

This feature will break the Streaming of my Cameras in HomeKit: image

If you need more logs, please let me know :-)

Homebridge HBUP JSON configuration

{
    "controllers": [
        {
            "address": "192.168.10.1",
            "mqttUrl": "mqtt://192.168.10.10:1884",
            "password": "",
            "username": ""
        }
    ],
    "name": "UniFi Protect",
    "options": [
        "Enable.Doorbell.Trigger.AC8BA90EC1CF",
        "Enable.Motion.OccupancySensor.AC8BA90EC1CF",
        "Enable.Motion.SmartDetect.ObjectSensors.AC8BA90EC1CF",
        "Enable.Doorbell.Trigger.68D79AE527B1",
        "Disable.Device.68D79AE527B1",
        "Enable.Device.SyncName.F4E2C679401E",
        "Enable.Video.Transcode.Hardware.74ACB91C8719"
    ],
    "verboseFfmpeg": false,
    "platform": "UniFi Protect"
}

Relevant log output

[5/28/2024, 2:08:40 PM] [UniFi Protect] G4 Instant [G4 Instant]: The livestream API connection was unexpectedly closed by the Protect controller: this is typically due to device restarts or issues with Protect controller firmware versions, and can be safely ignored. Will retry again shortly.
[G4 Instant] The image snapshot handler for the given accessory is slow to respond! See https://homebridge.io/w/JtMGR for more info.

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

hjdhjd commented 1 month ago

Thanks for the report. Enhanced encoding is not currently supported.

Edit: I've pinned this issue for others that may come to report the same issue, or request this feature. I've got nothing further to say on the topic at this time. Thanks.

Stroell commented 1 month ago

Thank you for you quick response. As a workaround, I got it working with the following settings:

image

image

hjdhjd commented 1 month ago

Thanks!

Actually: that’s not a workaround, that’s the permanent solution. You cannot transmux with enhanced encoding. HomeKit does not support HEVC/H.265. Until that changes, which who knows if/when it will (that’s an Apple thing), if you choose to enable enhanced encoding, you will need to enable local transcoding as well.

HKSV will be unaffected and will work regardless.

Enjoy!

Stroell commented 1 month ago

Thanks for the clarification. It's a great Plugin and with the settings enabled, it works like a charm. 👍

Maybe something that can be enabled automatically to avoid more github issues? => If enhanced encoding enabled, then transcode.

Or just add something to the getting started guide?

Cheers from Germany, Stefan

github-actions[bot] commented 1 month 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.

hjdhjd commented 3 weeks ago

For posterity: HBUP v7+ addresses this holistically. Thanks!