RTSP stream fail but snapshot works
<!-- You must use the issue template below -->

**Describe The Problem:** 

I use wansview Q5 camera rtsp mode, snapshot works but stream fail.

RTSP has been tested and works in agent DVR, log also shows that it can connected.


**To Reproduce:**
<!-- Steps to reproduce the behavior. -->
1. Use wansview Q5 and open RTSP mode
2. Add it to homebridge-camera-ffmpeg
3. open HomeKit
4. snapshot can be loaded but stream will fail.

**Logs:**
<!-- Bug reports that do not contain logs may be closed without warning. -->

```
[2021/10/26 PM 3:30:34] [Camera FFmpeg] [camera] Video stream requested: 1280 x 720, 30 fps, 299 kbps
[2021/10/26 PM 3:30:34] [Camera FFmpeg] [camera] Starting video stream: 1920 x 1080, 15 fps, 299 kbps (AAC-eld)
[2021/10/26 PM 3:30:34] [Camera FFmpeg] [camera] Stream command: C:\Users\admin\AppData\Roaming\npm\node_modules\homebridge-camera-ffmpeg\node_modules\ffmpeg-for-homebridge\ffmpeg.exe -i rtsp://abc:abc123456789a!@192.168.0.233:554/live/ch0 -an -sn -dn -codec:v libx264 -pix_fmt yuv420p -color_range mpeg -r 15 -f rawvideo -preset ultrafast -tune zerolatency -filter:v scale='min(1920,iw)':'min(1080,ih)':force_original_aspect_ratio=decrease,scale=trunc(iw/2)*2:trunc(ih/2)*2 -b:v 299k -payload_type 99 -ssrc 16019055 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params Nl7L2wjbXkIj9mUQKne0N8UAIlxsQe5q41FjeSpp srtp://240.0.0.1:50481?rtcpport=50481&pkt_size=1316 -vn -sn -dn -codec:a libfdk_aac -profile:a aac_eld -flags +global_header -f null -ar 16k -b:a 24k -ac 1 -payload_type 110 -ssrc 14630175 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params Lo7gn7XClYqvCxhb4nIapRQNTsJslPFMn6O8aDi9 srtp://240.0.0.1:62907?rtcpport=62907&pkt_size=188 -loglevel level+verbose -progress pipe:1
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] [info] ffmpeg version N-96777-gebee808595-ffmpeg-windows-build-helpers Copyright (c) 2000-2020 the FFmpeg developers
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] [info]   built with gcc 8.3.0 (GCC)
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] [info]   configuration: --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=ffmpeg-windows-build-helpers --enable-version3 --disable-debug --disable-w32threads --arch=x86_64 --target-os=mingw32 --cross-prefix=/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig --enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libwebp --enable-libzimg --enable-libzvbi --enable-libmysofa --enable-libopenjpeg --enable-libopenh264 --enable-liblensfun --enable-libvmaf --enable-libsrt --enable-demuxer=dash --enable-libxml2 --enable-opengl --enable-libdav1d --enable-libsvthevc --enable-libaom --enable-libvpx --enable-nvenc --enable-nvdec --extra-libs=-lharfbuzz --extra-libs=-lm --extra-libs=-lpthread --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCACA_STATIC --enable-amf --enable-libmfx --enable-gpl --enable-avisynth --enable-frei0r --enable-filter=frei0r --enable-librubberband --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxavs --enable-avresample --extra-cflags='-mtune=generic' --extra-cflags=-O3 --enable-static --disable-shared --prefix=/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32 --enable-nonfree --enable-decklink --enable-libfdk-aac
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] [info]   libavutil      56. 41.100 / 56. 41.100
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] [info]   libavcodec     58. 70.100 / 58. 70.100
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] [info]   libavformat    58. 38.101 / 58. 38.101
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] [info]   libavdevice    58.  9.103 / 58.  9.103
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] [info]   libavfilter     7. 76.100 /  7. 76.100
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] [info]   libavresample   4.  0.  0 /  4.  0.  0
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] [info]   libswscale      5.  6.100 /  5.  6.100
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] [info]   libswresample   3.  6.100 /  3.  6.100
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] [info]   libpostproc    55.  6.100 / 55.  6.100
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] [tcp @ 000001c69197a6c0] [verbose] Starting connection attempt to 192.168.0.233 port 554
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] [tcp @ 000001c69197a6c0] [verbose] Successfully connected to 192.168.0.233 port 554
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] [rtsp @ 000001c691978780] [verbose] SDP:
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] v=0
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] o=- 2147466830 2147466860 IN IP4 192.168.0.233
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] s=hysxrtpsion
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] b=AS:1040
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] t=0 0
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] a=control:*
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] m=video 0 RTP/AVP 96
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] b=AS:1024
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] a=recvonly
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] a=LiveStream
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] c=IN IP4 0.0.0.0
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] a=rtpmap:96 H264/90000
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] a=control:trackID=0
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] a=fmtp:96 packetization-mode=1;profile-level-id=640028;sprop-parameter-sets=Z2QAKKw7cDwBE/LCAAADAAIAAAMAPQg=,aO484QBCQgCEhARMUhuTxXyfk/k/J8nm5MkkLCJCkJyeT6/J/X5PrycmpMA=
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] a=x-dimensions:1920,1080
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] m=audio 0 RTP/AVP 97
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] b=AS:16
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] a=recvonly
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] c=IN IP4 0.0.0.0
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] a=control:trackID=1
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] a=rtpmap:97 MPEG4-GENERIC/8000/1
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] a=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1588
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:35] [Camera FFmpeg] [camera] 
[2021/10/26 PM 3:30:36] [Camera FFmpeg] [camera] [rtsp @ 000001c691978780] [verbose] setting jitter buffer size to 500
[2021/10/26 PM 3:30:37] [Camera FFmpeg] [camera] [rtsp @ 000001c691978780] [verbose] setting jitter buffer size to 500
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [h264 @ 000001c69197be00] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info] Input #0, rtsp, from 'rtsp://abc:abc123456789a!@192.168.0.233:554/live/ch0':
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]   Metadata:
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]     title           : hysxrtpsion
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]   Duration: N/A, start: 0.000000, bitrate: N/A
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]     Stream #0:0: Video: h264 (High), 1 reference frame, yuv420p(progressive, left), 1920x1080 (1920x1088), 15 fps, 15 tbr, 90k tbn, 30 tbc
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]     Stream #0:1: Audio: aac (LC), 8000 Hz, mono, fltp
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info] Stream mapping:
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]   Stream #0:1 -> #1:0 (aac (native) -> aac (libfdk_aac))
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info] Press [q] to stop, [?] for help
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [graph_1_in_0_1 @ 000001c691fbc4c0] [verbose] tb:1/8000 samplefmt:fltp samplerate:8000 chlayout:0x4
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [format_out_1_0 @ 000001c691fbd500] [verbose] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_1_0'
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [auto_resampler_0 @ 000001c691fbd980] [verbose] ch:1 chl:mono fmt:fltp r:8000Hz -> ch:1 chl:mono fmt:s16 r:16000Hz
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info] Output #1, rtp, to 'srtp://240.0.0.1:62907?rtcpport=62907&pkt_size=188':
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]   Metadata:
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]     title           : hysxrtpsion
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]     encoder         : Lavf58.38.101
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]     Stream #1:0: Audio: aac (libfdk_aac) (ELD), 16000 Hz, mono, s16, delay 288, 24 kb/s
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]     Metadata:
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]       encoder         : Lavc58.70.100 libfdk_aac
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [error] av_interleaved_write_frame(): Unknown error
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [verbose] No more output streams to write to, finishing.
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [warning] Finishing stream 0:0 without any data written to it.
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [Parsed_scale_0 @ 000001c69228ba80] [verbose] w:min(1920,iw) h:min(1080,ih) flags:'bicubic' interl:0
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [Parsed_scale_1 @ 000001c69228a4c0] [verbose] w:trunc(iw/2)*2 h:trunc(ih/2)*2 flags:'bicubic' interl:0
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [graph 0 input from stream 0:0 @ 000001c692289fc0] [verbose] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 fr:15/1 sar:0/1
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [Parsed_scale_0 @ 000001c69228ba80] [verbose] w:1920 h:1080 fmt:yuv420p sar:0/1 -> w:1920 h:1080 fmt:yuv420p sar:0/1 flags:0x4
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [Parsed_scale_1 @ 000001c69228a4c0] [verbose] w:1920 h:1080 fmt:yuv420p sar:0/1 -> w:1920 h:1080 fmt:yuv420p sar:0/1 flags:0x4
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [libx264 @ 000001c6925100c0] [info] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [libx264 @ 000001c6925100c0] [info] profile Constrained Baseline, level 4.0, 4:2:0, 8-bit
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info] Output #0, rtp, to 'srtp://240.0.0.1:50481?rtcpport=50481&pkt_size=1316':
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]   Metadata:
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]     title           : hysxrtpsion
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]     encoder         : Lavf58.38.101
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]     Stream #0:0: Video: h264 (libx264), 1 reference frame, yuv420p(tv, left), 1920x1080, q=-1--1, 299 kb/s, 15 fps, 90k tbn, 15 tbc
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]     Metadata:
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]       encoder         : Lavc58.70.100 libx264
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]     Side data:
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info]       cpb: bitrate max/min/avg: 0/0/299000 buffer size: 0 vbv_delay: N/A
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [error] Error writing trailer of srtp://240.0.0.1:62907?rtcpport=62907&pkt_size=188: Error number -10051 occurred
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info] frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.01 bitrate=   0.0kbits/s speed=1.75x    
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [AVIOContext @ 000001c691978640] [verbose] Statistics: 0 seeks, 1 writeouts
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info] video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [verbose] Input file #0 (rtsp://abc:abc123456789a!@192.168.0.233:554/live/ch0):
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [verbose]   Input stream #0:0 (video): 0 packets read (0 bytes); 0 frames decoded; 
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [verbose]   Input stream #0:1 (audio): 1 packets read (257 bytes); 1 frames decoded (1024 samples); 
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [verbose]   Total: 1 packets (257 bytes) demuxed
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [verbose] Output file #0 (srtp://240.0.0.1:50481?rtcpport=50481&pkt_size=1316):
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [verbose]   Output stream #0:0 (video): 0 frames encoded; 0 packets muxed (0 bytes); 
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [verbose]   Total: 0 packets (0 bytes) muxed
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [verbose] Output file #1 (srtp://240.0.0.1:62907?rtcpport=62907&pkt_size=188):
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [verbose]   Output stream #1:0 (audio): 1 frames encoded (512 samples); 1 packets muxed (96 bytes); 
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [verbose]   Total: 1 packets (96 bytes) muxed
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [AVIOContext @ 000001c692510b40] [verbose] Statistics: 0 seeks, 0 writeouts
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [AVIOContext @ 000001c692a33200] [verbose] Statistics: 0 seeks, 2 writeouts
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [libx264 @ 000001c6925100c0] [info] final ratefactor: 43.09
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] [info] Conversion failed!
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] FFmpeg exited with code: 1 and signal: null (Error)
[2021/10/26 PM 3:30:38] [Camera FFmpeg] [camera] Stopped video stream.
```

**Homebridge Config:**

```json
{
            "name": "Camera FFmpeg",
            "cameras": [
                {
                    "name": "camera",
                    "videoConfig": {
                        "source": "-i rtsp://abc:abc123456789a!@192.168.0.233:554/live/ch0",
                        "maxStreams": 3,
                        "maxWidth": 1920,
                        "maxHeight": 1080,
                        "maxFPS": 15,
                        "forceMax": true,
                        "audio": true,
                        "debug": true
                    }
                }
            ],
            "platform": "Camera-ffmpeg"
}
```

**Screenshots:**
![image](https://user-images.githubusercontent.com/33836972/138949753-40f1f53f-6a30-4afe-9867-9d30861314bc.png)
![image](https://user-images.githubusercontent.com/33836972/138950006-97e79c03-a605-4b41-9e75-cedbdfaeef0a.png)


**Environment:**

* **Node.js Version**: 14.18.1
* **NPM Version**: 6.14.15
* **Homebridge Version**: 1.3.5
* **Homebridge Camera FFmpeg Version**: 3.1.3
* **Homebridge Config UI X Plugin Version**: 4.41.2
* **Operating System**:  Microsoft Windows 10


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