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.45k stars 93 forks source link

Transcoding based on IP address #1069

Closed herbi3 closed 4 months ago

herbi3 commented 4 months ago

Describe the feature request

some older Apple TVs (HD version mostly) have issues with live streams. this seems mostly a tvOS17 issue, however with transcoding enabled, it seems to function more reliably for the ATV. I don't want to have transcoding always enabled for everything, only the devices I know struggle with the direct live stream.

Describe the proposed solution

transcoding option for specific ip addresses.

Describe alternatives you have considered to the enhancement

ultimately, live streams are an issue since tvOS17. hardly reliable at all now days so this is really an apple issue. apple is extremely slow to fix anything tvOS related, and even more so for HomeKit things. best way I believe, is via this plugin to lower the 'load' on the older devices

hjdhjd commented 4 months ago

This feature existed once-upon-a-time and I ultimately disabled it because HomeKit can be unreliable about deciding when to stream directly, even in home networks, versus when to run it through a HomeKit hub. I might revisit this in the future, but it's unlikely anytime soon.

A couple of other things to note:

Remember that UniFi cameras like the AI/G4 Pro can produce 16,000 kbps...versus the no-more-than 1,000 kbps under ideal conditions that HomeKit ever requests. You really don't want to send (in my case) 20+ cameras streaming that much data at an Apple TV simultaneously, which you can do if you choose some of the multicam views available on tvOS.

Setting a higher-quality transcoding threshold, especially if you're on a device that has hardware transcoding (and therefore even less latency), is the better route.

Give it a go and welcome your feedback!

herbi3 commented 4 months ago

@hjdhjd it seems 90% of the time for an ATV4 HD with tvos17 live streams don't work. Where as in tvOS16, it never skipped a beat. This is common accross x5 of our ATV4 HD devices.

However, the other three ATV4K devices will work somewhat better, around 30% of the time the stream will fail now in tvos17. Again, across all x8 devices with the previous tvos16, this was never an issue.

The issue is we don't want transcoding for all devices. It adds an additional delay for iOS, iPadOS, macOS and 4K Apple TVs. It's simply just the HD Apple TVs where we need transcoding with a lower quality set.

With 8 months since tvOS17 being released, we know Apple won't be fixing this any time soon (feedback sent, and as usual, no response or improvements released)

Even worse now is, when streaming remotely the stream will fail if HomeKit has wrongly selected a lower capable device (HD atv4) this means ALL remote streams fail. This happens when we are remotely connected but using wifi (I.e using the wifi at work, it doesn't recognise it as a high latency device) so the high latency transcoding doesn't work unless we are connected via cellular instead.

Now Apple have removed the ability to exclude any device as a home hub, this is now out of our control and severely reduces the user experience, unless we can add this feature back in..

github-actions[bot] commented 4 months 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.