Local realtime person detection for RTSP cameras

So, it’s running now with the debug setup for video.py. I also tried to enable hw acceleration but the container wouldn’t start with it, so went back to running without.

There’s a few Past duration too large errors in there…:

|2019-07-16 10:57:43|stderr|frame= 1122 fps=4.0 q=-0.0 size= 6816150kB time=00:04:48.50 bitrate=193545.6kbits/s dup=1 drop=0 speed=1.02x     frame= 1124 fps=4.0 q=-0.0 size= 6828300kB time=00:04:49.00 bitrate=193555.1kbits/s dup=1 drop=0 speed=1.02x     frame= 1127 fps=4.0 q=-0.0 size= 6846525kB time=00:04:49.75 bitrate=193569.4kbits/s dup=1 drop=0 speed=1.02x     frame= 1130 fps=4.0 q=-0.0 size= 6864750kB time=00:04:50.50 bitrate=193583.6kbits/s dup=1 drop=0 speed=1.02x     frame= 1132 fps=4.0 q=-0.0 size= 6876900kB time=00:04:51.00 bitrate=193593.0kbits/s dup=1 drop=0 speed=1.02x     frame= 1135 fps=4.0 q=-0.0 size= 6895125kB time=00:04:51.75 bitrate=193607.1kbits/s dup=1 drop=0 speed=1.02x     Past duration 0.991142 too large|
|---|---|---|
|2019-07-16 10:57:40|stderr|frame= 1107 fps=4.0 q=-0.0 size= 6725025kB time=00:04:44.75 bitrate=193472.9kbits/s dup=1 drop=0 speed=1.02x     frame= 1110 fps=4.0 q=-0.0 size= 6743250kB time=00:04:45.50 bitrate=193487.6kbits/s dup=1 drop=0 speed=1.02x     frame= 1112 fps=4.0 q=-0.0 size= 6755400kB time=00:04:46.00 bitrate=193497.3kbits/s dup=1 drop=0 speed=1.02x     frame= 1115 fps=4.0 q=-0.0 size= 6773625kB time=00:04:46.75 bitrate=193511.9kbits/s dup=1 drop=0 speed=1.02x     frame= 1117 fps=4.0 q=-0.0 size= 6785775kB time=00:04:47.25 bitrate=193521.6kbits/s dup=1 drop=0 speed=1.02x     frame= 1120 fps=4.0 q=-0.0 size= 6804000kB time=00:04:48.00 bitrate=193536.0kbits/s dup=1 drop=0 speed=1.02x     Past duration 0.948708 too large|
|2019-07-16 10:57:36|stderr|frame= 1074 fps=4.0 q=-0.0 size= 6524550kB time=00:04:36.50 bitrate=193306.0kbits/s dup=1 drop=0 speed=1.02x     frame= 1076 fps=4.0 q=-0.0 size= 6536700kB time=00:04:37.00 bitrate=193316.4kbits/s dup=1 drop=0 speed=1.02x     frame= 1079 fps=4.0 q=-0.0 size= 6554925kB time=00:04:37.75 bitrate=193331.9kbits/s dup=1 drop=0 speed=1.02x     frame= 1081 fps=4.0 q=-0.0 size= 6567075kB time=00:04:38.25 bitrate=193342.2kbits/s dup=1 drop=0 speed=1.02x     frame= 1084 fps=4.0 q=-0.0 size= 6585300kB time=00:04:39.00 bitrate=193357.6kbits/s dup=1 drop=0 speed=1.02x     frame= 1087 fps=4.0 q=-0.0 size= 6603525kB time=00:04:39.75 bitrate=193372.9kbits/s dup=1 drop=0 speed=1.02x     frame= 1090 fps=4.0 q=-0.0 size= 6621750kB time=00:04:40.50 bitrate=193388.1kbits/s dup=1 drop=0 speed=1.02x     frame= 1092 fps=4.0 q=-0.0 size= 6633900kB time=00:04:41.00 bitrate=193398.3kbits/s dup=1 drop=0 speed=1.02x     frame= 1095 fps=4.0 q=-0.0 size= 6652125kB time=00:04:41.75 bitrate=193413.3kbits/s dup=1 drop=0 speed=1.02x     frame= 1097 fps=4.0 q=-0.0 size= 6664275kB time=00:04:42.25 bitrate=193423.4kbits/s dup=1 drop=0 speed=1.02x     frame= 1100 fps=4.0 q=-0.0 size= 6682500kB time=00:04:43.00 bitrate=193438.3kbits/s dup=1 drop=0 speed=1.02x     frame= 1103 fps=4.0 q=-0.0 size= 6700725kB time=00:04:43.75 bitrate=193453.2kbits/s dup=1 drop=0 speed=1.02x     frame= 1105 fps=4.0 q=-0.0 size= 6712875kB time=00:04:44.25 bitrate=193463.1kbits/s dup=1 drop=0 speed=1.02x     Past duration 0.990578 too large|
|2019-07-16 10:57:28|stderr|frame= 1059 fps=4.0 q=-0.0 size= 6433425kB time=00:04:32.75 bitrate=193226.8kbits/s dup=1 drop=0 speed=1.02x     frame= 1062 fps=4.0 q=-0.0 size= 6451650kB time=00:04:33.50 bitrate=193242.8kbits/s dup=1 drop=0 speed=1.02x     frame= 1064 fps=4.0 q=-0.0 size= 6463800kB time=00:04:34.00 bitrate=193253.5kbits/s dup=1 drop=0 speed=1.02x     frame= 1067 fps=4.0 q=-0.0 size= 6482025kB time=00:04:34.75 bitrate=193269.3kbits/s dup=1 drop=0 speed=1.02x     frame= 1069 fps=4.0 q=-0.0 size= 6494175kB time=00:04:35.25 bitrate=193279.9kbits/s dup=1 drop=0 speed=1.02x     frame= 1072 fps=4.0 q=-0.0 size= 6512400kB time=00:04:36.00 bitrate=193295.6kbits/s dup=1 drop=0 speed=1.02x     Past duration 0.975243 too large|
|2019-07-16 10:57:24|stderr|frame= 1057 fps=4.0 q=-0.0 size= 6421275kB time=00:04:32.25 bitrate=193216.1kbits/s dup=1 drop=0 speed=1.02x     Past duration 0.932610 too large|
|2019-07-16 10:57:23|stderr|frame= 1043 fps=4.0 q=-0.0 size= 6336225kB time=00:04:28.75 bitrate=193139.9kbits/s dup=1 drop=0 speed=1.02x     frame= 1046 fps=4.0 q=-0.0 size= 6354450kB time=00:04:29.50 bitrate=193156.4kbits/s dup=1 drop=0 speed=1.02x     frame= 1048 fps=4.0 q=-0.0 size= 6366600kB time=00:04:30.00 bitrate=193167.4kbits/s dup=1 drop=0 speed=1.02x     frame= 1051 fps=4.0 q=-0.0 size= 6384825kB time=00:04:30.75 bitrate=193183.7kbits/s dup=1 drop=0 speed=1.02x     frame= 1053 fps=4.0 q=-0.0 size= 6396975kB time=00:04:31.25 bitrate=193194.5kbits/s dup=1 drop=0 speed=1.02x     frame= 1055 fps=4.0 q=-0.0 size= 6409125kB time=00:04:31.75 bitrate=193205.3kbits/s dup=1 drop=0 speed=1.02x     Past duration 0.985588 too large|
|2019-07-16 10:57:20|stderr|frame= 1027 fps=4.0 q=-0.0 size= 6239025kB time=00:04:24.75 bitrate=193050.4kbits/s dup=1 drop=0 speed=1.02x     frame= 1030 fps=4.0 q=-0.0 size= 6257250kB time=00:04:25.50 bitrate=193067.4kbits/s dup=1 drop=0 speed=1.02x     frame= 1032 fps=4.0 q=-0.0 size= 6269400kB time=00:04:26.00 bitrate=193078.7kbits/s dup=1 drop=0 speed=1.02x     frame= 1035 fps=4.0 q=-0.0 size= 6287625kB time=00:04:26.75 bitrate=193095.5kbits/s dup=1 drop=0 speed=1.02x     frame= 1037 fps=4.0 q=-0.0 size= 6299775kB time=00:04:27.25 bitrate=193106.7kbits/s dup=1 drop=0 speed=1.02x     frame= 1039 fps=4.0 q=-0.0 size= 6311925kB time=00:04:27.75 bitrate=193117.8kbits/s dup=1 drop=0 speed=1.02x     frame= 1041 fps=4.0 q=-0.0 size= 6324075kB time=00:04:28.25 bitrate=193128.9kbits/s dup=1 drop=0 speed=1.02x     Past duration 0.938438 too large|
|2019-07-16 10:57:16|stderr|frame=  994 fps=4.0 q=-0.0 size= 6038550kB time=00:04:16.50 bitrate=192856.9kbits/s dup=1 drop=0 speed=1.02x     frame=  996 fps=4.0 q=-0.0 size= 6050700kB time=00:04:17.00 bitrate=192869.0kbits/s dup=1 drop=0 speed=1.02x     frame=  999 fps=4.0 q=-0.0 size= 6068925kB time=00:04:17.75 bitrate=192887.0kbits/s dup=1 drop=0 speed=1.02x     frame= 1001 fps=4.0 q=-0.0 size= 6081075kB time=00:04:18.25 bitrate=192899.0kbits/s dup=1 drop=0 speed=1.02x     frame= 1004 fps=4.0 q=-0.0 size= 6099300kB time=00:04:19.00 bitrate=192916.9kbits/s dup=1 drop=0 speed=1.02x     frame= 1007 fps=4.0 q=-0.0 size= 6117525kB time=00:04:19.75 bitrate=192934.6kbits/s dup=1 drop=0 speed=1.02x     frame= 1009 fps=4.0 q=-0.0 size= 6129675kB time=00:04:20.25 bitrate=192946.4kbits/s dup=1 drop=0 speed=1.02x     frame= 1011 fps=4.0 q=-0.0 size= 6141825kB time=00:04:20.75 bitrate=192958.1kbits/s dup=1 drop=0 speed=1.02x     frame= 1014 fps=4.0 q=-0.0 size= 6160050kB time=00:04:21.50 bitrate=192975.6kbits/s dup=1 drop=0 speed=1.02x     frame= 1016 fps=4.0 q=-0.0 size= 6172200kB time=00:04:22.00 bitrate=192987.3kbits/s dup=1 drop=0 speed=1.02x     frame= 1019 fps=4.0 q=-0.0 size= 6190425kB time=00:04:22.75 bitrate=193004.6kbits/s dup=1 drop=0 speed=1.02x     frame= 1021 fps=4.0 q=-0.0 size= 6202575kB time=00:04:23.25 bitrate=193016.1kbits/s dup=1 drop=0 speed=1.02x     frame= 1024 fps=4.0 q=-0.0 size= 6220800kB time=00:04:24.00 bitrate=193033.3kbits/s dup=1 drop=0 speed=1.02x     Past duration 0.995766 too large|
|2019-07-16 10:57:08|stderr|frame=  962 fps=4.0 q=-0.0 size= 5844150kB time=00:04:08.50 bitrate=192657.0kbits/s dup=1 drop=0 speed=1.02x     frame=  964 fps=4.0 q=-0.0 size= 5856300kB time=00:04:09.00 bitrate=192669.9kbits/s dup=1 drop=0 speed=1.02x     frame=  967 fps=4.0 q=-0.0 size= 5874525kB time=00:04:09.75 bitrate=192689.1kbits/s dup=1 drop=0 speed=1.02x     frame=  969 fps=4.0 q=-0.0 size= 5886675kB time=00:04:10.25 bitrate=192701.9kbits/s dup=1 drop=0 speed=1.02x     frame=  972 fps=4.0 q=-0.0 size= 5904900kB time=00:04:11.00 bitrate=192720.9kbits/s dup=1 drop=0 speed=1.02x     frame=  975 fps=4.0 q=-0.0 size= 5923125kB time=00:04:11.75 bitrate=192739.8kbits/s dup=1 drop=0 speed=1.02x     frame=  977 fps=4.0 q=-0.0 size= 5935275kB time=00:04:12.25 bitrate=192752.3kbits/s dup=1 drop=0 speed=1.02x     frame=  979 fps=4.0 q=-0.0 size= 5947425kB time=00:04:12.75 bitrate=192764.8kbits/s dup=1 drop=0 speed=1.02x     frame=  982 fps=4.0 q=-0.0 size= 5965650kB time=00:04:13.50 bitrate=192783.5kbits/s dup=1 drop=0 speed=1.02x     frame=  984 fps=4.0 q=-0.0 size= 5977800kB time=00:04:14.00 bitrate=192795.8kbits/s dup=1 drop=0 speed=1.02x     frame=  987 fps=4.0 q=-0.0 size= 5996025kB time=00:04:14.75 bitrate=192814.3kbits/s dup=1 drop=0 speed=1.02x     frame=  989 fps=4.0 q=-0.0 size= 6008175kB time=00:04:15.25 bitrate=192826.5kbits/s dup=1 drop=0 speed=1.02x     frame=  992 fps=4.0 q=-0.0 size= 6026400kB time=00:04:16.00 bitrate=192844.8kbits/s dup=1 drop=0 speed=1.02x     Past duration 0.982399 too large|
|2019-07-16 10:57:00|stderr|frame=  960 fps=4.0 q=-0.0 size= 5832000kB time=00:04:08.00 bitrate=192644.1kbits/s dup=1 drop=0 speed=1.02x     Past duration 0.939461 too large|
|2019-07-16 10:56:59|stderr|frame=  931 fps=4.0 q=-0.0 size= 5655825kB time=00:04:00.75 bitrate=192450.8kbits/s dup=1 drop=0 speed=1.02x     frame=  934 fps=4.0 q=-0.0 size= 5674050kB time=00:04:01.50 bitrate=192471.3kbits/s dup=1 drop=0 speed=1.02x     frame=  937 fps=4.0 q=-0.0 size= 5692275kB time=00:04:02.25 bitrate=192491.7kbits/s dup=1 drop=0 speed=1.02x     frame=  940 fps=4.0 q=-0.0 size= 5710500kB time=00:04:03.00 bitrate=192512.0kbits/s dup=1 drop=0 speed=1.02x     frame=  942 fps=4.0 q=-0.0 size= 5722650kB time=00:04:03.50 bitrate=192525.5kbits/s dup=1 drop=0 speed=1.02x     frame=  945 fps=4.0 q=-0.0 size= 5740875kB time=00:04:04.25 bitrate=192545.5kbits/s dup=1 drop=0 speed=1.02x     frame=  947 fps=4.0 q=-0.0 size= 5753025kB time=00:04:04.75 bitrate=192558.9kbits/s dup=1 drop=0 speed=1.02x     frame=  949 fps=4.0 q=-0.0 size= 5765175kB time=00:04:05.25 bitrate=192572.1kbits/s dup=1 drop=0 speed=1.02x     frame=  952 fps=4.0 q=-0.0 size= 5783400kB time=00:04:06.00 bitrate=192591.9kbits/s dup=1 drop=0 speed=1.02x     frame=  955 fps=4.0 q=-0.0 size= 5801625kB time=00:04:06.75 bitrate=192611.6kbits/s dup=1 drop=0 speed=1.02x     frame=  957 fps=4.0 q=-0.0 size= 5813775kB time=00:04:07.25 bitrate=192624.7kbits/s dup=1 drop=0 speed=1.02x     Past duration 0.978264 too large|
|2019-07-16 10:56:52|stderr|frame=  916 fps=4.0 q=-0.0 size= 5564700kB time=00:03:57.00 bitrate=192346.1kbits/s dup=1 drop=0 speed=1.02x     frame=  919 fps=4.0 q=-0.0 size= 5582925kB time=00:03:57.75 bitrate=192367.3kbits/s dup=1 drop=0 speed=1.02x     frame=  921 fps=4.0 q=-0.0 size= 5595075kB time=00:03:58.25 bitrate=192381.3kbits/s dup=1 drop=0 speed=1.02x     frame=  924 fps=4.0 q=-0.0 size= 5613300kB time=00:03:59.00 bitrate=192402.3kbits/s dup=1 drop=0 speed=1.02x     frame=  927 fps=4.0 q=-0.0 size= 5631525kB time=00:03:59.75 bitrate=192423.2kbits/s dup=1 drop=0 speed=1.02x     frame=  929 fps=4.0 q=-0.0 size= 5643675kB time=00:04:00.25 bitrate=192437.0kbits/s dup=1 drop=0 speed=1.02x     Past duration 0.983589 too large|
|2019-07-16 10:56:48|stderr|frame=  898 fps=4.0 q=-0.0 size= 5455350kB time=00:03:52.50 bitrate=192216.0kbits/s dup=1 drop=0 speed=1.03x     frame=  900 fps=4.0 q=-0.0 size= 5467500kB time=00:03:53.00 bitrate=192230.7kbits/s dup=1 drop=0 speed=1.02x     frame=  903 fps=4.0 q=-0.0 size= 5485725kB time=00:03:53.75 bitrate=192252.7kbits/s dup=1 drop=0 speed=1.03x     frame=  905 fps=4.0 q=-0.0 size= 5497875kB time=00:03:54.25 bitrate=192267.2kbits/s dup=1 drop=0 speed=1.02x     frame=  908 fps=4.0 q=-0.0 size= 5516100kB time=00:03:55.00 bitrate=192288.9kbits/s dup=1 drop=0 speed=1.02x     frame=  911 fps=4.0 q=-0.0 size= 5534325kB time=00:03:55.75 bitrate=192310.5kbits/s dup=1 drop=0 speed=1.02x     frame=  913 fps=4.0 q=-0.0 size= 5546475kB time=00:03:56.25 bitrate=192324.8kbits/s dup=1 drop=0 speed=1.02x     Past duration 0.929771 too large|
|2019-07-16 10:56:44|stderr|frame=  883 fps=4.0 q=-0.0 size= 5364225kB time=00:03:48.75 bitrate=192103.7kbits/s dup=1 drop=0 speed=1.03x     frame=  886 fps=4.0 q=-0.0 size= 5382450kB time=00:03:49.50 bitrate=192126.5kbits/s dup=1 drop=0 speed=1.03x     frame=  888 fps=4.0 q=-0.0 size= 5394600kB time=00:03:50.00 bitrate=192141.6kbits/s dup=1 drop=0 speed=1.03x     frame=  891 fps=4.0 q=-0.0 size= 5412825kB time=00:03:50.75 bitrate=192164.1kbits/s dup=1 drop=0 speed=1.03x     frame=  893 fps=4.0 q=-0.0 size= 5424975kB time=00:03:51.25 bitrate=192179.0kbits/s dup=1 drop=0 speed=1.03x     frame=  896 fps=4.0 q=-0.0 size= 5443200kB time=00:03:52.00 bitrate=192201.3kbits/s dup=1 drop=0 speed=1.03x     Past duration 0.987907 too large|
|2019-07-16 10:56:40|stderr|frame=  881 fps=4.0 q=-0.0 size= 5352075kB time=00:03:48.25 bitrate=192088.5kbits/s dup=1 drop=0 speed=1.03x     Past duration 0.947456 too large|
|2019-07-16 10:56:39|stderr|frame=  866 fps=4.0 q=-0.0 size= 5260950kB time=00:03:44.50 bitrate=191971.9kbits/s dup=1 drop=0 speed=1.03x     frame=  868 fps=4.0 q=-0.0 size= 5273100kB time=00:03:45.00 bitrate=191987.7kbits/s dup=1 drop=0 speed=1.03x     frame=  871 fps=4.0 q=-0.0 size= 5291325kB time=00:03:45.75 bitrate=192011.2kbits/s dup=1 drop=0 speed=1.03x     frame=  873 fps=4.0 q=-0.0 size= 5303475kB time=00:03:46.25 bitrate=192026.8kbits/s dup=1 drop=0 speed=1.03x     frame=  876 fps=4.0 q=-0.0 size= 5321700kB time=00:03:47.00 bitrate=192050.1kbits/s dup=1 drop=0 speed=1.03x     frame=  879 fps=4.0 q=-0.0 size= 5339925kB time=00:03:47.75 bitrate=192073.2kbits/s dup=1 drop=0 speed=1.03x     Past duration 0.992699 too large|
|2019-07-16 10:56:36|stderr|frame=  864 fps=4.0 q=-0.0 size= 5248800kB time=00:03:44.00 bitrate=191956.1kbits/s dup=1 drop=0 speed=1.03x     Past duration 0.872932 too large|
|2019-07-16 10:56:35|stderr|frame=  851 fps=4.0 q=-0.0 size= 5169825kB time=00:03:40.75 bitrate=191851.4kbits/s dup=1 drop=0 speed=1.03x     frame=  853 fps=4.0 q=-0.0 size= 5181975kB time=00:03:41.25 bitrate=191867.7kbits/s dup=1 drop=0 speed=1.03x     frame=  856 fps=4.0 q=-0.0 size= 5200200kB time=00:03:42.00 bitrate=191892.1kbits/s dup=1 drop=0 speed=1.03x     frame=  859 fps=4.0 q=-0.0 size= 5218425kB time=00:03:42.75 bitrate=191916.2kbits/s dup=1 drop=0 speed=1.03x     frame=  861 fps=4.0 q=-0.0 size= 5230575kB time=00:03:43.25 bitrate=191932.2kbits/s dup=1 drop=0 speed=1.03x     Past duration 0.982124 too large|
|2019-07-16 10:56:32|stderr|frame=  849 fps=4.0 q=-0.0 size= 5157675kB time=00:03:40.25 bitrate=191835.1kbits/s dup=1 drop=0 speed=1.03x     Past duration 0.979988 too large|
|2019-07-16 10:56:31|stderr|frame=  834 fps=4.0 q=-0.0 size= 5066550kB time=00:03:36.50 bitrate=191709.8kbits/s dup=1 drop=0 speed=1.03x     frame=  836 fps=4.0 q=-0.0 size= 5078700kB time=00:03:37.00 bitrate=191726.8kbits/s dup=1 drop=0 speed=1.03x     frame=  839 fps=4.0 q=-0.0 size= 5096925kB time=00:03:37.75 bitrate=191752.1kbits/s dup=1 drop=0 speed=1.03x     frame=  841 fps=4.0 q=-0.0 size= 5109075kB time=00:03:38.25 bitrate=191768.8kbits/s dup=1 drop=0 speed=1.03x     frame=  844 fps=4.0 q=-0.0 size= 5127300kB time=00:03:39.00 bitrate=191793.8kbits/s dup=1 drop=0 speed=1.03x     frame=  847 fps=4.0 q=-0.0 size= 5145525kB time=00:03:39.75 bitrate=191818.6kbits/s dup=1 drop=0 speed=1.03x     Past duration 0.989555 too large|
|2019-07-16 10:56:27|stderr|frame=  818 fps=4.0 q=-0.0 size= 4969350kB time=00:03:32.50 bitrate=191571.4kbits/s dup=1 drop=0 speed=1.03x     frame=  820 fps=4.0 q=-0.0 size= 4981500kB time=00:03:33.00 bitrate=191589.0kbits/s dup=1 drop=0 speed=1.03x     frame=  823 fps=4.0 q=-0.0 size= 4999725kB time=00:03:33.75 bitrate=191615.2kbits/s dup=1 drop=0 speed=1.03x     frame=  825 fps=4.0 q=-0.0 size= 5011875kB time=00:03:34.25 bitrate=191632.6kbits/s dup=1 drop=0 speed=1.03x     frame=  828 fps=4.0 q=-0.0 size= 5030100kB time=00:03:35.00 bitrate=191658.5kbits/s dup=1 drop=0 speed=1.03x     frame=  831 fps=4.0 q=-0.0 size= 5048325kB time=00:03:35.75 bitrate=191684.3kbits/s dup=1 drop=0 speed=1.03x     Past duration 0.977547 too large|
|2019-07-16 10:56:24|stderr|Past duration 0.938042 too large|
|2019-07-16 10:56:23|stderr|frame=  786 fps=4.0 q=-0.0 size= 4774950kB time=00:03:24.50 bitrate=191278.2kbits/s dup=1 drop=0 speed=1.03x     frame=  788 fps=4.0 q=-0.0 size= 4787100kB time=00:03:25.00 bitrate=191297.2kbits/s dup=1 drop=0 speed=1.03x     frame=  791 fps=4.0 q=-0.0 size= 4805325kB time=00:03:25.75 bitrate=191325.5kbits/s dup=1 drop=0 speed=1.03x     frame=  793 fps=4.0 q=-0.0 size= 4817475kB time=00:03:26.25 bitrate=191344.3kbits/s dup=1 drop=0 speed=1.03x     frame=  796 fps=4.0 q=-0.0 size= 4835700kB time=00:03:27.00 bitrate=191372.2kbits/s dup=1 drop=0 speed=1.03x     frame=  799 fps=4.0 q=-0.0 size= 4853925kB time=00:03:27.75 bitrate=191400.0kbits/s dup=1 drop=0 speed=1.03x     frame=  802 fps=4.0 q=-0.0 size= 4872150kB time=00:03:28.50 bitrate=191427.6kbits/s dup=1 drop=0 speed=1.03x     frame=  803 fps=4.0 q=-0.0 size= 4878225kB time=00:03:28.75 bitrate=191436.7kbits/s dup=1 drop=0 speed=1.03x     frame=  806 fps=4.0 q=-0.0 size= 4896450kB time=00:03:29.50 bitrate=191464.0kbits/s dup=1 drop=0 speed=1.03x     frame=  808 fps=4.0 q=-0.0 size= 4908600kB time=00:03:30.00 bitrate=191482.1kbits/s dup=1 drop=0 speed=1.03x     frame=  811 fps=4.0 q=-0.0 size= 4926825kB time=00:03:30.75 bitrate=191509.1kbits/s dup=1 drop=0 speed=1.03x     frame=  813 fps=4.0 q=-0.0 size= 4938975kB time=00:03:31.25 bitrate=191527.0kbits/s dup=1 drop=0 speed=1.03x     frame=  815 fps=4.0 q=-0.0 size= 4951125kB time=00:03:31.75 bitrate=191544.8kbits/s dup=1 drop=0 speed=1.03x     Past duration 0.912132 too large|
|2019-07-16 10:56:16|stderr|Past duration 0.963188 too large|
|2019-07-16 10:56:15|stderr|frame=  770 fps=4.0 q=-0.0 size= 4677750kB time=00:03:20.50 bitrate=191122.8kbits/s dup=1 drop=0 speed=1.03x     frame=  772 fps=4.0 q=-0.0 size= 4689900kB time=00:03:21.00 bitrate=191142.6kbits/s dup=1 drop=0 speed=1.03x     frame=  775 fps=4.0 q=-0.0 size= 4708125kB time=00:03:21.75 bitrate=191172.0kbits/s dup=1 drop=0 speed=1.03x     frame=  777 fps=4.0 q=-0.0 size= 4720275kB time=00:03:22.25 bitrate=191191.6kbits/s dup=1 drop=0 speed=1.03x     frame=  780 fps=4.0 q=-0.0 size= 4738500kB time=00:03:23.00 bitrate=191220.7kbits/s dup=1 drop=0 speed=1.03x     frame=  783 fps=4.0 q=-0.0 size= 4756725kB time=00:03:23.75 bitrate=191249.5kbits/s dup=1 drop=0 speed=1.03x     Past duration 0.906792 too large|
|2019-07-16 10:56:12|stderr|Past duration 0.998665 too large|
|2019-07-16 10:56:11|stderr|frame=  754 fps=4.0 q=-0.0 size= 4580550kB time=00:03:16.50 bitrate=190961.1kbits/s dup=1 drop=0 speed=1.03x     frame=  756 fps=4.0 q=-0.0 size= 4592700kB time=00:03:17.00 bitrate=190981.7kbits/s dup=1 drop=0 speed=1.03x     frame=  759 fps=4.0 q=-0.0 size= 4610925kB time=00:03:17.75 bitrate=191012.4kbits/s dup=1 drop=0 speed=1.03x     frame=  761 fps=4.0 q=-0.0 size= 4623075kB time=00:03:18.25 bitrate=191032.7kbits/s dup=1 drop=0 speed=1.03x     frame=  764 fps=4.0 q=-0.0 size= 4641300kB time=00:03:19.00 bitrate=191063.0kbits/s dup=1 drop=0 speed=1.03x     frame=  767 fps=4.0 q=-0.0 size= 4659525kB time=00:03:19.75 bitrate=191093.0kbits/s dup=1 drop=0 speed=1.03x     Past duration 0.981102 too large|
|2019-07-16 10:56:08|stderr|Past duration 0.948479 too large|
|2019-07-16 10:56:07|stderr|frame=  722 fps=4.0 q=-0.0 size= 4386150kB time=00:03:08.50 bitrate=190617.2kbits/s dup=1 drop=0 speed=1.03x     frame=  724 fps=3.9 q=-0.0 size= 4398300kB time=00:03:09.00 bitrate=190639.5kbits/s dup=1 drop=0 speed=1.03x     frame=  726 fps=3.9 q=-0.0 size= 4410450kB time=00:03:09.50 bitrate=190661.8kbits/s dup=1 drop=0 speed=1.03x     frame=  729 fps=3.9 q=-0.0 size= 4428675kB time=00:03:10.25 bitrate=190694.9kbits/s dup=1 drop=0 speed=1.03x     frame=  732 fps=3.9 q=-0.0 size= 4446900kB time=00:03:11.00 bitrate=190727.8kbits/s dup=1 drop=0 speed=1.03x     frame=  735 fps=4.0 q=-0.0 size= 4465125kB time=00:03:11.75 bitrate=190760.4kbits/s dup=1 drop=0 speed=1.03x     frame=  738 fps=4.0 q=-0.0 size= 4483350kB time=00:03:12.50 bitrate=190792.7kbits/s dup=1 drop=0 speed=1.03x     frame=  739 fps=4.0 q=-0.0 size= 4489425kB time=00:03:12.75 bitrate=190803.5kbits/s dup=1 drop=0 speed=1.03x     frame=  742 fps=4.0 q=-0.0 size= 4507650kB time=00:03:13.50 bitrate=190835.5kbits/s dup=1 drop=0 speed=1.03x     frame=  744 fps=4.0 q=-0.0 size= 4519800kB time=00:03:14.00 bitrate=190856.7kbits/s dup=1 drop=0 speed=1.03x     frame=  747 fps=4.0 q=-0.0 size= 4538025kB time=00:03:14.75 bitrate=190888.3kbits/s dup=1 drop=0 speed=1.03x     frame=  749 fps=4.0 q=-0.0 size= 4550175kB time=00:03:15.25 bitrate=190909.3kbits/s dup=1 drop=0 speed=1.03x     frame=  751 fps=4.0 q=-0.0 size= 4562325kB time=00:03:15.75 bitrate=190930.1kbits/s dup=1 drop=0 speed=1.03x     Past duration 0.934532 too large|
|2019-07-16 10:56:00|stderr|Past duration 0.945198 too large|

Here is the current

This line is saying that your RTSP url returned a 404 Not Found. Are you sure you have the right url?

Can you build the ffmpeg-subprocess branch and run benchmark.py? I am curious to see how the RPi4 performs. Hoping mine ships today.

Average inference time: 12.464006978034973
pi@raspberrypi:~/frigate-0.2.0-beta $

Looks like one of my sub streams died on one of the cameras, weird. Looks like all is well on the Pi4, good inference times too!

Not bad. It is probably fine if you are only running a limited # of regions. When I get mine, I will work on hwaccel for the Pi.

1 Like

Okay, so my test with one landscape orientation 1080p camera with a mask is coming to a close after a little more than a day. The docker container is pretty much completely unresponsive and the stream output from frigate is only updating a frame about once every few minutes. Here’s what I could get from the terminal, it won’t give me a full log. It’s just repeating this. You can compare to my last post which shows what it looks like when I have just started it and it’s working.

    encoder         : Lavf57.83.100                                             
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1920x1080, q=2-3
1, 199065 kb/s, 4 fps, 4 tbn, 4 tbc                                             
    Metadata:                                                                   
      encoder         : Lavc57.107.100 rawvideo                                 
last frame is more than 2 seconds old, restarting camera capture...             
Terminating the existing capture process...                                     
Creating a new capture process...                                               
Starting a new capture process...                                               
ffmpeg -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict ex
perimental -fflags +genpts -rtsp_transport tcp -stimeout 5000000 -use_wallclock_
as_timestamps 1 -i rtsp://uname:[email protected]:554
/Sms=4.unicast -f rawvideo -pix_fmt rgb24 pipe:                                 
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg develop
ers                                                                             
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)                                     
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hard
ened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu -
-enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-g
nutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enab
le-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-li
bfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lam
e --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus -
-enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --ena
ble-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libthe
ora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack -
-enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libz
mq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 -
-enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --en
able-frei0r --enable-libopencv --enable-libx264 --enable-shared                 
  libavutil      55. 78.100 / 55. 78.100                                        
  libavcodec     57.107.100 / 57.107.100                                        
  libavformat    57. 83.100 / 57. 83.100                                        
  libavdevice    57. 10.100 / 57. 10.100                                        
  libavfilter     6.107.100 /  6.107.100                                        
  libavresample   3.  7.  0 /  3.  7.  0                                        
  libswscale      4.  8.100 /  4.  8.100                                                                             
  libswresample   2.  9.100 /  2.  9.100                                        
  libpostproc    54.  7.100 / 54.  7.100                                        
Input #0, rtsp, from 'rtsp://uname:[email protected]:
554/Sms=4.unicast':                                                                                                                         
  Metadata:                                                                     
    title           : Session streamed by "ssrtspd"                             
    comment         : 1,4_high.unicast                                          
  Duration: N/A, start: 1563394347.384278, bitrate: N/A                         
    Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 4 fps, 4 t
br, 90k tbn, 8 tbc                                                              
Stream mapping:                                                                 
  Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))                      
Press [q] to stop, [?] for help                                                 
frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kb
frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kb
frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kb
frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kb
Output #0, rawvideo, to 'pipe:':                                                
  Metadata:                                                                     
    title           : Session streamed by "ssrtspd"                             
    comment         : 1,4_high.unicast                                          
    encoder         : Lavf57.83.100                                             
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1920x1080, q=2-3
1, 199065 kb/s, 4 fps, 4 tbn, 4 tbc                                             
    Metadata:                                                                   
      encoder         : Lavc57.107.100 rawvideo                                 

Are you able to keep it going for a couple days or more against a hikvision camera? If so, could you post your video settings?

Can you run htop to see if a particular process is using lots of CPU or memory in the container? Something has to be working hard.

I’ve already stopped it and started the old one with the low res streams and no masks again… I’m curious how long it will run. It was going pretty well last time… I’ll try to look at htop if it bogs down again, but synology does include a little process monitor which looks like this, and it’s never shown anything unusual when it starts to bog…

Also CPU and memory have never really grown much from where it starts (this is on the smaller feeds and old version so not the same, but it doesn’t move much… At least not nearly enough to challenge resources on the synology… I don’t have a resource cap set for frigate.

Was there anything of use in the logs?

The rtsp url you are using does not seem to match anything I can find about your camera. Are you not connecting directly to the camera?

I changed the RTSP Url because I don’t want to publish that information on the internet… I am currently taking the feed from synology surveillance station, not from the camera because it looks like my camera can’t serve up 2 1080p feeds at once… Also it seems better to just have synology feed it to another process running on the same host so as to avoid having to go out on the network. Suffice it to say it works well enough to run for a 12+ hours making bounding boxes, so I’m quite sure it’s a working URL.

But I’ve gone back to using the subfeed from the camera for now…

Would you be willing to try with frigate as the only consumer of that 1080p feed for a bit? That would tell us if having the synology as a middleman is the issue. Also, what is that feature called? I don’t have a synology.

So I have had the Pi up for roughly a day since I restarted it last night, one of seven feeds is down and didn’t recover. There are some “last frame is more than 2 seconds old…” messages and “Opening the RTSP URL”…

I’m using substreams and pulling the video via the Hikvision NVR…

The feature is called “share stream path”.

I wouldn’t mind trying it directly against the 1080p stream of the camera, though I have done it many times already against the 704x568 substream of the camera… In most cases except the last when I put it to fixed bitrate ending in the same result as with the synology… Also I tried it against the 720p feed with the same result…

For now, I’m going to see how long I can keep it up against the fixed bitrate substream with no mask… I want to see if there’s one scenario in which it works properly…

In my experience, the “last frame is more than 2 seconds old” is the beginning of the end… They will become more and more frequent over the space of a few hours until you can no longer open the frigate stream… So I suspect if you run it for longer you will start to see the same problems… I’m interested to hear your results.

I wonder if the process isn’t actually exiting, and it is creating a duplicate connection. Over time the number of connections would probably slow things down like that.

If restarting the container fixes it, that almost has to be the problem.

I think I know what to try. Will try and push up a new image tonight.

Ok. I completely revamped the way that I am running the ffmpeg subprocess so that I can make sure it is correctly killed in the event frames stop coming in. I tested it several different ways, and I really think this will solve the issues you are having. Updated image is pushed to blakeblackshear/frigate:0.2.0-beta.

2 Likes

That sounds very promising, will test it soon! Thanks!