HSV and zoneminder mjpeg source http, live ok but HSV record crash 
Hi 

first thanks for all job

I had camera from zoneminder, live is ok but when i wan't to start HSV record, he crash 

Zoneminder flux is 1280*720

{
                    "name": "PorteHSV",
                    "motionTimeout": 15,
                    "unbridge": true,
                    "hsv": true,
                    "prebuffering": false,
                    "forcePrebuffering": false,
                    "prebufferLength": 4000,
                    "videoConfig": {
                        "source": "-i http://10.0.0.1/zm/cgi-bin/nph-zms?mode=jpeg&monitor=2&scale=50&maxfps=10&buffer=1000&user=julien&pass=pass",
                        "stillImageSource": "-i http://10.0.0.1/zm/cgi-bin/nph-zms?mode=single&monitor=2&scale=100&user=julien&pass=pass",
                        "maxStreams": 10,
                        "readRate": true,
                        "maxWidth": 1280,
                        "maxHeight": 720,
                        "maxFPS": 10,
                        "debug": true,
                        "vcodec": "libx264",
                        "stimeout": 0,
                        "audio": false
                    },
                    "mqtt": {
                        "motionTopic": "homebridge/porte",
                        "motionMessage": "on"
                    },
                    "videoanalysis": {
                        "active": false
                    }
                },

On live feed all is ok 

`[15/01/2022, 17:02:32] [CameraUI] PorteHSV: Starting video stream: 1280x720, 30 fps, 299 kbps 
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: Stream command: /usr/lib/node_modules/homebridge-camera-ui/node_modules/ffmpeg-for-homebridge/ffmpeg -hide_banner -loglevel level+verbose -re -i http://10.0.0.1/zm/cgi-bin/nph-zms?mode=jpeg&monitor=2&scale=50&maxfps=10&buffer=1000&user=julien&pass=pass -f lavfi -i anullsrc=cl=1 -shortest -an -sn -dn -r 30 -vcodec libx264 -pix_fmt yuv420p -color_range mpeg -f rawvideo -preset ultrafast -tune zerolatency -filter:v scale='min(1280,iw)':'min(720,ih)':force_original_aspect_ratio=decrease,scale=trunc(iw/2)*2:trunc(ih/2)*2 -b:v 299k -bufsize 598k -maxrate 299k -payload_type 99 -ssrc 73102 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params iWuTVyu6K060X6y4zpgQlPKoYFw7Blms7cWMDEyb srtp://10.0.0.76:57778?rtcpport=57778&pkt_size=1318 -progress pipe:1
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [tcp @ 0x3b830a0] [verbose] Starting connection attempt to 10.0.0.1 port 80
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [tcp @ 0x3b830a0] [verbose] Successfully connected to 10.0.0.1 port 80
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info] Input #0, mpjpeg, from 'http://10.0.0.1/zm/cgi-bin/nph-zms?mode=jpeg&monitor=2&scale=50&maxfps=10&buffer=1000&user=julien&pass=pass':
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info]   Duration: N/A, bitrate: N/A
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info]     Stream #0:0: Video: mjpeg (Baseline), 1 reference frame, yuvj420p(pc, bt470bg/unknown/unknown, center), 640x360 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [Parsed_anullsrc_0 @ 0x3b8f5b0] [verbose] sample_rate:44100 channel_layout:'1 channels (FL)' nb_samples:1024
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info] Input #1, lavfi, from 'anullsrc=cl=1':
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info]   Duration: N/A, start: 0.000000, bitrate: 352 kb/s
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info]     Stream #1:0: Audio: pcm_u8, 44100 Hz, 1 channels (FL), u8, 352 kb/s
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info] Stream mapping:
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info]   Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info] Press [q] to stop, [?] for help
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [Parsed_scale_0 @ 0x3bca0e0] [verbose] w:min(1280,iw) h:min(720,ih) flags:'bicubic' interl:0
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [Parsed_scale_1 @ 0x3bf4fd0] [verbose] w:trunc(iw/2)*2 h:trunc(ih/2)*2 flags:'bicubic' interl:0
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [graph 0 input from stream 0:0 @ 0x3bf5c60] [verbose] w:640 h:360 pixfmt:yuvj420p tb:1/25 fr:25/1 sar:1/1
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [Parsed_scale_0 @ 0x3bca0e0] [verbose] w:640 h:360 fmt:yuvj420p sar:1/1 -> w:640 h:360 fmt:yuvj420p sar:1/1 flags:0x4
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [swscaler @ 0x3bf6990] [warning] deprecated pixel format used, make sure you did set range correctly
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [Parsed_scale_1 @ 0x3bf4fd0] [verbose] w:640 h:360 fmt:yuvj420p sar:1/1 -> w:640 h:360 fmt:yuv420p sar:1/1 flags:0x4
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [libx264 @ 0x3b84160] [info] using SAR=1/1
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [libx264 @ 0x3b84160] [info] using cpu capabilities: ARMv6 NEON
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [libx264 @ 0x3b84160] [info] profile Constrained Baseline, level 3.0, 4:2:0, 8-bit
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info] Output #0, rtp, to 'srtp://10.0.0.76:57778?rtcpport=57778&pkt_size=1318':
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info]   Metadata:
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info]     encoder         : Lavf58.45.100
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info]     Stream #0:0: Video: h264 (libx264), 1 reference frame, yuv420p(tv, center), 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 299 kb/s, 30 fps, 90k tbn, 30 tbc
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info]     Metadata:
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info]       encoder         : Lavc58.91.100 libx264
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info]     Side data:
[15/01/2022, 17:02:32] [CameraUI] PorteHSV: [info]       cpb: bitrate max/min/avg: 299000/0/299000 buffer size: 598000 vbv_delay: N/A
[15/01/2022, 17:02:33] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:33] [CameraUI] PorteHSV: [info] frame=    6 fps=0.0 q=38.0 size=      13kB time=00:00:00.16 bitrate= 653.5kbits/s dup=1 drop=0 speed=0.331x    
[15/01/2022, 17:02:33] [CameraUI] PorteHSV: Getting the first frames took 0.722 seconds.
[15/01/2022, 17:02:33] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:33] [CameraUI] PorteHSV: [info] frame=   12 fps= 12 q=37.0 size=      20kB time=00:00:00.36 bitrate= 442.0kbits/s dup=2 drop=0 speed=0.363x    
[15/01/2022, 17:02:34] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:34] [CameraUI] PorteHSV: [info] frame=   19 fps= 12 q=38.0 size=      32kB time=00:00:00.60 bitrate= 441.3kbits/s dup=3 drop=0 speed=0.393x    
[15/01/2022, 17:02:34] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:34] [CameraUI] PorteHSV: [info] frame=   24 fps= 12 q=36.0 size=      33kB time=00:00:00.76 bitrate= 349.3kbits/s dup=4 drop=0 speed=0.377x    
[15/01/2022, 17:02:35] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:35] [CameraUI] PorteHSV: [info] frame=   31 fps= 12 q=36.0 size=      36kB time=00:00:01.00 bitrate= 293.2kbits/s dup=5 drop=0 speed=0.393x    
[15/01/2022, 17:02:35] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:35] [CameraUI] PorteHSV: [info] frame=   37 fps= 12 q=34.0 size=      42kB time=00:00:01.20 bitrate= 284.0kbits/s dup=6 drop=0 speed=0.393x    
[15/01/2022, 17:02:36] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:36] [CameraUI] PorteHSV: [info] frame=   43 fps= 12 q=35.0 size=      57kB time=00:00:01.40 bitrate= 330.8kbits/s dup=7 drop=0 speed=0.393x    
[15/01/2022, 17:02:36] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:36] [CameraUI] PorteHSV: [info] frame=   49 fps= 12 q=34.0 size=      57kB time=00:00:01.60 bitrate= 293.1kbits/s dup=8 drop=0 speed=0.393x    
[15/01/2022, 17:02:37] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:37] [CameraUI] PorteHSV: [info] frame=   55 fps= 12 q=32.0 size=      60kB time=00:00:01.80 bitrate= 273.1kbits/s dup=9 drop=0 speed=0.393x    
[15/01/2022, 17:02:37] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:37] [CameraUI] PorteHSV: Reconfigure stream requested: 640x360, 30 fps, 132 kbps (Ignored)
[15/01/2022, 17:02:37] [CameraUI] PorteHSV: [info] frame=   61 fps= 12 q=33.0 size=      74kB time=00:00:02.00 bitrate= 301.3kbits/s dup=10 drop=0 speed=0.393x    
[15/01/2022, 17:02:38] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:38] [CameraUI] PorteHSV: [info] frame=   67 fps= 12 q=32.0 size=      75kB time=00:00:02.20 bitrate= 278.1kbits/s dup=11 drop=0 speed=0.393x    
[15/01/2022, 17:02:38] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:38] [CameraUI] PorteHSV: [info] frame=   73 fps= 12 q=28.0 size=      80kB time=00:00:02.40 bitrate= 274.2kbits/s dup=12 drop=0 speed=0.393x    
[15/01/2022, 17:02:39] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:39] [CameraUI] PorteHSV: [info] frame=   79 fps= 12 q=34.0 size=      94kB time=00:00:02.60 bitrate= 296.4kbits/s dup=13 drop=0 speed=0.393x    
[15/01/2022, 17:02:39] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:40] [CameraUI] PorteHSV: [info] frame=   86 fps= 12 q=32.0 size=      96kB time=00:00:02.83 bitrate= 277.1kbits/s dup=14 drop=0 speed=0.398x    
[15/01/2022, 17:02:40] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:40] [CameraUI] PorteHSV: [info] frame=   92 fps= 12 q=27.0 size=     102kB time=00:00:03.03 bitrate= 274.9kbits/s dup=15 drop=0 speed=0.398x    
[15/01/2022, 17:02:40] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:41] [CameraUI] PorteHSV: [info] frame=   98 fps= 12 q=32.0 size=     119kB time=00:00:03.23 bitrate= 300.6kbits/s dup=16 drop=0 speed=0.398x    
[15/01/2022, 17:02:41] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:41] [CameraUI] PorteHSV: [info] frame=  104 fps= 12 q=33.0 size=     120kB time=00:00:03.43 bitrate= 286.6kbits/s dup=17 drop=0 speed=0.397x    
[15/01/2022, 17:02:41] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:42] [CameraUI] PorteHSV: [info] frame=  110 fps= 12 q=31.0 size=     123kB time=00:00:03.63 bitrate= 277.7kbits/s dup=18 drop=0 speed=0.397x    
[15/01/2022, 17:02:42] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:42] [CameraUI] PorteHSV: [info] frame=  116 fps= 12 q=25.0 size=     131kB time=00:00:03.83 bitrate= 279.8kbits/s dup=19 drop=0 speed=0.397x    
[15/01/2022, 17:02:42] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:43] [CameraUI] PorteHSV: [info] frame=  122 fps= 12 q=28.0 size=     136kB time=00:00:04.03 bitrate= 276.9kbits/s dup=20 drop=0 speed=0.397x    
[15/01/2022, 17:02:43] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:43] [CameraUI] PorteHSV: [info] frame=  128 fps= 12 q=32.0 size=     150kB time=00:00:04.23 bitrate= 289.7kbits/s dup=21 drop=0 speed=0.397x    
[15/01/2022, 17:02:43] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:44] [CameraUI] PorteHSV: [info] frame=  134 fps= 12 q=31.0 size=     153kB time=00:00:04.43 bitrate= 282.0kbits/s dup=22 drop=0 speed=0.397x    
[15/01/2022, 17:02:44] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:44] [CameraUI] PorteHSV: [info] frame=  140 fps= 12 q=31.0 size=     166kB time=00:00:04.63 bitrate= 293.3kbits/s dup=23 drop=0 speed=0.397x    
[15/01/2022, 17:02:44] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:45] [CameraUI] PorteHSV: [info] frame=  146 fps= 12 q=31.0 size=     168kB time=00:00:04.83 bitrate= 285.6kbits/s dup=24 drop=0 speed=0.397x    
[15/01/2022, 17:02:45] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:45] [CameraUI] PorteHSV: [info] frame=  152 fps= 12 q=26.0 size=     174kB time=00:00:05.03 bitrate= 283.1kbits/s dup=25 drop=0 speed=0.397x    
[15/01/2022, 17:02:45] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:46] [CameraUI] PorteHSV: [info] frame=  158 fps= 12 q=29.0 size=     179kB time=00:00:05.23 bitrate= 280.8kbits/s dup=26 drop=0 speed=0.396x    
[15/01/2022, 17:02:46] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:46] [CameraUI] PorteHSV: [info] frame=  164 fps= 12 q=31.0 size=     198kB time=00:00:05.43 bitrate= 298.9kbits/s dup=27 drop=0 speed=0.396x    
[15/01/2022, 17:02:46] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:47] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:47] [CameraUI] PorteHSV: [info] frame=  172 fps= 12 q=29.0 size=     203kB time=00:00:05.70 bitrate= 292.0kbits/s dup=29 drop=0 speed=0.401x    
[15/01/2022, 17:02:47] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:47] [CameraUI] PorteHSV: [info] frame=  178 fps= 12 q=29.0 size=     208kB time=00:00:05.90 bitrate= 288.8kbits/s dup=30 drop=0 speed= 0.4x    
[15/01/2022, 17:02:48] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:48] [CameraUI] PorteHSV: [info] frame=  184 fps= 12 q=22.0 size=     219kB time=00:00:06.10 bitrate= 294.6kbits/s dup=31 drop=0 speed= 0.4x    
[15/01/2022, 17:02:48] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:48] [CameraUI] PorteHSV: [info] frame=  190 fps= 12 q=28.0 size=     230kB time=00:00:06.30 bitrate= 298.9kbits/s dup=32 drop=0 speed= 0.4x    
[15/01/2022, 17:02:49] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:49] [CameraUI] PorteHSV: [info] frame=  196 fps= 12 q=28.0 size=     234kB time=00:00:06.50 bitrate= 295.2kbits/s dup=33 drop=0 speed= 0.4x    
[15/01/2022, 17:02:49] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:49] [CameraUI] PorteHSV: [info] frame=  202 fps= 12 q=29.0 size=     239kB time=00:00:06.70 bitrate= 292.4kbits/s dup=34 drop=0 speed= 0.4x    
[15/01/2022, 17:02:50] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:50] [CameraUI] PorteHSV: [info] frame=  208 fps= 12 q=28.0 size=     245kB time=00:00:06.90 bitrate= 291.3kbits/s dup=35 drop=0 speed= 0.4x    
[15/01/2022, 17:02:50] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:50] [CameraUI] PorteHSV: [info] frame=  214 fps= 12 q=22.0 size=     255kB time=00:00:07.10 bitrate= 294.7kbits/s dup=36 drop=0 speed= 0.4x    
[15/01/2022, 17:02:51] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:51] [CameraUI] PorteHSV: [info] frame=  220 fps= 12 q=28.0 size=     266kB time=00:00:07.30 bitrate= 298.8kbits/s dup=37 drop=0 speed=0.399x    
[15/01/2022, 17:02:51] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:51] [CameraUI] PorteHSV: [info] frame=  226 fps= 12 q=29.0 size=     271kB time=00:00:07.50 bitrate= 295.7kbits/s dup=38 drop=0 speed=0.399x    
[15/01/2022, 17:02:52] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:52] [CameraUI] PorteHSV: [info] frame=  232 fps= 12 q=28.0 size=     277kB time=00:00:07.70 bitrate= 294.3kbits/s dup=39 drop=0 speed=0.399x    
[15/01/2022, 17:02:52] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:52] [CameraUI] PorteHSV: [info] frame=  238 fps= 12 q=28.0 size=     282kB time=00:00:07.90 bitrate= 292.1kbits/s dup=40 drop=0 speed=0.399x    
[15/01/2022, 17:02:53] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:53] [CameraUI] PorteHSV: [info] frame=  244 fps= 12 q=22.0 size=     292kB time=00:00:08.10 bitrate= 295.5kbits/s dup=41 drop=0 speed=0.399x    
[15/01/2022, 17:02:53] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:53] [CameraUI] PorteHSV: [info] frame=  250 fps= 12 q=29.0 size=     304kB time=00:00:08.30 bitrate= 299.7kbits/s dup=42 drop=0 speed=0.399x    
[15/01/2022, 17:02:54] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:54] [CameraUI] PorteHSV: [info] frame=  257 fps= 12 q=31.0 size=     342kB time=00:00:08.53 bitrate= 328.0kbits/s dup=43 drop=0 speed= 0.4x    
[15/01/2022, 17:02:54] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:54] [CameraUI] PorteHSV: [info] frame=  263 fps= 12 q=31.0 size=     349kB time=00:00:08.73 bitrate= 327.6kbits/s dup=44 drop=0 speed= 0.4x    
[15/01/2022, 17:02:55] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:55] [CameraUI] PorteHSV: [info] frame=  269 fps= 12 q=31.0 size=     355kB time=00:00:08.93 bitrate= 325.7kbits/s dup=45 drop=0 speed= 0.4x    
[15/01/2022, 17:02:55] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:55] [CameraUI] PorteHSV: [info] frame=  275 fps= 12 q=31.0 size=     363kB time=00:00:09.13 bitrate= 325.7kbits/s dup=46 drop=0 speed= 0.4x    
[15/01/2022, 17:02:56] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:56] [CameraUI] PorteHSV: [info] frame=  281 fps= 12 q=32.0 size=     373kB time=00:00:09.33 bitrate= 327.7kbits/s dup=47 drop=0 speed= 0.4x    
[15/01/2022, 17:02:56] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:56] [CameraUI] PorteHSV: [info] frame=  287 fps= 12 q=31.0 size=     380kB time=00:00:09.53 bitrate= 326.2kbits/s dup=48 drop=0 speed= 0.4x    
[15/01/2022, 17:02:57] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:57] [CameraUI] PorteHSV: [info] frame=  293 fps= 12 q=30.0 size=     383kB time=00:00:09.73 bitrate= 322.3kbits/s dup=49 drop=0 speed= 0.4x    
[15/01/2022, 17:02:57] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:57] [CameraUI] PorteHSV: [info] frame=  299 fps= 12 q=30.0 size=     389kB time=00:00:09.93 bitrate= 320.6kbits/s dup=50 drop=0 speed=0.399x    
[15/01/2022, 17:02:58] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:58] [CameraUI] PorteHSV: [info] frame=  305 fps= 12 q=30.0 size=     397kB time=00:00:10.13 bitrate= 321.2kbits/s dup=51 drop=0 speed=0.399x    
[15/01/2022, 17:02:58] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:58] [CameraUI] PorteHSV: [info] frame=  311 fps= 12 q=30.0 size=     404kB time=00:00:10.33 bitrate= 320.0kbits/s dup=52 drop=0 speed=0.399x    
[15/01/2022, 17:02:59] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:59] [CameraUI] PorteHSV: [info] frame=  317 fps= 12 q=30.0 size=     410kB time=00:00:10.53 bitrate= 318.7kbits/s dup=53 drop=0 speed=0.399x    
[15/01/2022, 17:02:59] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:02:59] [CameraUI] PorteHSV: [info] frame=  323 fps= 12 q=30.0 size=     415kB time=00:00:10.73 bitrate= 316.7kbits/s dup=54 drop=0 speed=0.399x    
[15/01/2022, 17:03:00] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:00] [CameraUI] PorteHSV: [info] frame=  329 fps= 12 q=29.0 size=     423kB time=00:00:10.93 bitrate= 317.1kbits/s dup=55 drop=0 speed=0.399x    
[15/01/2022, 17:03:00] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:00] [CameraUI] PorteHSV: [info] frame=  335 fps= 12 q=29.0 size=     429kB time=00:00:11.13 bitrate= 315.8kbits/s dup=56 drop=0 speed=0.399x    
[15/01/2022, 17:03:01] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:01] [CameraUI] PorteHSV: [info] frame=  342 fps= 12 q=30.0 size=     436kB time=00:00:11.36 bitrate= 314.0kbits/s dup=57 drop=0 speed= 0.4x    
[15/01/2022, 17:03:01] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:01] [CameraUI] PorteHSV: [info] frame=  347 fps= 12 q=30.0 size=     440kB time=00:00:11.53 bitrate= 312.8kbits/s dup=58 drop=0 speed=0.399x    
[15/01/2022, 17:03:02] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:02] [CameraUI] PorteHSV: [info] frame=  354 fps= 12 q=30.0 size=     448kB time=00:00:11.76 bitrate= 312.1kbits/s dup=59 drop=0 speed= 0.4x    
[15/01/2022, 17:03:02] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:02] [CameraUI] PorteHSV: [info] frame=  360 fps= 12 q=30.0 size=     454kB time=00:00:11.96 bitrate= 310.6kbits/s dup=60 drop=0 speed= 0.4x    
[15/01/2022, 17:03:03] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:03] [CameraUI] PorteHSV: [info] frame=  366 fps= 12 q=30.0 size=     460kB time=00:00:12.16 bitrate= 309.8kbits/s dup=61 drop=0 speed= 0.4x    
[15/01/2022, 17:03:03] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:03] [CameraUI] PorteHSV: [info] frame=  372 fps= 12 q=30.0 size=     469kB time=00:00:12.36 bitrate= 310.4kbits/s dup=62 drop=0 speed= 0.4x    
[15/01/2022, 17:03:04] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:04] [CameraUI] PorteHSV: [info] frame=  378 fps= 12 q=30.0 size=     475kB time=00:00:12.56 bitrate= 309.4kbits/s dup=63 drop=0 speed= 0.4x    
[15/01/2022, 17:03:04] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:04] [CameraUI] PorteHSV: [info] frame=  384 fps= 12 q=29.0 size=     481kB time=00:00:12.76 bitrate= 308.4kbits/s dup=64 drop=0 speed= 0.4x    
[15/01/2022, 17:03:05] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:05] [CameraUI] PorteHSV: [info] frame=  390 fps= 12 q=30.0 size=     486kB time=00:00:12.96 bitrate= 307.2kbits/s dup=65 drop=0 speed= 0.4x    
[15/01/2022, 17:03:05] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:05] [CameraUI] PorteHSV: [info] frame=  396 fps= 12 q=30.0 size=     495kB time=00:00:13.16 bitrate= 308.1kbits/s dup=66 drop=0 speed=0.399x    
[15/01/2022, 17:03:06] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:06] [CameraUI] PorteHSV: [info] frame=  402 fps= 12 q=29.0 size=     502kB time=00:00:13.36 bitrate= 307.4kbits/s dup=67 drop=0 speed=0.399x    
[15/01/2022, 17:03:06] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:06] [CameraUI] PorteHSV: [info] frame=  408 fps= 12 q=30.0 size=     511kB time=00:00:13.56 bitrate= 308.7kbits/s dup=68 drop=0 speed=0.399x    
[15/01/2022, 17:03:07] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:07] [CameraUI] PorteHSV: [info] frame=  414 fps= 12 q=30.0 size=     517kB time=00:00:13.76 bitrate= 307.6kbits/s dup=69 drop=0 speed=0.399x    
[15/01/2022, 17:03:07] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:07] [CameraUI] PorteHSV: [info] frame=  420 fps= 12 q=29.0 size=     526kB time=00:00:13.96 bitrate= 308.4kbits/s dup=70 drop=0 speed=0.399x    
[15/01/2022, 17:03:08] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:08] [CameraUI] PorteHSV: [info] frame=  426 fps= 12 q=29.0 size=     532kB time=00:00:14.16 bitrate= 307.4kbits/s dup=71 drop=0 speed=0.399x    
[15/01/2022, 17:03:08] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:08] [CameraUI] PorteHSV: [info] frame=  432 fps= 12 q=29.0 size=     537kB time=00:00:14.36 bitrate= 306.3kbits/s dup=72 drop=0 speed=0.399x    
[15/01/2022, 17:03:09] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:09] [CameraUI] PorteHSV: [info] frame=  438 fps= 12 q=30.0 size=     543kB time=00:00:14.56 bitrate= 305.2kbits/s dup=73 drop=0 speed=0.399x    
[15/01/2022, 17:03:09] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:09] [CameraUI] PorteHSV: [info] frame=  444 fps= 12 q=30.0 size=     551kB time=00:00:14.76 bitrate= 305.7kbits/s dup=74 drop=0 speed=0.399x    
[15/01/2022, 17:03:09] [CameraUI] PorteHSV: Motion OFF (max detection time reached)
[15/01/2022, 17:03:10] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:10] [CameraUI] PorteHSV: [info] frame=  450 fps= 12 q=29.0 size=     557kB time=00:00:14.96 bitrate= 305.1kbits/s dup=75 drop=0 speed=0.399x    
[15/01/2022, 17:03:10] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:10] [CameraUI] PorteHSV: [info] frame=  456 fps= 12 q=30.0 size=     567kB time=00:00:15.16 bitrate= 306.0kbits/s dup=76 drop=0 speed=0.399x    
[15/01/2022, 17:03:11] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:11] [CameraUI] PorteHSV: [info] frame=  462 fps= 12 q=30.0 size=     572kB time=00:00:15.36 bitrate= 305.0kbits/s dup=77 drop=0 speed=0.399x    
[15/01/2022, 17:03:11] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:11] [CameraUI] PorteHSV: [info] frame=  468 fps= 12 q=30.0 size=     581kB time=00:00:15.56 bitrate= 305.5kbits/s dup=78 drop=0 speed=0.399x    
[15/01/2022, 17:03:12] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:12] [CameraUI] PorteHSV: [info] frame=  474 fps= 12 q=29.0 size=     587kB time=00:00:15.76 bitrate= 304.8kbits/s dup=79 drop=0 speed=0.399x    
[15/01/2022, 17:03:12] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:12] [CameraUI] PorteHSV: [info] frame=  480 fps= 12 q=30.0 size=     596kB time=00:00:15.96 bitrate= 305.6kbits/s dup=80 drop=0 speed=0.399x    
[15/01/2022, 17:03:13] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:13] [CameraUI] PorteHSV: [info] frame=  487 fps= 12 q=31.0 size=     602kB time=00:00:16.20 bitrate= 304.5kbits/s dup=81 drop=0 speed= 0.4x    
[15/01/2022, 17:03:13] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:13] [CameraUI] PorteHSV: [info] frame=  493 fps= 12 q=30.0 size=     610kB time=00:00:16.40 bitrate= 304.8kbits/s dup=82 drop=0 speed= 0.4x    
[15/01/2022, 17:03:14] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:14] [CameraUI] PorteHSV: [info] frame=  499 fps= 12 q=30.0 size=     616kB time=00:00:16.60 bitrate= 304.1kbits/s dup=83 drop=0 speed= 0.4x    
[15/01/2022, 17:03:14] [CameraUI] PorteHSV: [verbose] *** 1 dup!
[15/01/2022, 17:03:14] [CameraUI] PorteHSV: [info] frame=  505 fps= 12 q=31.0 size=     650kB time=00:00:16.80 bitrate= 316.9kbits/s dup=84 drop=0 speed= 0.4x    
[15/01/2022, 17:03:14] [CameraUI] PorteHSV: Stop stream requested
[15/01/2022, 17:03:14] [CameraUI] PorteHSV: Stopped video stream.
[15/01/2022, 17:03:14] [CameraUI] PorteHSV: FFmpeg exited with code: null and signal: SIGKILL (Expected)`


But when i start record from motion 

`15/01/2022, 17:01:09] [CameraUI] MQTT: on (homebridge/porte)
[15/01/2022, 17:01:09] [CameraUI] PorteHSV: Motion ON
[15/01/2022, 17:01:09] [CameraUI] PorteHSV: Video fragments requested from HSV
[15/01/2022, 17:01:09] [CameraUI] PorteHSV: Replacing audio with a dummy track, audio source not found or timed out during probe stream (recording)
[15/01/2022, 17:01:10] [CameraUI] PorteHSV: Start recording...
[15/01/2022, 17:01:10] [CameraUI] PorteHSV: Recording command: /usr/lib/node_modules/homebridge-camera-ui/node_modules/ffmpeg-for-homebridge/ffmpeg -hide_banner -re -i http://10.0.0.1/zm/cgi-bin/nph-zms?mode=jpeg&monitor=2&scale=50&maxfps=10&buffer=1000&user=julien&pass=pass -f lavfi -i anullsrc=cl=1 -shortest -f mp4 -sn -dn -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level:v 3.1 -b:v 2000k -force_key_frames expr:eq(t,n_forced*4) -r 30 -vf scale=w=1920:h=1080:force_original_aspect_ratio=1,pad=1920:1080:(ow-iw)/2:(oh-ih)/2 -bsf:a aac_adtstoasc -acodec libfdk_aac -profile:a aac_low -ar 32k -b:a 64k -ac 1 -movflags frag_keyframe+empty_moov+default_base_moof -max_muxing_queue_size 1024 tcp://127.0.0.1:15213
[15/01/2022, 17:01:10] [CameraUI] PorteHSV: Input #0, mpjpeg, from 'http://10.0.0.1/zm/cgi-bin/nph-zms?mode=jpeg&monitor=2&scale=50&maxfps=10&buffer=1000&user=julien&pass=pass':
  Duration: N/A, bitrate: N/A
    Stream #0:0
[15/01/2022, 17:01:10] [CameraUI] PorteHSV: : Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 640x360 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Input #1, lavfi, from 'anullsrc=cl=1':
  Duration: N/A, start: 0.000000, bitrate: 352 kb/s
    Stream #1:0: Audio: pcm_u8, 44100 Hz, 1 channels (FL), u8, 352 kb/s

[15/01/2022, 17:01:10] [CameraUI] PorteHSV: Recording started
[15/01/2022, 17:01:10] [CameraUI] PorteHSV: Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
  Stream #1:0 -> #0:1 (pcm_u8 (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help

[15/01/2022, 17:01:10] [CameraUI] PorteHSV: [swscaler @ 0x2d4abc0] deprecated pixel format used, make sure you did set range correctly

[15/01/2022, 17:01:10] [CameraUI] PorteHSV: [libx264 @ 0x2cf0f90] using SAR=1/1
[libx264 @ 0x2cf0f90] 
[15/01/2022, 17:01:10] [CameraUI] PorteHSV: frame MB size (120x68) > level limit (3600)
[libx264 @ 0x2cf0f90] MB rate (244800) > level limit (108000)

[15/01/2022, 17:01:10] [CameraUI] PorteHSV: [libx264 @ 0x2cf0f90] using cpu capabilities: ARMv6 NEON

[15/01/2022, 17:01:10] [CameraUI] PorteHSV: [libx264 @ 0x2cf0f90] profile Constrained Baseline, level 3.1, 4:2:0, 8-bit

[15/01/2022, 17:01:10] [CameraUI] PorteHSV: [libx264 @ 0x2cf0f90] 264 - core 160 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=0 ref=2 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=2000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00

[15/01/2022, 17:01:10] [CameraUI] PorteHSV: Output #0, mp4, to 'tcp://127.0.0.1:15213':
  Metadata:
    encoder         : Lavf58.45.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 2000 kb/s, 30 fps, 15360 tbn, 30 tbc
    Metadata:
      encoder         : Lavc58.91.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 0 vbv_delay: N/A
    Stream #0:1: Audio: aac (libfdk_aac) (LC) (mp4a / 0x6134706D), 32000 Hz, mono, s16, 64 kb/s
    Metadata:
      encoder         : Lavc58.91.100 libfdk_aac

[15/01/2022, 17:01:10] [CameraUI] PorteHSV: frame=    6 fps=0.0 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A dup=1 drop=0 speed=   0x    
[15/01/2022, 17:01:11] [CameraUI] PorteHSV: frame=   10 fps=9.6 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A dup=2 drop=0 speed=   0x    
[15/01/2022, 17:01:11] [CameraUI] PorteHSV: frame=   16 fps= 10 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A dup=3 drop=0 speed=   0x    
[15/01/2022, 17:01:12] [CameraUI] PorteHSV: frame=   20 fps=9.8 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A dup=3 drop=0 speed=   0x    
[15/01/2022, 17:01:12] [CameraUI] PorteHSV: frame=   26 fps= 10 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A dup=4 drop=0 speed=   0x    
[15/01/2022, 17:01:13] [CameraUI] PorteHSV: frame=   32 fps= 10 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A dup=5 drop=0 speed=   0x    
[15/01/2022, 17:01:13] [CameraUI] PorteHSV: frame=   37 fps= 10 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A dup=6 drop=0 speed=   0x    
[15/01/2022, 17:01:15] [CameraUI] PorteHSV: frame=   44 fps=9.2 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A dup=7 drop=0 speed=   0x    
[15/01/2022, 17:01:15] [CameraUI] PorteHSV: frame=   50 fps=9.3 q=50.0 size=       1kB time=00:00:00.09 bitrate= 102.4kbits/s dup=8 drop=0 speed=0.0178x    
[15/01/2022, 17:01:16] [CameraUI] PorteHSV: frame=   60 fps= 10 q=37.0 size=       1kB time=00:00:00.41 bitrate=  23.6kbits/s dup=10 drop=0 speed=0.0704x    
[15/01/2022, 17:01:16] [CameraUI] PorteHSV: frame=   65 fps= 10 q=35.0 size=       1kB time=00:00:00.60 bitrate=  16.2kbits/s dup=11 drop=0 speed=0.0938x    
[15/01/2022, 17:01:17] [CameraUI] PorteHSV: frame=   73 fps= 10 q=35.0 size=       1kB time=00:00:00.86 bitrate=  11.4kbits/s dup=12 drop=0 speed=0.122x    
[15/01/2022, 17:01:17] [CameraUI] PorteHSV: frame=   80 fps= 11 q=35.0 size=       1kB time=00:00:01.08 bitrate=   9.0kbits/s dup=13 drop=0 speed=0.143x    
[15/01/2022, 17:01:18] [CameraUI] PorteHSV: frame=   85 fps= 10 q=35.0 size=       1kB time=00:00:01.28 bitrate=   7.7kbits/s dup=14 drop=0 speed=0.157x    
[15/01/2022, 17:01:18] [CameraUI] PorteHSV: Closing recording process
[15/01/2022, 17:01:18] [CameraUI] Resetting motion state because HSV closed recording with reason "3"
[15/01/2022, 17:01:18] [CameraUI] PorteHSV: FFMPEG socket closed during read for 8 bytes!
[15/01/2022, 17:01:18] [CameraUI] PorteHSV: Skip saving the recording, the file might be corrupted because the recording process was cancelled by HSV
[15/01/2022, 17:01:18] [CameraUI] PorteHSV: FFmpeg recording process exited (expected)
[15/01/2022, 17:01:24] [CameraUI] PorteHSV: Motion OFF - Motion handler timeout.`

Do you know why ? not good resolution ? i see encoding 1980 but source 1280

I'm on RPI4

Thanks for help 