Strange audio/video artifacts appear sporadically
<!-- 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:**
After a period of time (I'm not sure of the exact amount of time) the live stream and recordings will begin to have what appear to be compression artifacts for the video (it looks like missing keyframes) and echoes from the audio.

**To Reproduce:**
I'm not sure how to reproduce, the issue occurs on its own after a random amount of time.  Rebooting the Homebridge server resolves the issue.  I've checked and the host isn't under any load when the issue is happening.

**Logs:**
Looking in the Home App, the last good video was at 07:12:49.  The next clip is ~ 10 minutes later and all clips up until the host is rebooted have the same artifacting.  I've included the chunk of the log from that time period.

```
Nov 15 07:10:44 homebridge homebridge[9208]: [11/15/2022, 7:10:44 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: HomeKit Secure Video has recorded a 21 second motion event.
Nov 15 07:10:44 homebridge homebridge[9208]: [11/15/2022, 7:10:44 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: HomeKit Secure Video event recording ended abnormally: The request timed out.
Nov 15 07:10:51 homebridge homebridge[9208]: [11/15/2022, 7:10:51 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: The Protect livestream API has closed unexpectedly and will retry again shortly. This is usually due to a controller or camera restart and can be safely ignored.
Nov 15 07:10:51 homebridge homebridge[9208]: [11/15/2022, 7:10:51 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: The Protect livestream API has closed unexpectedly and will retry again shortly. This is usually due to a controller or camera restart and can be safely ignored.
Nov 15 07:11:23 homebridge homebridge[9208]: [11/15/2022, 7:11:23 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: HomeKit Secure Video has recorded a 20 second motion event.
Nov 15 07:13:10 homebridge homebridge[9208]: [11/15/2022, 7:13:10 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: HomeKit Secure Video has recorded a 23 second motion event.
Nov 15 07:13:31 homebridge homebridge[9208]: [11/15/2022, 7:13:31 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: The Protect livestream API has closed unexpectedly and will retry again shortly. This is usually due to a controller or camera restart and can be safely ignored.
Nov 15 07:13:45 homebridge homebridge[9208]: [11/15/2022, 7:13:45 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: HomeKit Secure Video event recording ended abnormally: The request timed out.
Nov 15 07:13:45 homebridge homebridge[9208]: [11/15/2022, 7:13:45 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: FFmpeg process ended unexpectedly with an exit code of 1.
Nov 15 07:13:45 homebridge homebridge[9208]: [11/15/2022, 7:13:45 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: FFmpeg command line that errored out was: /usr/local/bin/ffmpeg -hide_banner -fflags +discardcorrupt -r 30 -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
Nov 15 07:13:45 homebridge homebridge[9208]: [11/15/2022, 7:13:45 AM] [UniFi Protect] [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c2a28a1dc0] moov atom not found
Nov 15 07:13:45 homebridge homebridge[9208]: [11/15/2022, 7:13:45 AM] [UniFi Protect] pipe:0: Invalid data found when processing input
Nov 15 07:13:51 homebridge homebridge[9208]: [11/15/2022, 7:13:51 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: The Protect livestream API has closed unexpectedly and will retry again shortly. This is usually due to a controller or camera restart and can be safely ignored.
Nov 15 07:13:55 homebridge homebridge[9208]: [HDS ::ffff:10.18.96.20] Recording download stream 1 is still awaiting generator although stream was closed 10s ago! This is a programming mistake by the camera implementation which prevents freeing up resources.
Nov 15 07:17:52 homebridge homebridge[9208]: [HDS ::ffff:10.18.96.20] Delegate yielded fragment after stream 1 was already closed!
Nov 15 07:17:52 homebridge homebridge[9208]: [HDS ::ffff:10.18.96.20] Delegate finished recording stream 1 without sending anything out.       Controller will CANCEL.
Nov 15 07:18:01 homebridge homebridge[9208]: [11/15/2022, 7:18:01 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: HomeKit Secure Video has recorded a 18 second motion event.
Nov 15 07:18:01 homebridge homebridge[9208]: [11/15/2022, 7:18:01 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: HomeKit Secure Video event recording ended abnormally: An unexpected protocol failure has occured.
Nov 15 07:20:54 homebridge homebridge[9208]: [11/15/2022, 7:20:54 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: HomeKit Secure Video has recorded a 40 second motion event.
Nov 15 07:23:18 homebridge homebridge[9208]: [11/15/2022, 7:23:18 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: HomeKit Secure Video has recorded a 46 second motion event.
Nov 15 07:23:46 homebridge homebridge[9208]: [11/15/2022, 7:23:46 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: HomeKit Secure Video has recorded a 51 second motion event.
Nov 15 07:24:06 homebridge homebridge[9208]: [11/15/2022, 7:24:06 AM] [UniFi Protect] UDM-PRO [UDM-PRO] Front Porch [UVC G4 Doorbell]: HomeKit Secure Video has recorded a 38 second motion event.
```

**Homebridge Configuration:**

{
    "bridge": {
        "name": "Homebridge_unifi",
        "username": "Removed",
        "port": Removed,
        "pin": "Removed"
    },

    "description": "Removed",

    "platforms": [
        {
		"platform": "UniFi Protect",
  		"videoProcessor": "/usr/local/bin/ffmpeg",
		"options": [
			"Enable.Doorbell.Trigger"
		],
  		"controllers": [
		{
			"address": "Removed",
                        "username": "Removed",
                        "password": "Removed",
			"doorbellMessages": [
				{
					"message": "Welcome Home",
					"duration": 120
				},
				{
					"message": "Are You Scared?",
					"duration": 60
				},
				{
					"message": "Happy Halloween",
					"duration": 3000
				}	
			]
		}
 		 ]
        }
    ]
   
}

**Screenshots:**
https://user-images.githubusercontent.com/5833157/202006972-1473cae0-87b8-4e70-9509-058f6595b948.mp4
https://user-images.githubusercontent.com/5833157/202006981-eafc2283-0932-43c6-945a-aadfea3a9efd.mp4


**Environment:**

* **Homebridge Version:** 1.5.1
* **Node Version:**  v12.22.12
* **Homebridge-UniFi-Protect Plugin Version:**. 5.5.4 (I have a cronjob to update every day, so it's always the latest version)
* **UniFi Protect Version:** 2.2.6
* **UniFi Protect Controller Type:** UDM-PRO
* **UniFi Protect Controller Firmware Version:** UniFi OS 1.12.30
* **Apple Device and iOS / macOS / iPadOS / tvOS Version:**  iPhone 13 Pro 16.1.1.  MacBookPro16,2 macOS 13.0.1
* **Operating System and OS Version:**  Ubuntu 18.04.6 LTS

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