seydx / homebridge-camera-ui

Homebridge plugin for RTSP Cameras with HSV, motion detection support, Image Rekognition, Web UI to manage/watch streams and WebApp support
MIT License
647 stars 92 forks source link

Homekit Secure Video Support #182

Closed rashmendis closed 2 years ago

rashmendis commented 3 years ago

@SeydX Is it possible to make this plugin support Homekit Secure Video since it has many features such as video backup?

seydx commented 3 years ago

Hey, atm homebridge doesnt support HSV. If it is supported at some point this will be added

seydx commented 3 years ago

It seems that HSV is currently in work for Homebridge/HAP

https://github.com/homebridge/HAP-NodeJS/pull/904

seydx commented 3 years ago

HSV will be released with v4.3

https://github.com/SeydX/homebridge-camera-ui/pull/255

macjl commented 2 years ago

Hello,

I've tested the HSV feature with v5.0.0-beta.63. I've found that the stream is not record, when there is an audio track. Here is my config :

                {
                    "name": "Couloir",
                    "motion": true,
                    "doorbell": false,
                    "motionTimeout": 60,
                    "unbridge": true,
                    "hsv": true,
                    "prebuffering": true,
                    "forcePrebuffering": false,
                    "prebufferLength": 6,
                    "videoConfig": {
                        "source": "-i rtsp://localhost:8554/live/usbcam.stream",
                        "audio": true,
                        "debug": true
                    },
                    "videoanalysis": {
                        "active": true
                    }
                }

And the log with audio 'true' :

2022-01-10T18:34:12.281197891Z [1/10/2022, 7:34:12 PM] [CameraUI] Couloir: Motion detected via Videoanalysis: [{"name":"all","diffs":51817,"total":90000,"percent":57.57444381713867}]
2022-01-10T18:34:12.285356437Z [1/10/2022, 7:34:12 PM] [CameraUI] Couloir: Motion ON
2022-01-10T18:34:12.285482954Z [1/10/2022, 7:34:12 PM] [CameraUI] Couloir: Handling event: Motion switched on
2022-01-10T18:34:12.285504201Z [1/10/2022, 7:34:12 PM] [CameraUI] Received a new VIDEOANALYSIS message {"error":false,"message":"Handled through extern controller"} (Couloir)
2022-01-10T18:34:12.502005780Z [1/10/2022, 7:34:12 PM] [CameraUI] Couloir: Video fragments requested from HSV
2022-01-10T18:34:12.502393964Z [1/10/2022, 7:34:12 PM] [CameraUI] Couloir: Setting prebuffer stream as input
2022-01-10T18:34:12.502697619Z [1/10/2022, 7:34:12 PM] [CameraUI] Couloir: Prebuffer requested with a duration of -6s
2022-01-10T18:34:12.503310796Z [1/10/2022, 7:34:12 PM] [CameraUI] Compatible audio stream detected, copying..
2022-01-10T18:34:12.503683274Z [1/10/2022, 7:34:12 PM] [CameraUI] Couloir: Start recording...
2022-01-10T18:34:12.504235571Z [1/10/2022, 7:34:12 PM] [CameraUI] Couloir: Recording command: ffmpeg -hide_banner -analyzeduration 0 -probesize 3087353 -f mp4 -i tcp://127.0.0.1:39807 -f mp4 -vcodec copy -bsf:a aac_adtstoasc -acodec copy -movflags frag_keyframe+empty_moov+default_base_moof -max_muxing_queue_size 1024 tcp://127.0.0.1:30857
2022-01-10T18:34:12.580696329Z [1/10/2022, 7:34:12 PM] [CameraUI] Couloir: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tcp://127.0.0.1:39807':
2022-01-10T18:34:12.580733339Z   Metadata:
2022-01-10T18:34:12.580745510Z     major_brand     : iso5
2022-01-10T18:34:12.580751862Z     minor_version   : 512
2022-01-10T18:34:12.580757787Z     compatible_brands: iso5iso6mp41
2022-01-10T18:34:12.580763827Z     title           : Stream
2022-01-10T18:34:12.580769964Z     encoder         : Lavf58.45.100
2022-01-10T18:34:12.580776031Z 
2022-01-10T18:34:12.581384425Z [1/10/2022, 7:34:12 PM] [CameraUI] Couloir:   Duration: 00:00:23.74, start: 18.700000, bitrate: N/A
2022-01-10T18:34:12.581435490Z     Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 1021 kb/s, 10 fps, 10 tbr, 10240 tbn, 20 tbc (default)
2022-01-10T18:34:12.581444452Z     Metadata:
2022-01-10T18:34:12.581451274Z       handler_name    : VideoHandler
2022-01-10T18:34:12.581456998Z     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 20 kb/s (default)
2022-01-10T18:34:12.581462789Z     Metadata:
2022-01-10T18:34:12.581468556Z       handler_name    : SoundHandler
2022-01-10T18:34:12.581494923Z Output #0, mp4, to 'tcp://127.0.0.1:30857':
2022-01-10T18:34:12.581501826Z   Metadata:
2022-01-10T18:34:12.581507145Z     major_brand     : iso5
2022-01-10T18:34:12.581512358Z     minor_version   : 512
2022-01-10T18:34:12.581517481Z     compatible_brands: iso5iso6mp41
2022-01-10T18:34:12.581522577Z     title           : Stream
2022-01-10T18:34:12.581527817Z     encoder         : 
2022-01-10T18:34:12.582270482Z [1/10/2022, 7:34:12 PM] [CameraUI] Couloir: Recording started
2022-01-10T18:34:12.582479500Z [1/10/2022, 7:34:12 PM] [CameraUI] Couloir: Lavf58.45.100
2022-01-10T18:34:12.582498113Z     Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, q=2-31, 1021 kb/s, 10 fps, 10 tbr, 10240 tbn, 10240 tbc (default)
2022-01-10T18:34:12.582506839Z     Metadata:
2022-01-10T18:34:12.582513336Z       handler_name    : VideoHandler
2022-01-10T18:34:12.582524184Z     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 20 kb/s (default)
2022-01-10T18:34:12.582530586Z     Metadata:
2022-01-10T18:34:12.582536254Z       handler_name    : SoundHandler
2022-01-10T18:34:12.582542326Z Stream mapping:
2022-01-10T18:34:12.582548402Z   Stream #0:0 -> #0:0 (copy)
2022-01-10T18:34:12.582554408Z   Stream #0:1 -> #0:1 (copy)
2022-01-10T18:34:12.582560519Z Press [q] to stop, [?] for help
2022-01-10T18:34:12.582566303Z 
2022-01-10T18:34:13.873560373Z [1/10/2022, 7:34:13 PM] [CameraUI] Couloir: frame=   52 fps= 41 q=-1.0 size=       1kB time=00:00:05.10 bitrate=   1.9kbits/s speed=3.98x    
2022-01-10T18:34:14.039806203Z [1/10/2022, 7:34:14 PM] [CameraUI] Couloir: Closing recording process
2022-01-10T18:34:14.040379223Z [1/10/2022, 7:34:14 PM] [CameraUI] Resetting motion state because HSV closed recording with reason "5"
2022-01-10T18:34:14.041483020Z [1/10/2022, 7:34:14 PM] [CameraUI] Couloir: FFMPEG socket closed during read for 8 bytes!
2022-01-10T18:34:14.042074090Z [1/10/2022, 7:34:14 PM] [CameraUI] Couloir: Skip saving the recording, the file might be corrupted because the recording process was cancelled by HSV
2022-01-10T18:34:14.046048080Z [1/10/2022, 7:34:14 PM] [CameraUI] Couloir: Prebuffer request ended
2022-01-10T18:34:14.046603127Z [1/10/2022, 7:34:14 PM] [CameraUI] Couloir: FFmpeg recording process exited (expected)

And with Audio to false :

2022-01-10T18:37:22.628976037Z [1/10/2022, 7:37:22 PM] [CameraUI] Couloir: Motion detected via Videoanalysis: [{"name":"all","diffs":89977,"total":90000,"percent":99.97444152832031}]
2022-01-10T18:37:22.630840543Z [1/10/2022, 7:37:22 PM] [CameraUI] Couloir: Motion ON
2022-01-10T18:37:22.632098702Z [1/10/2022, 7:37:22 PM] [CameraUI] Couloir: Handling event: Motion switched on
2022-01-10T18:37:22.632506626Z [1/10/2022, 7:37:22 PM] [CameraUI] Received a new VIDEOANALYSIS message {"error":false,"message":"Handled through extern controller"} (Couloir)
2022-01-10T18:37:22.949115847Z [1/10/2022, 7:37:22 PM] [CameraUI] Couloir: Video fragments requested from HSV
2022-01-10T18:37:22.950032187Z [1/10/2022, 7:37:22 PM] [CameraUI] Couloir: Setting prebuffer stream as input
2022-01-10T18:37:22.950372020Z [1/10/2022, 7:37:22 PM] [CameraUI] Couloir: Prebuffer requested with a duration of -6s
2022-01-10T18:37:22.951279799Z [1/10/2022, 7:37:22 PM] [CameraUI] Couloir: Start recording...
2022-01-10T18:37:22.951925633Z [1/10/2022, 7:37:22 PM] [CameraUI] Couloir: Recording command: ffmpeg -hide_banner -analyzeduration 0 -probesize 3062664 -f mp4 -i tcp://127.0.0.1:13464 -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 -an -movflags frag_keyframe+empty_moov+default_base_moof -max_muxing_queue_size 1024 tcp://127.0.0.1:28382
2022-01-10T18:37:23.024368220Z [1/10/2022, 7:37:23 PM] [CameraUI] Couloir: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tcp://127.0.0.1:13464':
2022-01-10T18:37:23.024407171Z   Metadata:
2022-01-10T18:37:23.024416561Z     major_brand     : iso5
2022-01-10T18:37:23.024422820Z     minor_version   : 512
2022-01-10T18:37:23.024428434Z     compatible_brands: iso5iso6mp41
2022-01-10T18:37:23.025271231Z [1/10/2022, 7:37:23 PM] [CameraUI] Couloir: 
2022-01-10T18:37:23.025302814Z     title           : Stream
2022-01-10T18:37:23.025311735Z     encoder         : Lavf58.45.100
2022-01-10T18:37:23.025318705Z   Duration: 00:00:35.00, start: 30.000000, bitrate: N/A
2022-01-10T18:37:23.025325214Z     Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 699 kb/s, 10 fps, 10 tbr, 10240 tbn, 20 tbc (default)
2022-01-10T18:37:23.025331627Z     Metadata:
2022-01-10T18:37:23.025338261Z       handler_name    : VideoHandler
2022-01-10T18:37:23.025344400Z 
2022-01-10T18:37:23.026642522Z [1/10/2022, 7:37:23 PM] [CameraUI] Couloir: Recording started
2022-01-10T18:37:23.026670424Z [1/10/2022, 7:37:23 PM] [CameraUI] Couloir: Stream mapping:
2022-01-10T18:37:23.026682466Z   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
2022-01-10T18:37:23.026693062Z Press [q] to stop, [?] for help
2022-01-10T18:37:23.026704775Z 
2022-01-10T18:37:23.052980155Z [1/10/2022, 7:37:23 PM] [CameraUI] Couloir: [libx264 @ 0x55e2e05c2a40] frame MB size (120x68) > level limit (3600)
2022-01-10T18:37:23.053012649Z [libx264 @ 0x55e2e05c2a40] MB rate (244800) > level limit (108000)
2022-01-10T18:37:23.053020306Z 
2022-01-10T18:37:23.056628147Z [1/10/2022, 7:37:23 PM] [CameraUI] Couloir: [libx264 @ 0x55e2e05c2a40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
2022-01-10T18:37:23.056649328Z 
2022-01-10T18:37:23.059497287Z [1/10/2022, 7:37:23 PM] [CameraUI] Couloir: [libx264 @ 0x55e2e05c2a40] profile Constrained Baseline, level 3.1, 4:2:0, 8-bit
2022-01-10T18:37:23.059546941Z 
2022-01-10T18:37:23.059964477Z [1/10/2022, 7:37:23 PM] [CameraUI] Couloir: [libx264 @ 0x55e2e05c2a40] 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
2022-01-10T18:37:23.060008678Z 
2022-01-10T18:37:23.062838851Z [1/10/2022, 7:37:23 PM] [CameraUI] Couloir: Output #0, mp4, to 'tcp://127.0.0.1:28382':
2022-01-10T18:37:23.062908700Z   Metadata:
2022-01-10T18:37:23.062919283Z     major_brand     : iso5
2022-01-10T18:37:23.062926011Z     minor_version   : 512
2022-01-10T18:37:23.062932091Z     compatible_brands: iso5iso6mp41
2022-01-10T18:37:23.062937914Z     title           : Stream
2022-01-10T18:37:23.062943784Z     encoder         : Lavf58.45.100
2022-01-10T18:37:23.062949486Z     Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080, q=-1--1, 2000 kb/s, 30 fps, 15360 tbn, 30 tbc (default)
2022-01-10T18:37:23.062955769Z     Metadata:
2022-01-10T18:37:23.062961307Z       handler_name    : VideoHandler
2022-01-10T18:37:23.062966940Z       encoder         : Lavc58.91.100 libx264
2022-01-10T18:37:23.062972279Z     Side data:
2022-01-10T18:37:23.062977456Z       cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 0 vbv_delay: N/A
2022-01-10T18:37:23.062983059Z 
2022-01-10T18:37:23.769195301Z [1/10/2022, 7:37:23 PM] [CameraUI] Couloir: frame=   49 fps=0.0 q=42.0 size=       1kB time=00:00:00.03 bitrate= 188.3kbits/s dup=32 drop=0 speed=0.0652x    
2022-01-10T18:37:24.137885735Z [1/10/2022, 7:37:24 PM] [CameraUI] Couloir: frame=   61 fps= 60 q=36.0 size=       1kB time=00:00:00.43 bitrate=  14.5kbits/s dup=40 drop=0 speed=0.427x    
2022-01-10T18:37:24.749670071Z [1/10/2022, 7:37:24 PM] [CameraUI] Couloir: frame=   76 fps= 46 q=36.0 size=       1kB time=00:00:00.93 bitrate=   6.7kbits/s dup=50 drop=0 speed=0.57x    
2022-01-10T18:37:25.449046674Z [1/10/2022, 7:37:25 PM] [CameraUI] Couloir: frame=   91 fps= 42 q=36.0 size=     228kB time=00:00:01.43 bitrate=1301.2kbits/s dup=60 drop=0 speed=0.662x    
2022-01-10T18:37:25.908386877Z [1/10/2022, 7:37:25 PM] [CameraUI] Couloir: frame=  100 fps= 36 q=37.0 size=     228kB time=00:00:01.73 bitrate=1076.0kbits/s dup=66 drop=0 speed=0.63x    
2022-01-10T18:37:26.443457172Z [1/10/2022, 7:37:26 PM] [CameraUI] Couloir: frame=  118 fps= 35 q=36.0 size=     485kB time=00:00:02.33 bitrate=1701.8kbits/s dup=78 drop=0 speed=0.699x    
2022-01-10T18:37:27.047294440Z [1/10/2022, 7:37:27 PM] [CameraUI] Couloir: frame=  136 fps= 35 q=36.0 size=     694kB time=00:00:02.93 bitrate=1938.2kbits/s dup=90 drop=0 speed=0.76x    
2022-01-10T18:37:27.575450376Z [1/10/2022, 7:37:27 PM] [CameraUI] Couloir: frame=  148 fps= 34 q=36.0 size=     694kB time=00:00:03.33 bitrate=1705.6kbits/s dup=98 drop=0 speed=0.761x    
2022-01-10T18:37:28.009538447Z [1/10/2022, 7:37:28 PM] [CameraUI] Couloir: frame=  160 fps= 33 q=36.0 size=     694kB time=00:00:03.73 bitrate=1522.9kbits/s dup=106 drop=0 speed=0.76x    
2022-01-10T18:37:28.563198969Z [1/10/2022, 7:37:28 PM] [CameraUI] Couloir: frame=  175 fps= 32 q=36.0 size=    1032kB time=00:00:04.23 bitrate=1997.3kbits/s dup=116 drop=0 speed=0.779x    
2022-01-10T18:37:29.130876645Z [1/10/2022, 7:37:29 PM] [CameraUI] Couloir: frame=  190 fps= 32 q=36.0 size=    1032kB time=00:00:04.73 bitrate=1786.3kbits/s dup=126 drop=0 speed=0.791x    
2022-01-10T18:37:29.671172867Z [1/10/2022, 7:37:29 PM] [CameraUI] Couloir: frame=  205 fps= 31 q=37.0 size=    1272kB time=00:00:05.23 bitrate=1991.3kbits/s dup=136 drop=0 speed= 0.8x    
2022-01-10T18:37:30.241327237Z [1/10/2022, 7:37:30 PM] [CameraUI] Couloir: frame=  223 fps= 31 q=37.0 size=    1272kB time=00:00:05.83 bitrate=1786.5kbits/s dup=148 drop=0 speed=0.814x    
2022-01-10T18:37:30.860757721Z [1/10/2022, 7:37:30 PM] [CameraUI] Couloir: frame=  241 fps= 31 q=37.0 size=    1542kB time=00:00:06.43 bitrate=1963.1kbits/s dup=160 drop=0 speed=0.828x    
2022-01-10T18:37:31.471765615Z [1/10/2022, 7:37:31 PM] [CameraUI] Couloir: frame=  262 fps= 31 q=37.0 size=    1819kB time=00:00:07.13 bitrate=2088.4kbits/s dup=174 drop=0 speed=0.851x    
2022-01-10T18:37:32.016414016Z [1/10/2022, 7:37:32 PM] [CameraUI] Couloir: frame=  280 fps= 31 q=37.0 size=    1819kB time=00:00:07.73 bitrate=1926.4kbits/s dup=186 drop=0 speed=0.865x    
2022-01-10T18:37:32.564353615Z [1/10/2022, 7:37:32 PM] [CameraUI] Couloir: frame=  301 fps= 32 q=37.0 size=    2137kB time=00:00:08.43 bitrate=2075.6kbits/s dup=200 drop=0 speed=0.889x    
2022-01-10T18:37:33.189251607Z [1/10/2022, 7:37:33 PM] [CameraUI] Couloir: frame=  322 fps= 32 q=36.0 size=    2137kB time=00:00:09.13 bitrate=1916.5kbits/s dup=214 drop=0 speed=0.911x    
2022-01-10T18:37:33.783681732Z [1/10/2022, 7:37:33 PM] [CameraUI] Couloir: frame=  337 fps= 32 q=36.0 size=    2137kB time=00:00:09.63 bitrate=1817.0kbits/s dup=224 drop=0 speed=0.911x    
2022-01-10T18:37:34.293494641Z [1/10/2022, 7:37:34 PM] [CameraUI] Couloir: frame=  352 fps= 32 q=35.0 size=    2414kB time=00:00:10.13 bitrate=1951.4kbits/s dup=234 drop=0 speed=0.907x    
2022-01-10T18:37:34.871339369Z [1/10/2022, 7:37:34 PM] [CameraUI] Couloir: frame=  370 fps= 32 q=35.0 size=    2414kB time=00:00:10.73 bitrate=1842.3kbits/s dup=246 drop=0 speed=0.914x    
2022-01-10T18:37:35.453880217Z [1/10/2022, 7:37:35 PM] [CameraUI] Couloir: frame=  388 fps= 31 q=34.0 size=    2414kB time=00:00:11.33 bitrate=1744.8kbits/s dup=258 drop=0 speed=0.919x    
2022-01-10T18:37:35.961430850Z [1/10/2022, 7:37:35 PM] [CameraUI] Couloir: frame=  403 fps= 31 q=31.0 size=    2414kB time=00:00:11.83 bitrate=1671.0kbits/s dup=268 drop=0 speed=0.92x    
2022-01-10T18:37:36.542911987Z [1/10/2022, 7:37:36 PM] [CameraUI] Couloir: frame=  421 fps= 31 q=33.0 size=    2738kB time=00:00:12.43 bitrate=1803.9kbits/s dup=280 drop=0 speed=0.923x    
2022-01-10T18:37:37.273681800Z [1/10/2022, 7:37:37 PM] [CameraUI] Couloir: frame=  442 fps= 31 q=33.0 size=    2837kB time=00:00:13.13 bitrate=1769.8kbits/s dup=294 drop=0 speed=0.93x    
2022-01-10T18:37:37.879433799Z [1/10/2022, 7:37:37 PM] [CameraUI] Couloir: frame=  454 fps= 31 q=34.0 size=    2837kB time=00:00:13.53 bitrate=1717.5kbits/s dup=302 drop=0 speed=0.925x    
2022-01-10T18:37:38.372674861Z [1/10/2022, 7:37:38 PM] [CameraUI] Couloir: frame=  469 fps= 31 q=34.0 size=    3224kB time=00:00:14.03 bitrate=1882.1kbits/s dup=312 drop=0 speed=0.92x    
2022-01-10T18:37:39.074044539Z [1/10/2022, 7:37:39 PM] [CameraUI] Couloir: frame=  484 fps= 30 q=35.0 size=    3224kB time=00:00:14.53 bitrate=1817.4kbits/s dup=322 drop=0 speed=0.914x    
2022-01-10T18:37:39.561203239Z [1/10/2022, 7:37:39 PM] [CameraUI] Couloir: frame=  499 fps= 30 q=35.0 size=    3550kB time=00:00:15.03 bitrate=1934.3kbits/s dup=332 drop=0 speed=0.914x    
2022-01-10T18:37:40.171717284Z [1/10/2022, 7:37:40 PM] [CameraUI] Couloir: frame=  517 fps= 30 q=35.0 size=    3550kB time=00:00:15.63 bitrate=1860.0kbits/s dup=344 drop=0 speed=0.92x    
2022-01-10T18:37:40.821255545Z [1/10/2022, 7:37:40 PM] [CameraUI] Couloir: frame=  532 fps= 30 q=36.0 size=    4016kB time=00:00:16.13 bitrate=2039.4kbits/s dup=354 drop=0 speed=0.917x    
2022-01-10T18:37:41.282934647Z [1/10/2022, 7:37:41 PM] [CameraUI] Couloir: frame=  544 fps= 30 q=35.0 size=    4016kB time=00:00:16.53 bitrate=1990.1kbits/s dup=362 drop=0 speed=0.912x    
2022-01-10T18:37:41.756913541Z [1/10/2022, 7:37:41 PM] [CameraUI] Couloir: frame=  559 fps= 30 q=35.0 size=    4016kB time=00:00:17.03 bitrate=1931.6kbits/s dup=372 drop=0 speed=0.913x    
2022-01-10T18:37:42.381849961Z [1/10/2022, 7:37:42 PM] [CameraUI] Couloir: frame=  577 fps= 30 q=35.0 size=    4255kB time=00:00:17.63 bitrate=1976.5kbits/s dup=384 drop=0 speed=0.916x    
2022-01-10T18:37:42.878013973Z [1/10/2022, 7:37:42 PM] [CameraUI] Couloir: frame=  592 fps= 30 q=35.0 size=    4507kB time=00:00:18.13 bitrate=2036.1kbits/s dup=394 drop=0 speed=0.916x    
2022-01-10T18:37:43.499201391Z [1/10/2022, 7:37:43 PM] [CameraUI] Couloir: frame=  607 fps= 30 q=35.0 size=    4507kB time=00:00:18.63 bitrate=1981.5kbits/s dup=404 drop=0 speed=0.916x    
2022-01-10T18:37:44.104771692Z [1/10/2022, 7:37:44 PM] [CameraUI] Couloir: frame=  622 fps= 30 q=36.0 size=    4755kB time=00:00:19.13 bitrate=2035.9kbits/s dup=414 drop=0 speed=0.917x    
2022-01-10T18:37:44.557499575Z [1/10/2022, 7:37:44 PM] [CameraUI] Couloir: frame=  634 fps= 30 q=36.0 size=    4755kB time=00:00:19.53 bitrate=1994.3kbits/s dup=422 drop=0 speed=0.913x    
2022-01-10T18:37:45.187780619Z [1/10/2022, 7:37:45 PM] [CameraUI] Couloir: frame=  652 fps= 30 q=36.0 size=    5101kB time=00:00:20.13 bitrate=2075.5kbits/s dup=434 drop=0 speed=0.912x    
2022-01-10T18:37:45.726312945Z [1/10/2022, 7:37:45 PM] [CameraUI] Couloir: frame=  664 fps= 29 q=36.0 size=    5101kB time=00:00:20.53 bitrate=2035.0kbits/s dup=442 drop=0 speed=0.909x    
2022-01-10T18:37:46.309473894Z [1/10/2022, 7:37:46 PM] [CameraUI] Couloir: frame=  679 fps= 29 q=36.0 size=    5101kB time=00:00:21.03 bitrate=1986.6kbits/s dup=452 drop=0 speed=0.908x    
2022-01-10T18:37:46.826897837Z [1/10/2022, 7:37:46 PM] [CameraUI] Couloir: frame=  694 fps= 29 q=36.0 size=    5375kB time=00:00:21.53 bitrate=2044.9kbits/s dup=462 drop=0 speed=0.909x    
2022-01-10T18:37:47.451236870Z [1/10/2022, 7:37:47 PM] [CameraUI] Couloir: frame=  709 fps= 29 q=36.0 size=    5375kB time=00:00:22.03 bitrate=1998.5kbits/s dup=472 drop=0 speed=0.907x    
2022-01-10T18:37:47.950466156Z [1/10/2022, 7:37:47 PM] [CameraUI] Couloir: frame=  724 fps= 29 q=36.0 size=    5704kB time=00:00:22.53 bitrate=2073.8kbits/s dup=482 drop=0 speed=0.906x    
2022-01-10T18:37:48.597602719Z [1/10/2022, 7:37:48 PM] [CameraUI] Couloir: frame=  742 fps= 29 q=36.0 size=    5704kB time=00:00:23.13 bitrate=2020.0kbits/s dup=494 drop=0 speed=0.908x    
2022-01-10T18:37:49.146745320Z [1/10/2022, 7:37:49 PM] [CameraUI] Couloir: frame=  757 fps= 29 q=36.0 size=    5704kB time=00:00:23.63 bitrate=1977.3kbits/s dup=504 drop=0 speed=0.908x    
2022-01-10T18:37:49.752139086Z [1/10/2022, 7:37:49 PM] [CameraUI] Couloir: frame=  772 fps= 29 q=36.0 size=    6119kB time=00:00:24.13 bitrate=2077.2kbits/s dup=514 drop=0 speed=0.907x    
2022-01-10T18:37:50.276671565Z [1/10/2022, 7:37:50 PM] [CameraUI] Couloir: frame=  787 fps= 29 q=36.0 size=    6119kB time=00:00:24.63 bitrate=2035.0kbits/s dup=524 drop=0 speed=0.907x    
2022-01-10T18:37:50.901893885Z [1/10/2022, 7:37:50 PM] [CameraUI] Couloir: frame=  805 fps= 29 q=36.0 size=    6330kB time=00:00:25.23 bitrate=2055.1kbits/s dup=536 drop=0 speed=0.91x    
2022-01-10T18:37:51.406972899Z [1/10/2022, 7:37:51 PM] [CameraUI] Couloir: frame=  820 fps= 29 q=36.0 size=    6330kB time=00:00:25.73 bitrate=2015.2kbits/s dup=546 drop=0 speed=0.909x    
2022-01-10T18:37:52.028891417Z [1/10/2022, 7:37:52 PM] [CameraUI] Couloir: frame=  838 fps= 29 q=36.0 size=    6557kB time=00:00:26.33 bitrate=2039.8kbits/s dup=558 drop=0 speed=0.912x    
2022-01-10T18:37:52.481365220Z [1/10/2022, 7:37:52 PM] [CameraUI] Couloir: frame=  853 fps= 29 q=36.0 size=    6838kB time=00:00:26.83 bitrate=2087.7kbits/s dup=568 drop=0 speed=0.913x    
2022-01-10T18:37:53.062890469Z [1/10/2022, 7:37:53 PM] [CameraUI] Couloir: frame=  868 fps= 29 q=36.0 size=    6838kB time=00:00:27.33 bitrate=2049.5kbits/s dup=578 drop=0 speed=0.913x    
2022-01-10T18:37:53.610276665Z [1/10/2022, 7:37:53 PM] [CameraUI] Couloir: frame=  886 fps= 29 q=37.0 size=    7088kB time=00:00:27.93 bitrate=2078.8kbits/s dup=590 drop=0 speed=0.916x    
2022-01-10T18:37:54.093985295Z [1/10/2022, 7:37:54 PM] [CameraUI] Couloir: frame=  901 fps= 29 q=36.0 size=    7201kB time=00:00:28.43 bitrate=2074.7kbits/s dup=600 drop=0 speed=0.917x    
2022-01-10T18:37:54.821282320Z [1/10/2022, 7:37:54 PM] [CameraUI] Couloir: frame=  919 fps= 29 q=37.0 size=    7201kB time=00:00:29.03 bitrate=2031.9kbits/s dup=612 drop=0 speed=0.917x    
2022-01-10T18:37:55.316181881Z [1/10/2022, 7:37:55 PM] [CameraUI] Couloir: frame=  934 fps= 29 q=37.0 size=    7472kB time=00:00:29.53 bitrate=2072.5kbits/s dup=622 drop=0 speed=0.916x    
2022-01-10T18:37:55.943349473Z [1/10/2022, 7:37:55 PM] [CameraUI] Couloir: frame=  952 fps= 29 q=37.0 size=    7713kB time=00:00:30.13 bitrate=2096.7kbits/s dup=634 drop=0 speed=0.919x    
2022-01-10T18:37:56.599453922Z [1/10/2022, 7:37:56 PM] [CameraUI] Couloir: frame=  970 fps= 29 q=37.0 size=    7713kB time=00:00:30.73 bitrate=2055.8kbits/s dup=646 drop=0 speed=0.92x    
2022-01-10T18:37:57.073570084Z [1/10/2022, 7:37:57 PM] [CameraUI] Couloir: frame=  985 fps= 29 q=36.0 size=    7713kB time=00:00:31.23 bitrate=2022.9kbits/s dup=656 drop=0 speed=0.919x    
2022-01-10T18:37:57.621047384Z [1/10/2022, 7:37:57 PM] [CameraUI] Couloir: frame= 1003 fps= 29 q=34.0 size=    7984kB time=00:00:31.83 bitrate=2054.7kbits/s dup=668 drop=0 speed=0.922x    
2022-01-10T18:37:58.274817267Z [1/10/2022, 7:37:58 PM] [CameraUI] Couloir: frame= 1021 fps= 29 q=36.0 size=    8167kB time=00:00:32.43 bitrate=2062.8kbits/s dup=680 drop=0 speed=0.923x    
2022-01-10T18:37:58.893986609Z [1/10/2022, 7:37:58 PM] [CameraUI] Couloir: frame= 1039 fps= 29 q=37.0 size=    8398kB time=00:00:33.03 bitrate=2082.5kbits/s dup=692 drop=0 speed=0.925x    
2022-01-10T18:37:59.403376050Z [1/10/2022, 7:37:59 PM] [CameraUI] Couloir: frame= 1054 fps= 29 q=37.0 size=    8398kB time=00:00:33.53 bitrate=2051.5kbits/s dup=702 drop=0 speed=0.923x    
2022-01-10T18:37:59.969222646Z [1/10/2022, 7:37:59 PM] [CameraUI] Couloir: frame= 1072 fps= 29 q=37.0 size=    8640kB time=00:00:34.13 bitrate=2073.7kbits/s dup=714 drop=0 speed=0.926x    
2022-01-10T18:38:00.557503577Z [1/10/2022, 7:38:00 PM] [CameraUI] Couloir: frame= 1087 fps= 29 q=37.0 size=    8640kB time=00:00:34.63 bitrate=2043.8kbits/s dup=724 drop=0 speed=0.926x    
2022-01-10T18:38:01.084720881Z [1/10/2022, 7:38:01 PM] [CameraUI] Couloir: frame= 1102 fps= 29 q=37.0 size=    8881kB time=00:00:35.13 bitrate=2070.8kbits/s dup=734 drop=0 speed=0.925x    
2022-01-10T18:38:01.704561789Z [1/10/2022, 7:38:01 PM] [CameraUI] Couloir: frame= 1120 fps= 29 q=37.0 size=    9103kB time=00:00:35.73 bitrate=2087.0kbits/s dup=746 drop=0 speed=0.926x    
2022-01-10T18:38:02.277730931Z [1/10/2022, 7:38:02 PM] [CameraUI] Couloir: frame= 1132 fps= 29 q=37.0 size=    9212kB time=00:00:36.13 bitrate=2088.6kbits/s dup=754 drop=0 speed=0.924x    
2022-01-10T18:38:02.737264853Z [1/10/2022, 7:38:02 PM] [CameraUI] Couloir: frame= 1147 fps= 29 q=37.0 size=    9212kB time=00:00:36.63 bitrate=2060.1kbits/s dup=764 drop=0 speed=0.924x    
2022-01-10T18:38:03.329846769Z [1/10/2022, 7:38:03 PM] [CameraUI] Couloir: frame= 1165 fps= 29 q=37.0 size=    9414kB time=00:00:37.23 bitrate=2071.2kbits/s dup=776 drop=0 speed=0.926x    
2022-01-10T18:38:03.854553734Z [1/10/2022, 7:38:03 PM] [CameraUI] Couloir: frame= 1180 fps= 29 q=37.0 size=    9414kB time=00:00:37.73 bitrate=2043.8kbits/s dup=786 drop=0 speed=0.926x    
2022-01-10T18:38:04.385752218Z [1/10/2022, 7:38:04 PM] [CameraUI] Couloir: frame= 1195 fps= 29 q=37.0 size=    9658kB time=00:00:38.23 bitrate=2069.3kbits/s dup=796 drop=0 speed=0.927x    
2022-01-10T18:38:04.941157829Z [1/10/2022, 7:38:04 PM] [CameraUI] Couloir: frame= 1213 fps= 29 q=37.0 size=    9862kB time=00:00:38.83 bitrate=2080.5kbits/s dup=808 drop=0 speed=0.928x    
2022-01-10T18:38:05.592020080Z [1/10/2022, 7:38:05 PM] [CameraUI] Couloir: frame= 1228 fps= 29 q=36.0 size=    9862kB time=00:00:39.33 bitrate=2054.0kbits/s dup=818 drop=0 speed=0.927x    
2022-01-10T18:38:06.169513140Z [1/10/2022, 7:38:06 PM] [CameraUI] Couloir: frame= 1246 fps= 29 q=37.0 size=   10069kB time=00:00:39.93 bitrate=2065.5kbits/s dup=830 drop=0 speed=0.928x    
2022-01-10T18:38:06.781586069Z [1/10/2022, 7:38:06 PM] [CameraUI] Couloir: frame= 1264 fps= 29 q=37.0 size=   10179kB time=00:00:40.53 bitrate=2057.3kbits/s dup=842 drop=0 speed=0.929x    
2022-01-10T18:38:07.287205946Z [1/10/2022, 7:38:07 PM] [CameraUI] Couloir: frame= 1276 fps= 29 q=36.0 size=   10179kB time=00:00:40.93 bitrate=2037.2kbits/s dup=850 drop=0 speed=0.927x    
2022-01-10T18:38:07.862420351Z [1/10/2022, 7:38:07 PM] [CameraUI] Couloir: frame= 1294 fps= 29 q=36.0 size=   10440kB time=00:00:41.53 bitrate=2059.1kbits/s dup=862 drop=0 speed=0.928x    
2022-01-10T18:38:08.403655637Z [1/10/2022, 7:38:08 PM] [CameraUI] Couloir: frame= 1306 fps= 29 q=36.0 size=   10440kB time=00:00:41.93 bitrate=2039.5kbits/s dup=870 drop=0 speed=0.926x    
2022-01-10T18:38:08.897297431Z [1/10/2022, 7:38:08 PM] [CameraUI] Couloir: frame= 1321 fps= 29 q=36.0 size=   10647kB time=00:00:42.43 bitrate=2055.4kbits/s dup=880 drop=0 speed=0.926x    
2022-01-10T18:38:09.444557998Z [1/10/2022, 7:38:09 PM] [CameraUI] Couloir: frame= 1333 fps= 29 q=36.0 size=   10647kB time=00:00:42.83 bitrate=2036.2kbits/s dup=888 drop=0 speed=0.925x    
2022-01-10T18:38:10.024103437Z [1/10/2022, 7:38:10 PM] [CameraUI] Couloir: frame= 1351 fps= 29 q=36.0 size=   10897kB time=00:00:43.43 bitrate=2055.3kbits/s dup=900 drop=0 speed=0.926x    
2022-01-10T18:38:10.560563088Z [1/10/2022, 7:38:10 PM] [CameraUI] Couloir: frame= 1366 fps= 29 q=37.0 size=   10897kB time=00:00:43.93 bitrate=2031.9kbits/s dup=910 drop=0 speed=0.926x    
2022-01-10T18:38:11.057519258Z [1/10/2022, 7:38:11 PM] [CameraUI] Couloir: frame= 1381 fps= 29 q=37.0 size=   11198kB time=00:00:44.43 bitrate=2064.5kbits/s dup=920 drop=0 speed=0.926x    
2022-01-10T18:38:11.647887544Z [1/10/2022, 7:38:11 PM] [CameraUI] Couloir: frame= 1399 fps= 29 q=37.0 size=   11380kB time=00:00:45.03 bitrate=2070.2kbits/s dup=932 drop=0 speed=0.927x    
2022-01-10T18:38:12.229959232Z [1/10/2022, 7:38:12 PM] [CameraUI] Couloir: frame= 1411 fps= 29 q=36.0 size=   11380kB time=00:00:45.43 bitrate=2051.9kbits/s dup=940 drop=0 speed=0.925x    
2022-01-10T18:38:12.808147010Z [1/10/2022, 7:38:12 PM] [CameraUI] Couloir: frame= 1429 fps= 29 q=36.0 size=   11380kB time=00:00:46.03 bitrate=2025.2kbits/s dup=952 drop=0 speed=0.926x    
2022-01-10T18:38:13.372729542Z [1/10/2022, 7:38:13 PM] [CameraUI] Couloir: frame= 1447 fps= 29 q=36.0 size=   11672kB time=00:00:46.63 bitrate=2050.4kbits/s dup=964 drop=0 speed=0.927x    
2022-01-10T18:38:13.962872293Z [1/10/2022, 7:38:13 PM] [CameraUI] Couloir: frame= 1465 fps= 29 q=36.0 size=   11672kB time=00:00:47.23 bitrate=2024.3kbits/s dup=976 drop=0 speed=0.928x    
2022-01-10T18:38:14.690007170Z [1/10/2022, 7:38:14 PM] [CameraUI] Couloir: frame= 1483 fps= 29 q=33.0 size=   11899kB time=00:00:47.83 bitrate=2037.9kbits/s dup=988 drop=0 speed=0.927x    
2022-01-10T18:38:15.427518168Z [1/10/2022, 7:38:15 PM] [CameraUI] Couloir: frame= 1501 fps= 29 q=36.0 size=   12074kB time=00:00:48.43 bitrate=2042.2kbits/s dup=1000 drop=0 speed=0.928x    
2022-01-10T18:38:15.437069457Z [1/10/2022, 7:38:15 PM] [CameraUI] Couloir: More than 1000 frames duplicated
2022-01-10T18:38:15.437104150Z 
2022-01-10T18:38:15.845397793Z [1/10/2022, 7:38:15 PM] [CameraUI] Couloir: frame= 1513 fps= 29 q=36.0 size=   12074kB time=00:00:48.83 bitrate=2025.5kbits/s dup=1008 drop=0 speed=0.926x    
2022-01-10T18:38:16.453195221Z [1/10/2022, 7:38:16 PM] [CameraUI] Couloir: frame= 1531 fps= 29 q=36.0 size=   12277kB time=00:00:49.43 bitrate=2034.5kbits/s dup=1020 drop=0 speed=0.927x    
2022-01-10T18:38:17.224043169Z [1/10/2022, 7:38:17 PM] [CameraUI] Couloir: frame= 1549 fps= 29 q=36.0 size=   12491kB time=00:00:50.03 bitrate=2045.2kbits/s dup=1032 drop=0 speed=0.927x    
2022-01-10T18:38:17.629518765Z [1/10/2022, 7:38:17 PM] [CameraUI] Couloir: frame= 1561 fps= 29 q=36.0 size=   12491kB time=00:00:50.43 bitrate=2029.0kbits/s dup=1040 drop=0 speed=0.925x    
2022-01-10T18:38:18.104705561Z [1/10/2022, 7:38:18 PM] [CameraUI] Couloir: frame= 1570 fps= 29 q=36.0 size=   12708kB time=00:00:50.73 bitrate=2052.0kbits/s dup=1046 drop=0 speed=0.922x    
2022-01-10T18:38:18.895249075Z [1/10/2022, 7:38:18 PM] [CameraUI] Couloir: frame= 1585 fps= 29 q=36.0 size=   12708kB time=00:00:51.23 bitrate=2032.0kbits/s dup=1056 drop=0 speed=0.921x    
2022-01-10T18:38:19.262713083Z [1/10/2022, 7:38:19 PM] [CameraUI] Couloir: frame= 1597 fps= 28 q=36.0 size=   12708kB time=00:00:51.63 bitrate=2016.2kbits/s dup=1064 drop=0 speed=0.92x    
2022-01-10T18:38:19.885828880Z [1/10/2022, 7:38:19 PM] [CameraUI] Couloir: frame= 1612 fps= 28 q=36.0 size=   13096kB time=00:00:52.13 bitrate=2057.8kbits/s dup=1074 drop=0 speed=0.92x    
2022-01-10T18:38:20.323231240Z [1/10/2022, 7:38:20 PM] [CameraUI] Couloir: frame= 1624 fps= 28 q=36.0 size=   13096kB time=00:00:52.53 bitrate=2042.2kbits/s dup=1082 drop=0 speed=0.919x    
2022-01-10T18:38:21.050990863Z [1/10/2022, 7:38:21 PM] [CameraUI] Couloir: frame= 1642 fps= 28 q=36.0 size=   13290kB time=00:00:53.13 bitrate=2049.0kbits/s dup=1094 drop=0 speed=0.918x    
2022-01-10T18:38:21.466950581Z [1/10/2022, 7:38:21 PM] [CameraUI] Couloir: frame= 1654 fps= 28 q=36.0 size=   13290kB time=00:00:53.53 bitrate=2033.7kbits/s dup=1102 drop=0 speed=0.917x    
2022-01-10T18:38:22.209527408Z [1/10/2022, 7:38:22 PM] [CameraUI] Couloir: frame= 1672 fps= 28 q=36.0 size=   13537kB time=00:00:54.13 bitrate=2048.6kbits/s dup=1114 drop=0 speed=0.918x    
2022-01-10T18:38:22.637586434Z [1/10/2022, 7:38:22 PM] [CameraUI] Couloir: frame= 1684 fps= 28 q=36.0 size=   13537kB time=00:00:54.53 bitrate=2033.6kbits/s dup=1122 drop=0 speed=0.917x    
2022-01-10T18:38:22.637630373Z [1/10/2022, 7:38:22 PM] [CameraUI] Couloir: Motion handler timeout.
2022-01-10T18:38:22.793410309Z [1/10/2022, 7:38:22 PM] [CameraUI] Couloir: Ending recording session in 3s
2022-01-10T18:38:23.234248371Z [1/10/2022, 7:38:23 PM] [CameraUI] Couloir: frame= 1702 fps= 28 q=36.0 size=   13748kB time=00:00:55.13 bitrate=2042.8kbits/s dup=1134 drop=0 speed=0.918x    
2022-01-10T18:38:23.768299015Z [1/10/2022, 7:38:23 PM] [CameraUI] Couloir: frame= 1717 fps= 28 q=36.0 size=   13958kB time=00:00:55.63 bitrate=2055.4kbits/s dup=1144 drop=0 speed=0.917x    
2022-01-10T18:38:24.415634401Z [1/10/2022, 7:38:24 PM] [CameraUI] Couloir: frame= 1732 fps= 28 q=36.0 size=   14091kB time=00:00:56.13 bitrate=2056.4kbits/s dup=1154 drop=0 speed=0.916x    
2022-01-10T18:38:24.919750119Z [1/10/2022, 7:38:24 PM] [CameraUI] Couloir: frame= 1747 fps= 28 q=36.0 size=   14091kB time=00:00:56.63 bitrate=2038.2kbits/s dup=1164 drop=0 speed=0.916x    
2022-01-10T18:38:25.488064078Z [1/10/2022, 7:38:25 PM] [CameraUI] Couloir: frame= 1762 fps= 28 q=36.0 size=   14285kB time=00:00:57.13 bitrate=2048.3kbits/s dup=1174 drop=0 speed=0.916x    
2022-01-10T18:38:26.086731683Z [1/10/2022, 7:38:26 PM] [CameraUI] Couloir: frame= 1777 fps= 28 q=36.0 size=   14285kB time=00:00:57.63 bitrate=2030.5kbits/s dup=1184 drop=0 speed=0.916x    
2022-01-10T18:38:26.216638436Z [1/10/2022, 7:38:26 PM] [CameraUI] Couloir: Recording completed (HSV)
2022-01-10T18:38:26.229896144Z [1/10/2022, 7:38:26 PM] [CameraUI] Couloir: New custom alert
2022-01-10T18:38:26.256187079Z [1/10/2022, 7:38:26 PM] [CameraUI] Couloir: Notifications not enabled, skip Webhook..
2022-01-10T18:38:26.257655036Z [1/10/2022, 7:38:26 PM] [CameraUI] Couloir: Notifications not enabled, skip Alexa..
2022-01-10T18:38:26.258727072Z [1/10/2022, 7:38:26 PM] [CameraUI] Couloir: Recording not enabled, skip recording..
2022-01-10T18:38:26.259866367Z [1/10/2022, 7:38:26 PM] [CameraUI] Couloir: Notifications not enabled, skip Webpush..
2022-01-10T18:38:26.260407726Z [1/10/2022, 7:38:26 PM] [CameraUI] Couloir: Recording skipped. Notification skipped.
2022-01-10T18:38:26.265250838Z [1/10/2022, 7:38:26 PM] [CameraUI] Couloir: Closing recording process
2022-01-10T18:38:26.284625944Z [1/10/2022, 7:38:26 PM] [CameraUI] Couloir: Prebuffer request ended
2022-01-10T18:38:26.288092698Z [1/10/2022, 7:38:26 PM] [CameraUI] Couloir: FFmpeg recording process exited (expected)
seydx commented 2 years ago

@macjl try with following config

{
  "name": "Couloir",
  "motion": true,
  "doorbell": false,
  "motionTimeout": 60,
  "unbridge": true,
  "hsv": true,
  "prebuffering": true,
  "forcePrebuffering": false,
  "prebufferLength": 6,
  "videoConfig": {
    "source": "-i rtsp://localhost:8554/live/usbcam.stream",
    "acodec": "libfdk_aac",
    "vcodec": "copy",
    "audio": true,
    "debug": true
  },
  "videoanalysis": {
    "active": true
  }
}

EDIT2:

"acodec": "libfdk_aac" should work

macjl commented 2 years ago

Hello,

No more luck with : "acodec": "libfdk_aac"

2022-01-10T19:52:40.712598462Z [1/10/2022, 8:52:40 PM] [CameraUI] Couloir: Motion detected via Videoanalysis: [{"name":"all","diffs":33111,"total":90000,"percent":36.790000915527344}]
2022-01-10T19:52:40.714415152Z [1/10/2022, 8:52:40 PM] [CameraUI] Couloir: Motion ON
2022-01-10T19:52:40.715647043Z [1/10/2022, 8:52:40 PM] [CameraUI] Couloir: Handling event: Motion switched on
2022-01-10T19:52:40.716122435Z [1/10/2022, 8:52:40 PM] [CameraUI] Received a new VIDEOANALYSIS message {"error":false,"message":"Handled through extern controller"} (Couloir)
2022-01-10T19:52:40.820756035Z [1/10/2022, 8:52:40 PM] [CameraUI] Couloir: Video fragments requested from HSV
2022-01-10T19:52:40.821331003Z [1/10/2022, 8:52:40 PM] [CameraUI] Couloir: Setting prebuffer stream as input
2022-01-10T19:52:40.821678915Z [1/10/2022, 8:52:40 PM] [CameraUI] Couloir: Prebuffer requested with a duration of -6s
2022-01-10T19:52:40.822378891Z [1/10/2022, 8:52:40 PM] [CameraUI] Compatible audio stream detected, copying..
2022-01-10T19:52:40.822986945Z [1/10/2022, 8:52:40 PM] [CameraUI] Couloir: Start recording...
2022-01-10T19:52:40.823623117Z [1/10/2022, 8:52:40 PM] [CameraUI] Couloir: Recording command: ffmpeg -hide_banner -analyzeduration 0 -probesize 3099917 -f mp4 -i tcp://127.0.0.1:26850 -f mp4 -vcodec copy -bsf:a aac_adtstoasc -acodec copy -movflags frag_keyframe+empty_moov+default_base_moof -max_muxing_queue_size 1024 tcp://127.0.0.1:39522
2022-01-10T19:52:40.913767936Z [1/10/2022, 8:52:40 PM] [CameraUI] Couloir: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tcp://127.0.0.1:26850':
2022-01-10T19:52:40.913802642Z   Metadata:
2022-01-10T19:52:40.913810518Z     major_brand     : iso5
2022-01-10T19:52:40.913816693Z     minor_version   : 512
2022-01-10T19:52:40.913822577Z     compatible_brands: iso5iso6mp41
2022-01-10T19:52:40.913828435Z     title           : Stream
2022-01-10T19:52:40.913834239Z     encoder         : Lavf58.45.100
2022-01-10T19:52:40.913840001Z   Duration: 00:00:23.44, start: 18.400000, bitrate: N/A
2022-01-10T19:52:40.913845534Z     Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 1038 kb/s, 10 fps, 10 tbr, 10240 tbn, 20 tbc (default)
2022-01-10T19:52:40.913851184Z     Metadata:
2022-01-10T19:52:40.913856896Z       handler_name    : VideoHandler
2022-01-10T19:52:40.913862813Z 
2022-01-10T19:52:40.914492308Z [1/10/2022, 8:52:40 PM] [CameraUI] Couloir:     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 20 kb/s (default)
2022-01-10T19:52:40.914534585Z     Metadata:
2022-01-10T19:52:40.914543571Z       handler_name    : SoundHandler
2022-01-10T19:52:40.914549435Z Output #0, mp4, to 'tcp://127.0.0.1:39522':
2022-01-10T19:52:40.914555136Z   Metadata:
2022-01-10T19:52:40.914571884Z     major_brand     : iso5
2022-01-10T19:52:40.914578357Z     minor_version   : 512
2022-01-10T19:52:40.914583603Z     compatible_brands: iso5iso6mp41
2022-01-10T19:52:40.914589593Z     title           : Stream
2022-01-10T19:52:40.914595068Z     encoder         : Lavf58.45.100
2022-01-10T19:52:40.914605573Z     Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, q=2-31, 1038 kb/s, 10 fps, 10 tbr, 10240 tbn, 10240 tbc (default)
2022-01-10T19:52:40.914612433Z     Metadata:
2022-01-10T19:52:40.914618176Z       handler_name    : VideoHandler
2022-01-10T19:52:40.914623900Z     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 20 kb/s (default)
2022-01-10T19:52:40.914630298Z     Metadata:
2022-01-10T19:52:40.914636294Z       handler_name    : SoundHandler
2022-01-10T19:52:40.914642016Z Stream mapping:
2022-01-10T19:52:40.914647772Z   Stream #0:0 -> #0:0 (copy)
2022-01-10T19:52:40.914653955Z   Stream #0:1 -> #0:1 (copy)
2022-01-10T19:52:40.914659473Z Press [q] to stop, [?] for help
2022-01-10T19:52:40.914666100Z 
2022-01-10T19:52:40.915683674Z [1/10/2022, 8:52:40 PM] [CameraUI] Couloir: Recording started
2022-01-10T19:52:43.806515508Z [1/10/2022, 8:52:43 PM] [CameraUI] Couloir: frame=   52 fps= 18 q=-1.0 size=       1kB time=00:00:05.10 bitrate=   1.9kbits/s speed=1.77x    
2022-01-10T19:52:43.982558472Z [1/10/2022, 8:52:43 PM] [CameraUI] Couloir: Closing recording process
2022-01-10T19:52:43.983041097Z [1/10/2022, 8:52:43 PM] [CameraUI] Resetting motion state because HSV closed recording with reason "5"
2022-01-10T19:52:43.984055322Z [1/10/2022, 8:52:43 PM] [CameraUI] Couloir: FFMPEG socket closed during read for 8 bytes!
2022-01-10T19:52:43.984420860Z [1/10/2022, 8:52:43 PM] [CameraUI] Couloir: Skip saving the recording, the file might be corrupted because the recording process was cancelled by HSV
2022-01-10T19:52:43.997342444Z [1/10/2022, 8:52:43 PM] [CameraUI] Couloir: Prebuffer request ended
2022-01-10T19:52:43.997380153Z [1/10/2022, 8:52:43 PM] [CameraUI] Couloir: FFmpeg recording process exited (expected)

EDIT :

The 'Prebuffer' process doesn't seems to use this parameter :

pi 25891 24791 2 20:52 ? 00:00:02 ffmpeg -hide_banner -loglevel error -fflags +genpts -i rtsp://localhost:8554/live/usbcam.stream -vcodec copy -bsf:a aac_adtstoasc -acodec copy -f tee -map 0:v? -map 0:a? [movflags=frag_keyframe+empty_moov+default_base_moof:f=mp4]tcp://127.0.0.1:36678|[f=mpegts]tcp://127.0.0.1:13558

seydx commented 2 years ago

Ah yeah camera.ui auto apply "acodec": "copy" because it has recognized a compatible audio stream during probe.

Will fix it in the next version

macjl commented 2 years ago

The stream is build by myself in a separate process, to accelerate the launch. Maybe I can fix it in this process ?

Here is the ffmpeg command I use to present the camera to camera.ui, with an internal rtsp server for that purpose :

ffmpeg -thread_queue_size 512 -fflags +genpts -f v4l2 -framerate 10 -video_size 1280x720 -i /dev/video0 -thread_queue_size 512 -fflags +genpts -f alsa -ac 1 -ar 44100 -i default:CARD=C615 -map 0:v -map 1:a -codec:v libx264 -preset:v ultrafast -vf format=yuv420p -r 10 -g 50 -b:v 4882k -bufsize 9764k -codec:a libfdk_aac -b:a 0k -shortest -movflags frag_keyframe+empty_moov+default_base_moof -f rtsp rtsp://rtsp:8554/live/usbcam.stream

seydx commented 2 years ago

@macjl

can u try v5.0.0-beta.64 pls with "acodec": "libfdk_aac"

macjl commented 2 years ago

It worked ! Thank you 👍

seydx commented 2 years ago

v5.0.0 is online

iuliusmaximilian commented 2 years ago

@seydx Homebridge UI shows the latest version for to download as "homebridge-camera-ui v5.0.7 (2022-01-15)" ?

iuliusmaximilian commented 2 years ago

I tried to move to this homebridge-camera-ui for HSV and updated homebridge to 1.4 b4. Unfortunately, my Reolinks do not work but they do well in homebrige-camera-ffmpeg. I tested both configs that work there but not with homebridge-camera-ui and HSV:

"source": "-re -i rtsp://USER:PW@IP:554/h264Preview_01_sub",
"source": "-i rtmp://IP/bcs/channel0_ext.bcs?channel=0&stream=2&user=USER&password=PASSWORD -map 0 -an -dn -flags -global_header",

What works partly is:

       "cameras": [
                {
                    "name": "CAM-1",
                    "motion": true,
                    "switches": true,
                    "unbridge": true,
                    "hsv": true,
                    "prebufferLength": 4,
                    "videoConfig": {
                        "source": "-rtsp_transport tcp -i rtsp://USER:PASSWORD@IP:554/h264Preview_01_sub",
                        "stillImageSource": "",
                        "maxStreams": 2,
                        "maxWidth": 1280,
                        "maxHeight": 720,
                        "maxFPS": 30
                    },
                    "videoanalysis": {
                        "active": true
                    }
                }
            ],
            "platform": "CameraUI"

However, starting the stream in Home shows it for some seconds and then aborts - any idea what I can adjust ?

[15.1.2022, 09:52:55] Homebridge v1.4.0-beta.4 (HAP v0.10.0-beta.7) (Homebridge CF82) is running on port 51325.
[15.1.2022, 09:52:55] [CameraUI] CAM-1: Setting up camera, please be patient...
[15.1.2022, 09:53:10] [CameraUI] CAM-1: Videoanalysis scheduled for restart at 4AM: 1087 minutes
[15.1.2022, 09:53:12] [CameraUI] CAM-1: Configuring unbridged accessory...
[15.1.2022, 09:53:12] [CameraUI] CAM-1: Setting up accessory...
[15.1.2022, 09:53:12] [CameraUI] camera.ui v5.0.7 is listening on port 8081 (http)
[15.1.2022, 09:53:12] CAM-1 5463 is running on port 44851.
[15.1.2022, 09:53:12] Please add [CAM-1 5463] manually in Home app. Setup Code: 537-29-343
[15.1.2022, 09:54:11] [CameraUI] CAM-1: Starting video stream: 1280x720, 30 fps, 299 kbps 
[15.1.2022, 09:54:16] [CameraUI] CAM-1: Getting the first frames took 5.012 seconds.
[15.1.2022, 09:54:18] [CameraUI] CAM-1: Stopped video stream.
[15.1.2022, 09:56:07] [CameraUI] CAM-1: Starting video stream: 1280x720, 30 fps, 299 kbps 
[15.1.2022, 09:56:12] [CameraUI] CAM-1: Getting the first frames took 5.654 seconds.
[15.1.2022, 09:56:21] [CameraUI] CAM-1: Watchdog for videoanalysis timed out... killing ffmpeg session
[15.1.2022, 09:56:21] [CameraUI] CAM-1: Restart videoanalysis session..
[15.1.2022, 09:56:27] [CameraUI] CAM-1: Stopped video stream.
[15.1.2022, 09:56:31] [CameraUI] CAM-1: Videoanalysis scheduled for restart at 4AM: 1083 minutes
iuliusmaximilian commented 2 years ago

Finally it works! My config:

       "cameras": [
            {
                "name": "CAM-01",
                "motion": true,
                "switches": true,
                "unbridge": true,
                "hsv": true,
                "prebuffering": true,
                "prebufferLength": 4,
                "videoConfig": {
                    "source": "-rtsp_transport tcp -i rtsp://USER:PASSWORD@IP:554//h264Preview_01_sub",
                    "subSource": "-rtsp_transport tcp -i rtsp://USER:PASSWORD@IP:554//h264Preview_01_sub",
                    "stillImageSource": "-i http://IP/cgi-bin/api.cgi?cmd=Snap&channel=1&rs=wuuPhkmUCeI9WG7C&user=USER&password=PASSWORD",
                    "maxStreams": 2,
                    "maxWidth": 1280,
                    "maxHeight": 720,
                    "maxFPS": 30,
                    "vcodec": "h264_omx"
                },
                "videoanalysis": {
                    "active": true
                }
            }
        ],
        "platform": "CameraUI"

Important: Needed was h264_omx to run stable ...

So far, I cloud't get it to work for the main stream because the camera has an h265 encoding for that the parameter /h265Preview_01_main must be used but this doesn't work stable for me and the stream aborts and the recording buffer can not be read. Any ideas how to set this up ?

seydx commented 2 years ago

H265 is not supported

eperitus commented 2 years ago

Great news, with plugin v5.0.7, and sensitivity pushed up to 70 instead of 20, I am now getting lots of events captured in HSV. I think the problem was I had set sensitivity too low, when it should have been high.

vshabunya commented 2 years ago

Will H265 be supported?

WattageGuy commented 2 years ago

+1 for H265

bossco79 commented 2 years ago

+1 for H265)