5.2.7.0 - RTSP sub-streams for high-MP cameras

mech

Getting comfortable
Joined
May 18, 2019
Messages
326
Reaction score
427
Location
United States
Here's the substream setup for the Bosch 8000 Ultra, which I'm sure you all have several of :) and the Bosch 6000 Starlight and 8000 Starlight.

1593301332507.png
have BI do a Find/Inspect on the camera, then add &inst=2



If you're going to set up BI to get a secondary stream from a Bosch camera, you'll want to make sure the secondary stream is configured with a GOP Structure of IP, meaning it runs keyframes ("Iframes") and P-frames (differential frames relative to the i-frames). This would be the norm for the primary high-quality streams, but if you're having BI monitor secondary streams, IBP or IBBP modes will cause problems.

The example below is a Bosch NIN-63023, friendly name being Bosch FlexiDome Starlight 6000. Some of its profiles default to IBP or IBBP. You can modify this by going into the Expert Settings for the Profile you're assigning to the secondary stream. You'll also want to set a I-frame interval in there, such as one I-frame per second, rather than Auto. Once corrected to IP mode, with an i-frame interval specified, I was able to get a stable substream in BI.

1593301257139.png

Moving two 12MP cams, six 8MP cams and some 2MP cams to substreams has reduced my own CPU load noticably, it's currently around 20% as opposed to around 40%. If I can get the three Bosch 8000 cams onto substreams, I hope to get a few more percent reduction.

Progress report: appending the &inst=2 to the Bosch 8000's URI is actually the right answer. Some trial & error is showing that the missing magic is to 1) make sure the profile assigned to the secondary stream is using the GOP Structure of IP (i-frames and p-frames) rather than IBP or IBBP structures, and 2) set an arbitrary keyframe interval such as 1 keyframe per second, rather than leaving it on Auto (which can result in keyframes as far apart as 255 frames, faking out BI when it tries to get the stream). If anyone comes across this thread and needs a hand with their Bosch cams, send me a PM and I'll help brainstorm.


Here is my system's new Task Manager workload after getting almost all of the cameras over to substreams. CPU, and both GPUs, went way down when strictly recording.

1593304588599.png

Here is 1x forward playback of all cameras at once, which is what I'm finding impressive:

1593304702408.png
 
Last edited:

B-Murda

Getting the hang of it
Joined
Jun 16, 2020
Messages
32
Reaction score
26
Location
USA
Just wanted to share this as an FYI.

If you use sub-streams on your main camera and clone it but for some reason do NOT want to use sub-stream on the clone the clone is no longer functionally cloning and does a hard-pull for the main stream resulting in 2 actual main streams pulling which defeat the use of clones.

My use case was I wanted to be creative with alerting sending me full quality alerts but using subs for the actual detection however this isn't possible since everything uses subs for image captures if that is enabled so I was like cool, I'll clone the camera and the second one be the action but if I take the sub off the clone I notice the network usage doubles.

So just keep that in mind if anyone clones. I don't think this was intentional but not sure if it will be addressed ever.
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,304
Reaction score
3,282
Location
United Kingdom
I too noticed that unless the clone is setup to use streams identically then it starts to pull separate streams according to the cameras logs.
 

mech

Getting comfortable
Joined
May 18, 2019
Messages
326
Reaction score
427
Location
United States
That would require quite a bit of work on Blue Iris's part. It is already decoding the sub stream so when the trigger happens it can easily just take one of the decoded frames and compress it as jpeg. In order to save a main stream frame as a jpeg, Blue Iris would need to seek back to the previous i-frame in the main stream, decode that, and then decode all the frames from there until the trigger point. This would add a significant resource usage spike at the least (possibly also a lot of new bugs).

I would recommend not configuring the sub stream for any cam where it is going to affect your usability, and in the case of your LPR cam it clearly does.
I had this same question, since I rely pretty heavily on still snapshots at full resolution. I'll have to back out of the substream approach for some of my cameras unless Ken can add this feature (I did send in a support request on the topic). Thankfully, some of my heavy-hitter cameras are generating their snapshots using onboard analytics (Bosch IVA) and can stay on substreams.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,884
Reaction score
48,525
Location
USA
I love the sub-stream addition.

I have a few old analogs I am still running thru a Night Owl DVR. This is the camera setting. Any thoughts on what to put in to get the substream?

1593645985411.png
 

mech

Getting comfortable
Joined
May 18, 2019
Messages
326
Reaction score
427
Location
United States
I love the sub-stream addition.

I have a few old analogs I am still running thru a Night Owl DVR. This is the camera setting. Any thoughts on what to put in to get the substream?

View attachment 65276
A quick Google didn't help me find ideas on this one, but if it's like my old Grandstream analog-to-H264 box, the bitrate is so modest that it's probably negligible. If that's any help :)

As an easy thing to try, try a /9 in the substream box and see if you get the primary stream from camera 9, and then try incrementing that number upwards. If the box has 16 channels, try /17 and see if that happens to be the secondary stream for camera 1, and /18 for secondary on camera 2, etc. From memory, I think that was how my Grandstream converter worked.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,884
Reaction score
48,525
Location
USA
A quick Google didn't help me find ideas on this one, but if it's like my old Grandstream analog-to-H264 box, the bitrate is so modest that it's probably negligible. If that's any help :)

As an easy thing to try, try a /9 in the substream box and see if you get the primary stream from camera 9, and then try incrementing that number upwards. If the box has 16 channels, try /17 and see if that happens to be the secondary stream for camera 1, and /18 for secondary on camera 2, etc. From memory, I think that was how my Grandstream converter worked.
For a second I thought you had it figured out. I did /9 into substream and then got primary stream on the substream. Tried every sequence of number up to 100 (skipping every 12 or so since it is a 16 channel). Then just typed in garbage and the still got the main in the sub. Baffling.

Yeah, I know it won't save much so I haven't made that one a priority, but I do have a few 2MP cams on that thing that I would like to bump down. That substream is addicting lol.
 

MickPB

Getting the hang of it
Joined
Oct 16, 2019
Messages
113
Reaction score
18
Location
Topeka, KS
Has anyone been able to use the alerts from the camera to trigger BI to
create a clip or alert?

Also, is anyone using Home Assistant with teir
Cameras? I’ve got that pretty
Much sorted except the live stream on the iphone. We could
Start a discussion in general group if interested
 

mech

Getting comfortable
Joined
May 18, 2019
Messages
326
Reaction score
427
Location
United States
Has anyone been able to use the alerts from the camera to trigger BI to
create a clip or alert?
I can get BI to trigger from the camera's own analytics on Bosch and Dahua cameras. I haven't gotten my Hikvisions to cooperate yet.

1593701963672.png

This thread is specifically about the new substream features so you will want to set up a new thread for your Home Assistant topic.
 

LopezEL

Getting the hang of it
Joined
Sep 30, 2019
Messages
97
Reaction score
90
Location
SC
My UI3 server keeps crashing the blueiris service when I switch from one camera to another quickly. Is anyone else having this issue? Once it crashes, I have to remote desktop back into the blueiris box and manually restart the service. This started happening when I switched my cameras to substreams.

I did love the CPU usage reduction but when these crashes started happening I removed the substream urls. Restarted the computer and UI3 is still causing the system to crash. I'm on the latest version 5.2.9.20. Should I revert back to 5.2.7.12 since it's the latest "critical or highly stable update?"
 

Attachments

Millstone

Getting the hang of it
Joined
Dec 22, 2014
Messages
105
Reaction score
25
My UI3 server keeps crashing the blueiris service when I switch from one camera to another quickly. Is anyone else having this issue? Once it crashes, I have to remote desktop back into the blueiris box and manually restart the service. This started happening when I switched my cameras to substreams.

I did love the CPU usage reduction but when these crashes started happening I removed the substream urls. Restarted the computer and UI3 is still causing the system to crash. I'm on the latest version 5.2.9.20. Should I revert back to 5.2.7.12 since it's the latest "critical or highly stable update?"
need more info about your camera parameters and the camera 'Configure' screen in BI
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,304
Reaction score
3,282
Location
United Kingdom
Your running the service as local system when with a recent update you were supposed to set it up to use the same user account that you use when you log onto the pc.

Disable the service, close the UI, then re-enable it, it should then prompt for username and password.
 

Millstone

Getting the hang of it
Joined
Dec 22, 2014
Messages
105
Reaction score
25
Your running the service as local system when with a recent update you were supposed to set it up to use the same user account that you use when you log onto the pc.

Disable the service, close the UI, then re-enable it, it should then prompt for username and password.
All of mine run as local system and I don't have that issue
 

LopezEL

Getting the hang of it
Joined
Sep 30, 2019
Messages
97
Reaction score
90
Location
SC
All of mine run as local system and I don't have that issue
I saw a thread about a recent update where some people were locked out. It never happened to me and BI never asked me for any type of password. I thought Ken had fixed the issue in a later update and nothing was needed to be done?

Either way, I went back to version 5.2.7.12 with no substreams and it hasn't crashed at all.
There is definitely a bug in the UI3 communication with Blue Iris somewhere since I can reproduce the crash at will on 5.2.9.20 - With or without using substreams.
 

Millstone

Getting the hang of it
Joined
Dec 22, 2014
Messages
105
Reaction score
25
I saw a thread about a recent update where some people were locked out. It never happened to me and BI never asked me for any type of password. I thought Ken had fixed the issue in a later update and nothing was needed to be done?

Either way, I went back to version 5.2.7.12 with no substreams and it hasn't crashed at all.
There is definitely a bug in the UI3 communication with Blue Iris somewhere I can reproduce the crash at will on the newest BI update. With or without using substreams.
I think the account is really just necessary if you want to write to a network share.
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,304
Reaction score
3,282
Location
United Kingdom
I think the account is really just necessary if you want to write to a network share.
I think the reason it was done was that there were issues in running the engine as local system and then running the UI with your standard user credentials. I remember logging a call and Ken suggested that I try changing this ages before he mandated it and no I don’t write anything to an external NAS.
 

LopezEL

Getting the hang of it
Joined
Sep 30, 2019
Messages
97
Reaction score
90
Location
SC
Your running the service as local system when with a recent update you were supposed to set it up to use the same user account that you use when you log onto the pc.

Disable the service, close the UI, then re-enable it, it should then prompt for username and password.
I just did this. I'll upgrade to the latest BI version again to see if it resolved the crashes and report back.
 

LopezEL

Getting the hang of it
Joined
Sep 30, 2019
Messages
97
Reaction score
90
Location
SC
I just did this. I'll upgrade to the latest BI version again to see if it resolved the crashes and report back.
So far so good. I enabled substreams on all of my cameras except the front door and driveway- those are cloned and sending full resolution pictures to AITool for processing. I've been switching streams on UI3 and haven't had a crash so it seems switching from local system to user account did the trick.
 
Top