"New and all retriggers" alert crashes Blue Iris after second AI confirmation

Post Reply
pqRec
Posts: 31
Joined: Sat Jan 15, 2022 1:45 am

"New and all retriggers" alert crashes Blue Iris after second AI confirmation

Post by pqRec »

Win10, BI5.9.4.11, Codeproject AI 2.6.5, YOLOv5.NET (onboard Intel GPU) or Coral TPU with YOLO5 or YOLO8. I've deleted and reinstalled the camera, CP.AI and the Coral hardware. Ensured I have the latest Intel INF drivers and video drivers.

If you configure an alert for "New and all retriggers", upon the second AI-confirmed retrigger within the period of the first trigger, the stream for that camera will freeze in the Windows UI, the web UI3 and destabilize the operating system. BI stops sending data to CP.AI for that camera for about 2 minutes until it resets itself and the same repeats.

That camera will then display a Signal Loss, and the camera properties general tab will say "Frame Bottleneck" or "Check FPS and keyrates"

Cameras are 25fps / 1 keyframe per second for both main and substream.

Everything works perfectly if the alert is configured for "New triggers only"

Can anyone repeat this? Is it a bug or maybe something I've done wrong?
pqRec
Posts: 31
Joined: Sat Jan 15, 2022 1:45 am

Re: "New and all retriggers" alert crashes Blue Iris after second AI confirmation

Post by pqRec »

I think I found the cause, multiple retriggers aren't crashing any longer.

This issue happened with some new EmpireTech IPC-Color4K-T-3.6mm turret cameras that (by default) have a different aspect ratio for the substream to the main stream.

I still haven't made sense of the purpose of the Anamorphic option in Camera Properties > Video > Image Format

However, I was entering the native 4K resolution in there since it was automatically populating a resolution that didn't match the main or substream.

I think this was causing the crashing. I set the resolution to 1280x720 and the problem appears to have gone away

I've also found you can set the second substream to match the aspect ratio by changing the substream id to 2 as per attachment. I disabled substream 1
Untitled.png
Untitled.png (48.49 KiB) Viewed 4670 times
The Network ip camera configuration must also be updated to match the second stream.
The attachment Untitled2.png is no longer available
Attachments
Untitled2.png
Untitled2.png (36.42 KiB) Viewed 4670 times
User avatar
Pogo
Posts: 652
Joined: Tue Jul 18, 2023 7:21 pm
Location: Reportedly in the Area

Re: "New and all retriggers" alert crashes Blue Iris after second AI confirmation

Post by Pogo »

pqRec wrote: Sat Aug 31, 2024 2:19 am I think I found the cause...

This issue happened with some new EmpireTech IPC-Color4K-T-3.6mm turret cameras that (by default) have a different aspect ratio for the substream to the main stream.
The aspect ratios are the same. 16:9 in this case. The resolutions are different. This is intended by default.
I still haven't made sense of the purpose of the Anamorphic option in Camera Properties > Video > Image Format
Anamorphic (if selected) is to specify a main stream resolution different from the native resolution and will also change the aspect ratio accordingly (if applicable). This affects the displayed image only and doesn't affect recording, (though it does affect triggering). This is also typically only possible if no sub stream exists.
I was entering the native 4K resolution in there since it was automatically populating a resolution that didn't match the main or substream.
If Anamorphic is unchecked and there is an entry, it is typically the resolution of the default primary (or active) sub stream. Keep in mind the sub stream is also the trigger source unless it doesn't exist. When it generates a trigger, many things can (and generally do) happen. If conflicts exist due to misconfiguration, things typically don't occur as anticipated.
I've also found you can set the second substream to match the aspect ratio by changing the substream id to 2 as per attachment.
The primary sub stream is usually the one designated and used, normally with its default resolution. The aspect ratio will almost always match that of the main stream. Secondary sub streams are typically only used in less common situations.

Sticking to main streams and primary sub streams is standard and recommended practice unless otherwise specified.
pqRec
Posts: 31
Joined: Sat Jan 15, 2022 1:45 am

Re: "New and all retriggers" alert crashes Blue Iris after second AI confirmation

Post by pqRec »

Pogo wrote: Mon Sep 02, 2024 4:27 pm pqRec wrote: ↑Sat Aug 31, 2024 12:19 pm
I think I found the cause...

This issue happened with some new EmpireTech IPC-Color4K-T-3.6mm turret cameras that (by default) have a different aspect ratio for the substream to the main stream.

The aspect ratios are the same. 16:9 in this case. The resolutions are different. This is intended by default.
The main stream aspect ratio is
3840 / 2160 = 1.78

The default substream aspect ratio options are
704x576 = 1.22
640/480 = 1.33
352/288 = 1.22

The aspect ratios are different. In this camera, a 1.78 substream aspect ratio was unavailable until I found the hidden second substream and enabled it.

BI was stretching the substream to the correct aspect ratio for viewing, but I noticed the aspect ratio changing between main/substreams upon export - your explanation made it perfectly clear and understandable, thank you.
User avatar
Pogo
Posts: 652
Joined: Tue Jul 18, 2023 7:21 pm
Location: Reportedly in the Area

Re: "New and all retriggers" alert crashes Blue Iris after second AI confirmation

Post by Pogo »

pqRec wrote: Tue Sep 03, 2024 10:50 pm
The default substream aspect ratio options are
704x576 = 1.22
640/480 = 1.33
352/288 = 1.22

BI was stretching the substream to the correct aspect ratio for viewing, but I noticed the aspect ratio changing between main/substreams upon export - your explanation made it perfectly clear and understandable, thank you.
I'm glad you found the explanation useful. And I do technically stand corrected (as you clarified) about the sub stream aspect ratio typically being the same as the main stream. Generally the selections offered (or a single default) are indeed more likely to be 4:3. This can obviously vary by vendor and camera type/model, but small and dirty is the primary objective of sub streams and in many cases 640x480 is pushing the upper limit.

Again keep in mind that the sub stream is the workhorse for motion and object based triggering (not to mention achieving much greater CPU/GPU efficiency). Larger pixels equal klunky and smaller ones equal more sensitivity. This is important to understand when managing and tuning triggers for any given type of alert. Both have their place.
Post Reply