Ongoing with v6.6.0 | HKSV Event Recording / Motion Detection stops with error
Describe The Problem:
 Sorry for opening a new one, but same issue as described in my closed case even with v6.6.0: #935 
Text afterwards is the same, I only changed the logs to new ones happening today. 

First of all thank you for your wonderful work hjdhjd
I think I have a similar problem to https://github.com/hjdhjd/homebridge-unifi-protect/issues/670.
At the beginning, the event detection in HKSV in iOS works wonderfully. As soon as a person or animal is detected, I get a notification from the Home app and the recorded event is also detected in HKSV.
After 2-5 successful events, all future events won't be recorded and got an error as you can see in the logs.
Restarting the plug-in solves the problem for the first 2-5 events, then the error reappears.

I would like to emphasise here that I have already restarted my HomePods (2x Homepod 2nd Gen & 1x Homepod mini) several times without success. The resources of Homebridge are also not the problem in this case, as already described in several past issues, since I operate a very powerful server. Even if I increase the resources to 4x3.3Ghz and 8GB RAM for Homebridge, the error reappears after the first 2-5 events.

To Reproduce:
Restart the plugin or Homebridge and trigger 2-5 events, then the error occurs again and again.

Logs:

```diff
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [libx264 @ 0x562906cef1c0] [info] 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=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=120 keyint_min=12 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
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [mp4 @ 0x562906cceb40] [verbose] Empty MOOV enabled; disabling automatic bitstream filtering
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info] Output #0, mp4, to 'pipe:1':
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]   Metadata:
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]     major_brand     : dash
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]     minor_version   : 0
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]     compatible_brands: iso6avc1mp41
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]     encoder         : Lavf59.16.100
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]   Stream #0:0(und): Video: h264, 1 reference frame (avc1 / 0x31637661), yuvj420p(pc, bt709, progressive, left), 1440x1080 (0x0) [SAR 1:1 DAR 4:3], q=2-31, 2000 kb/s, 30 fps, 15360 tbn (default)
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]     Metadata:
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]       creation_time   : 2023-05-16T12:14:05.000000Z
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]       handler_name    : VideoHandler
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]       vendor_id       : [0][0][0][0]
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]       encoder         : Lavc59.18.100 libx264
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]     Side data:
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]       cpb: bitrate max/min/avg: 2000000/0/2000000 buffer size: 4000000 vbv_delay: N/A
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]   Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp (default)
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]     Metadata:
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]       creation_time   : 2023-05-16T12:14:05.000000Z
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]       handler_name    : SoundHandler
[5/17/2023, 7:00:06 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info]       vendor_id       : [0][0][0][0]
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: HomeKit Secure Video has recorded a 6 second motion event.
- [5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: HomeKit Secure Video event recording ended early: An unexpected protocol failure has occured.
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info] frame=  149 fps= 69 q=-1.0 Lsize=     991kB time=00:00:06.44 bitrate=1260.5kbits/s speed=2.99x    
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info] video:1267kB audio:47kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [verbose] Input file #0 (pipe:0):
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [verbose]   Input stream #0:0 (video): 189 packets read (2909709 bytes); 150 frames decoded; 
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [verbose]   Input stream #0:1 (audio): 296 packets read (48297 bytes); 
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [verbose]   Total: 485 packets (2958006 bytes) demuxed
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [verbose] Output file #0 (pipe:1):
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [verbose]   Output stream #0:0 (video): 149 frames encoded; 149 packets muxed (1296954 bytes); 
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [verbose]   Output stream #0:1 (audio): 296 packets muxed (48297 bytes); 
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [verbose]   Total: 445 packets (1345251 bytes) muxed
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [AVIOContext @ 0x562906cef580] [verbose] Statistics: 1015009 bytes written, 0 seeks, 45 writeouts
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [error] Error closing file pipe:1: Broken pipe
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [libx264 @ 0x562906cef1c0] [info] frame I:2     Avg QP:29.13  size:245385
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [libx264 @ 0x562906cef1c0] [info] frame P:147   Avg QP:27.26  size:  5480
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [libx264 @ 0x562906cef1c0] [info] mb I  I16..4: 13.4%  0.0% 86.6%
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [libx264 @ 0x562906cef1c0] [info] mb P  I16..4:  0.1%  0.0%  0.1%  P16..4: 11.0%  0.7%  0.4%  0.0%  0.0%    skip:87.7%
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [libx264 @ 0x562906cef1c0] [info] coded y,uvDC,uvAC intra: 81.4% 68.8% 26.6% inter: 4.7% 4.3% 0.3%
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [libx264 @ 0x562906cef1c0] [info] i16 v,h,dc,p: 29% 29% 27% 16%
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [libx264 @ 0x562906cef1c0] [info] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 20% 14%  8% 10%  8% 10%  6% 11%
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [libx264 @ 0x562906cef1c0] [info] i8c dc,h,v,p: 47% 28% 16%  9%
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [libx264 @ 0x562906cef1c0] [info] Weighted P-Frames: Y:0.7% UV:0.0%
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [libx264 @ 0x562906cef1c0] [info] kb/s:2087.95
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [AVIOContext @ 0x562906cc6940] [verbose] Statistics: 2974058 bytes read, 0 seeks
[5/17/2023, 7:00:08 AM] [UniFi Protect] Dream Machine Special Edition [UDM-PRO-SE] G4 Doorbell Pro [G4 Doorbell Pro]: [info] Exiting normally, received signal 15.
```

Homebridge Configuration:

        {
            "controllers": [
                {
                    "address": "192.168.1.1",
                    "password": edited,
                    "username": edited
                }
            ],
            "name": "UniFi Protect",
            "options": [
                "Disable.Doorbell.Messages.FromDoorbell",
                "Disable.Doorbell.Messages",
                "Disable.Doorbell.Messages.70A74168D7DA",
                "Disable.Doorbell.Messages.FromDoorbell.70A74168D7DA",
                "Disable.Doorbell.Messages.E438830D8D92",
                "Disable.Doorbell.Messages.FromDoorbell.E438830D8D92",
                "Disable.Video.HKSV.TimeshiftBuffer.E438830D8D92"
            ],
            "verboseFfmpeg": true,
            "_bridge": {
                "username": edited,
                "port": edited
            },
            "platform": "UniFi Protect"
        }
Screenshots:
Home app settings:
[IMG_2403](https://user-images.githubusercontent.com/3452678/237295941-ee39e4a3-9427-49cb-88bb-60f98a9bd9c2.PNG)
[IMG_2404](https://user-images.githubusercontent.com/3452678/237295941-ee39e4a3-9427-49cb-88bb-60f98a9bd9c2.PNG)
[IMG_2405](https://user-images.githubusercontent.com/3452678/237295945-7853798e-1ccc-4561-bff4-71a44108ccd8.PNG)

Environment:

Homebridge Version: v1.6.1
Node Version: v18.16.0
Homebridge-UniFi-Protect Plugin Version: v6.6
UniFi Protect Version: 2.7.34
UniFi Protect Controller Type: UDM-SE
UniFi Protect Controller Firmware Version: UDM SE v3.0.18
Apple Device and iOS / macOS / iPadOS / tvOS Version: iOS 16.4.1
Operating System and OS Version: Debian 11