“Insufficient privileges for this user.”
<!-- BUG REPORTS THAT ARE NOT FILLED OUT COMPLETELY WILL BE CLOSED AUTOMATICALLY WITHOUT WARNING AND WILL NOT RECEIVE A RESPONSE. THE FORM IS HERE FOR A REASON. :). -->
<!-- Please ensure you read the documentation before creating a support request, especially the Troubleshooting page. -->
<!-- BUG REPORTS ABOUT BETA VERSIONS OF UNIFI / UBIQUITI FIRMWARE OR EARLY-ACCESS/BETA HARDWARE WILL BE CLOSED WITHOUT A RESPONSE. ALL BETA RELEASES FROM UBIQUITI ARE UNSUPPORTED -->

**Describe The Problem:**
<!-- A clear and concise description of what the issue is. -->
Today all of my cameras went offline with homekit, so I restarted the child bridge, and the logs show the message:
“Insufficient privileges for this user. Please check the roles for this user and ensure it has sufficient priviliges.”
Once a second for each of my cameras.

Nothing changed with the roles or permissions (local camera admin role) - it has been working pretty well for weeks.

After several minutes, it connects (see [10/9/2022, 4:05:32 PM]) but with a number of errors following.

I do occasionally see the cameras go offline in homekit and come back. And they also sometimes show gaps in coverage that do not appear in the Unifi Protect app.

Something seems not quite right with my setup.

**To Reproduce:**
<!-- Steps to reproduce the behavior. -->
Unknown.
**Logs:**
<!-- In order to be helpful, include the relevant logs from Homebridge, if applicable. -->

```
[10/9/2022, 3:58:32 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.
[10/9/2022, 3:58:32 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.
[10/9/2022, 3:58:32 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.
[10/9/2022, 3:58:33 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.
[10/9/2022, 3:58:33 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.
[10/9/2022, 3:58:33 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.
[10/9/2022, 3:58:33 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.
[10/9/2022, 3:58:33 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.
[10/9/2022, 3:58:34 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.
[10/9/2022, 3:58:34 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.
[10/9/2022, 3:58:34 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.
[10/9/2022, 3:58:34 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.
[10/9/2022, 3:58:35 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.
[10/9/2022, 3:58:35 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.
[10/9/2022, 3:58:35 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.

—-this goes on once per camera every second until 4:05:31 snipping—-

[10/9/2022, 4:05:31 PM] [homebridge-unifi-protect] Insufficient privileges for this user. Please check the roles assigned to this user and ensure it has sufficient privileges.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: Connected to the UniFi Protect controller API (address: 10.0.0.1 mac: 68D79A5986EF).
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: Connected to the UniFi Protect realtime update events API.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: Discovered camera: Front Yard [UVC G3 Flex] (address: 10.99.255.27 mac: D021F99614C2).
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: Discovered camera: Back Yard [UVC G4 Doorbell] (address: 10.0.255.26 mac: D021F9943F81).
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: Discovered camera: Back Yard and Doors [UVC G4 Bullet] (address: 10.99.255.94 mac: D021F9989683).
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: Discovered camera: Under Deck [UVC G3 Flex] (address: 10.99.255.104 mac: D021F9961354).
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: Discovered camera: Side Yard and Street [UVC G4 Bullet] (address: 10.99.255.121 mac: D021F998969E).
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: Discovered camera: Front Door [UVC G4 Doorbell] (address: 10.0.255.122 mac: D021F9943CA3).
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: Discovered camera: Driveway [UVC G4 Doorbell] (address: 10.0.255.252 mac: D021F994E33B).
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: Discovered camera: Front Corner [UVC G3 Flex] (address: 10.99.255.208 mac: D021F996F071).
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: Discovered camera: Driveway and Street [UVC G4 Bullet] (address: 10.99.255.9 mac: D021F998962E).
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: Discovered camera: Driveway and Doors [UVC G3 Flex] (address: 10.99.255.243 mac: D021F9961559).
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: Discovered camera: Front Entrance [UVC G3 Flex] (address: 10.99.255.249 mac: D021F994F309).
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: Controller refresh interval set to 10 seconds.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Front Yard [UVC G3 Flex]: HomeKit Secure Video support enabled.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Back Yard [UVC G4 Doorbell]: HomeKit Secure Video support enabled.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Back Yard and Doors [UVC G4 Bullet]: HomeKit Secure Video support enabled.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Under Deck [UVC G3 Flex]: HomeKit Secure Video support enabled.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Side Yard and Street [UVC G4 Bullet]: HomeKit Secure Video support enabled.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Front Door [UVC G4 Doorbell]: HomeKit Secure Video support enabled.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway [UVC G4 Doorbell]: HomeKit Secure Video support enabled.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Front Corner [UVC G3 Flex]: HomeKit Secure Video support enabled.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway and Street [UVC G4 Bullet]: HomeKit Secure Video support enabled.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway and Doors [UVC G3 Flex]: HomeKit Secure Video support enabled.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Front Entrance [UVC G3 Flex]: HomeKit Secure Video support enabled.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Back Yard [UVC G4 Doorbell]: Discovered doorbell message switch: LEAVE PACKAGE AT DOOR.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Back Yard [UVC G4 Doorbell]: Discovered doorbell message switch: DO NOT DISTURB.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Front Door [UVC G4 Doorbell]: Discovered doorbell message switch: LEAVE PACKAGE AT DOOR.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Front Door [UVC G4 Doorbell]: Discovered doorbell message switch: DO NOT DISTURB.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway [UVC G4 Doorbell]: Discovered doorbell message switch: LEAVE PACKAGE AT DOOR.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway [UVC G4 Doorbell]: Discovered doorbell message switch: DO NOT DISTURB.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway [UVC G4 Doorbell]: Doorbell message set: LEAVE PACKAGE AT DOOR.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Back Yard [UVC G4 Doorbell]: HomeKit Secure Video event recording enabled: 1600x1200@30fps (High), 2000 kbps with a 4 second timeshift buffer.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] API access error: 503 - Service Unavailable
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: API endpoint access error
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO]: Unable to retrieve the livestream websocket API endpoint from the UniFi Protect controller.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Front Yard [UVC G3 Flex]: Unable to start the timeshift buffer for HomeKit Secure Video.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Back Yard and Doors [UVC G4 Bullet]: HomeKit Secure Video event recording enabled: 2688x1512@24fps (High), 2000 kbps with a 4 second timeshift buffer.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Side Yard and Street [UVC G4 Bullet]: HomeKit Secure Video event recording enabled: 2688x1512@24fps (High), 2000 kbps with a 4 second timeshift buffer.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Under Deck [UVC G3 Flex]: HomeKit Secure Video event recording enabled: 1920x1080@25fps (High), 2000 kbps with a 4 second timeshift buffer.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Front Door [UVC G4 Doorbell]: HomeKit Secure Video event recording enabled: 1600x1200@30fps (High), 2000 kbps with a 4 second timeshift buffer.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway [UVC G4 Doorbell]: HomeKit Secure Video event recording enabled: 1600x1200@30fps (High), 2000 kbps with a 4 second timeshift buffer.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Front Corner [UVC G3 Flex]: HomeKit Secure Video event recording enabled: 1920x1080@25fps (High), 2000 kbps with a 4 second timeshift buffer.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway and Street [UVC G4 Bullet]: HomeKit Secure Video event recording enabled: 2688x1512@24fps (High), 2000 kbps with a 4 second timeshift buffer.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway and Doors [UVC G3 Flex]: HomeKit Secure Video event recording enabled: 1920x1080@25fps (High), 2000 kbps with a 4 second timeshift buffer.
[10/9/2022, 4:05:32 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Front Entrance [UVC G3 Flex]: HomeKit Secure Video event recording enabled: 1920x1080@25fps (High), 2000 kbps with a 4 second timeshift buffer.
[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway and Street [UVC G4 Bullet]: FFmpeg process ended unexpectedly with an exit code of 0.
[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway and Street [UVC G4 Bullet]: FFmpeg command line that errored out was: /homebridge/node_modules/homebridge-unifi-protect/node_modules/ffmpeg-for-homebridge/ffmpeg -hide_banner -fflags +discardcorrupt -r 24 -f mp4 -i pipe:0 -map 0:v:0 -max_muxing_queue_size 9999 -vcodec libx264 -pix_fmt yuvj420p -profile:v main -level:v 4.0 -preset veryfast -b:v 2000k -bufsize 4000k -maxrate 2000k -force_key_frames expr:gte(t, n_forced * 4) -fflags +genpts+discardcorrupt -reset_timestamps 1 -movflags frag_keyframe+empty_moov+default_base_moof -map 0:a:0 -acodec copy -f mp4 pipe:1
[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:0':

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]   Metadata:

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]     major_brand     : 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] dash

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]     minor_version   : 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] 0

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]     compatible_brands: 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] iso6avc1mp41

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]     creation_time   : 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] 2022-10-09T20:05:33.000000Z

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]   Duration: 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] 253:35:34.91

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] , start: 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] 912933.558622

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] , bitrate: 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] N/A

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]   Stream #0:0

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [0x1]

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] (und)

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] : Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc, bt709, progressive), 2688x1512 [SAR 1:1 DAR 16:9]

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] , 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] 24 fps, 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] 24 tbr, 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] 90k tbn

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]  (default)

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]     Metadata:

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]       creation_time   : 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] 2022-10-09T20:05:33.000000Z

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]       handler_name    : 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] VideoHandler

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]       vendor_id       : 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [0][0][0][0]

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]       encoder         : 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] EvoStream Media Server

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]   Stream #0:1

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [0x2]

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] (und)

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] : Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]  (default)

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]     Metadata:

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]       creation_time   : 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] 2022-10-09T20:05:33.000000Z

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]       handler_name    : 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] SoundHandler

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]       vendor_id       : 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [0][0][0][0]

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] Stream mapping:

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]   Stream #0:1 -> #0:1 (copy)

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] using SAR=1/1

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] frame MB size (168x95) > level limit (8192)

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] DPB size (4 frames, 63840 mbs) > level limit (2 frames, 32768 mbs)

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] MB rate (383040) > level limit (245760)

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] profile Main, level 4.0, 4:2:0, 8-bit

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] 264 - core 163 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=cbr mbtree=1 bitrate=2000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=2000 vbv_bufsize=4000 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] Output #0, mp4, to 'pipe:1':

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]   Metadata:

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]     major_brand     : dash

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]     minor_version   : 0

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]     compatible_brands: iso6avc1mp41

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]     encoder         : Lavf59.16.100

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]   Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuvj420p(pc, bt709, progressive), 2688x1512 [SAR 1:1 DAR 16:9], q=2-31, 2000 kb/s, 24 fps, 12288 tbn (default)

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]     Metadata:

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]       creation_time   : 2022-10-09T20:05:33.000000Z

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]       handler_name    : VideoHandler

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]       vendor_id       : [0][0][0][0]

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]       encoder         : Lavc59.18.100 libx264

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]     Side data:

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]       cpb: bitrate max/min/avg: 2000000/0/2000000 buffer size: 4000000 vbv_delay: N/A

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]   Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp (default)

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]     Metadata:

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]       creation_time   : 2022-10-09T20:05:33.000000Z

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]       handler_name    : SoundHandler

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect]       vendor_id       : [0][0][0][0]

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [NULL @ 0x56325d880500] 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] Invalid NAL unit size (1953653094 > 20809).

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [NULL @ 0x56325d880500] 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] missing picture in access unit with size 20833

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56325d86eb40] 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] DTS 82164676526 < 82164691526 out of order

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [h264 @ 0x56325d8b69c0] Invalid NAL unit size (1953653094 > 20809).

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [h264 @ 0x56325d8b69c0] Error splitting the input into NAL units.

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [NULL @ 0x56325d880500] 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] Invalid NAL unit size (1149028324 > 21113).

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [NULL @ 0x56325d880500] 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] missing picture in access unit with size 21117

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [h264 @ 0x56325d91e900] Invalid NAL unit size (1149028324 > 21113).

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [h264 @ 0x56325d91e900] Error splitting the input into NAL units.

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [NULL @ 0x56325d880500] 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] Invalid NAL unit size (-1176022842 > 20783).

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [NULL @ 0x56325d880500] 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] missing picture in access unit with size 20787

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [h264 @ 0x56325d97f680] Invalid NAL unit size (-1176022842 > 20783).

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [h264 @ 0x56325d97f680] Error splitting the input into NAL units.

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [NULL @ 0x56325d880500] 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] Invalid NAL unit size (361400693 > 21328).

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [NULL @ 0x56325d880500] 

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] missing picture in access unit with size 21332

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [h264 @ 0x56325d94f200] Invalid NAL unit size (361400693 > 21328).

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [h264 @ 0x56325d94f200] Error splitting the input into NAL units.

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [NULL @ 0x56325d880500] Invalid NAL unit size (-2015710740 > 545124).

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [NULL @ 0x56325d880500] missing picture in access unit with size 545128

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] Error while decoding stream #0:0: Invalid data found when processing input

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [h264 @ 0x56325d971e80] Invalid NAL unit size (-2015710740 > 545124).

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [h264 @ 0x56325d971e80] Error splitting the input into NAL units.

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56325d86eb40] stream 0, offset 0x407e9f: partial file

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] pipe:0: Invalid data found when processing input

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] Error while decoding stream #0:0: Invalid data found when processing input

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56325d86eb40] stream 0, offset 0x407e9f: partial file

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] pipe:0: Invalid data found when processing input

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] Error while decoding stream #0:0: Invalid data found when processing input

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56325d86eb40] stream 0, offset 0x407e9f: partial file

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] pipe:0: Invalid data found when processing input

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] Error while decoding stream #0:0: Invalid data found when processing input

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56325d86eb40] stream 0, offset 0x407e9f: partial file

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] pipe:0: Invalid data found when processing input

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] Error while decoding stream #0:0: Invalid data found when processing input

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56325d86eb40] stream 0, offset 0x407e9f: partial file

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] pipe:0: Invalid data found when processing input

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] video:1069kB audio:56kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.406648%

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] frame I:2     Avg QP:35.33  size:191688

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] frame P:24    Avg QP:32.48  size: 27543

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] frame B:71    Avg QP:38.48  size:   697

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] consecutive B-frames:  2.1%  0.0%  3.1% 94.8%

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] mb I  I16..4: 51.9%  0.0% 48.1%

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] mb P  I16..4:  0.3%  0.0%  0.3%  P16..4: 24.8%  3.0%  2.2%  0.0%  0.0%    skip:69.5%

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.4%  0.2%  0.0%  direct: 0.2%  skip:99.2%  L0:38.3% L1:42.5% BI:19.2%

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] coded y,uvDC,uvAC intra: 79.9% 31.1% 1.6% inter: 2.9% 0.8% 0.0%

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] i16 v,h,dc,p: 21% 22% 45% 13%

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 18% 21%  6% 11%  6%  8%  5%  6%

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] i8c dc,h,v,p: 73% 14% 11%  2%

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] Weighted P-Frames: Y:0.0% UV:0.0%

[10/9/2022, 4:06:08 PM] [homebridge-unifi-protect] [libx264 @ 0x56325d8a8080] kb/s:2165.29

[10/9/2022, 4:06:17 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway and Street [UVC G4 Bullet]: HomeKit Secure Video has recorded a 18 second motion event.
[10/9/2022, 4:06:17 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway and Street [UVC G4 Bullet]: HomeKit Secure Video event recording ended abnormally: The request timed out.
[10/9/2022, 4:06:23 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway [UVC G4 Doorbell]: HomeKit Secure Video has recorded a 25 second motion event.
[10/9/2022, 4:06:29 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway and Doors [UVC G3 Flex]: HomeKit Secure Video has recorded a 17 second motion event.
[10/9/2022, 4:07:19 PM] [homebridge-unifi-protect] Dream Machine Pro [UDM-PRO] Driveway [UVC G4 Doorbell]: HomeKit Secure Video has recorded a 20 second motion event.
[10/9/2022, 4:07:23 PM] [homebridge-myq] Left Garage Door: Closing.
[10/9/2022, 4:07:34 PM] [homebridge-myq] Left Garage Door: Closed.
[10/9/2022, 4:12:03 PM] [homebridge-myq] Left Garage Light: Off.

```

**Homebridge Configuration:**

```json
{
            "controllers": [
                {
                    "address": "10.0.0.1",
                    "password": "XXXXXXX",
                    "username": "HomebridgePlugin"
                }
            ],
            "_bridge": {
                "username": "0E:83:22:BC:A1:13",
                "port": 55442
            },
            "platform": "UniFi Protect"
        } 
```

**Screenshots:**
<!-- If applicable, add screenshots to help explain your problem. -->

**Environment:**

* **Homebridge Version:** <!-- homebridge -V -->
* 1.5.0
* **Node Version:** <!-- node -v -->
* 16.16.0
* **Homebridge-UniFi-Protect Plugin Version:**
* 5.5.4
* **UniFi Protect Version:** <!-- Read the Protect version line from https://unifi-controller/protect/settings -->
* 2.2.2
* **UniFi Protect Controller Type:** <!-- UCKgen2+, UDMP, UNVR, etc. -->
* UDMP
* **UniFi Protect Controller Firmware Version:** <!-- Read the firmware line from https://unifi-controller/settings/general -->
* 1.12.30
* **Apple Device and iOS / macOS / iPadOS / tvOS Version:**<!-- Type of Apple device you're using and associated OS version -->
* xOS 16.0 - but it never makes it this far since this started.
* **Operating System and OS Version:** <!-- Raspbian / Ubuntu / Debian / Windows / macOS / Docker -->
* Docker on Synology DSM

<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
