Sub Stream is lowering quality of Main Stream

Jan 31, 2022
10
1
Brooklyn, NY
Hello everyone. First post here. Thanks for having me.

I set up a Sub Stream on a Amcrest PTZ cam. Before I used the Sub stream the Main Stream was very clear. I did several text tests. This issue is showing on both in the single cam live stream and in the recordings. And it clears up when I disable the Sub Stream in BI.

Is it normal to loose this much resolution? Any advice will be appreciated.
 
That is not normal unless you are already using the camera at all it's rated capacity and then when you add one more thing, something gotta give.

What is bitrate, resolution, FPS, camera model, VBR or CBR, codec, I-frames, etc. that you are running?

Are you matching all these parameters main to sub stream. For example if you are running H264 on one and H265 on the other, it could create an issue.

Are you recording continuous or cont+alerts or cont+triggers.

Is the camera running thru the router or is it on a dual NIC or VLAN?

As you can see more info is needed to troubleshoot.

Some screenshots would be helpful as well.
 
  • Like
Reactions: sebastiantombs
Thanks for the response.

Camera is a Amcrest IP2M-866EW

In the camera I have these settings:
Main- H.265; Res: 1920*1080; FR- 30; CBR; Bit rate: 4096
Sub- H.264 (tried 265 as well) ; 640*480; CBR; 15 FPS; Bit Rate: 768

Blue Iris camera settings show:
Main stream ~580kB/s max with motion happening
Sub stream ~100kB/s max with motion

Am recording with triggers.
CPU is staying around 7%; Memory 240 MB
I dont know what I-Frames are.

BI sys Specs:
Optiplex 7040 MT
i5-6500
8GB RAM
New / Storage folder is on a Shucked Easystore 8TB
Everything else on NVMe drive.

Camera is on a Unifi switch
Router is EdgerouterX
Cam and Blue Iris on their own VLAN

Image with Sub Stream on
1.PNG
image with Sub Stream off:
2.PNG

Let me know if you need more info.
 
Thanks for the response.

Camera is a Amcrest IP2M-866EW

In the camera I have these settings:
Main- H.265; Res: 1920*1080; FR- 30; CBR; Bit rate: 4096
Sub- H.264 (tried 265 as well) ; 640*480; CBR; 15 FPS; Bit Rate: 768


Let me know if you need more info.

So first thing is make the main and substream both the same. Most of us here recommend H264. Make sure that you do not have any smart codec on as well. The storage savings is minimal between the two. YMMV.

No reason to run more than 15FPS, and many us have cams running at 10 to 12 FPS. Movies for the big screen are shot at 24FPS, so I do not think we need 30FPS for these cameras LOL. The goal is to get a clean image, not smooth motion.

Iframes may be called frames or something else -on the screen where you set FPS, it will be a number that is probably defaulted as double the FPS.

Keep in mind that these type of cameras, although are spec'd and capable of these various parameters, real world testing by many of us shows if you try to run these units at higher FPS and higher bitrates than needed that you will max out the CPU in the unit and then it bugs out just long enough that you miss something or video is choppy or pixelated or you get lost signals. My car is rated for 6,000RPM redline, but I am not gonna run it in 3rd gear on the highway at 6,000RPM...same with these types of units - gotta keep them under rated capacity. Some may do better than others, but trying to use the rated "spec" of every option available is usually not going to work well, either with a car or a camera or NVR.

Look at all the threads where people came here with a jitter in the video or video dropping signal or IVS missing motion or the SD card doesn't overwrite and they were running 30FPS and when people tell them to drop the FPS and they dropped the FPS to 15FPS the camera became stable and they could actual freeze frame the image to get a clean capture. The goal of these cameras are to capture a perp, not capture smooth motion. When we see the news, are they showing the video or a freeze frame screen shot? Nobody cares if it isn't butter smooth...getting the features to make an ID is the important factor. As always, YMMV...

Further, these types of cameras are not GoPro or Hollywood type cameras that offer slow-mo capabilities and other features. They "offer" 30FPS and 60FPS to appease the general public that thinks that is what they need, but you will not find many of us here running more than 15 FPS; and movies are shot at 24 FPS, so anything above that is a waste of storage space for what these cameras are used for. If 24 FPS works for the big screen, I think 15 FPS is more than enough for phones and tablets and most monitors LOL. Many of my cameras are running at 12FPS.

In fact, many times if a CPU is maxing out, if it doesn't drop signal, then it will adhere to the FPS but then slow the shutter down to try to not max the CPU, which then produces a smooth blurry image..that is the video my neighbor gets who insists on running 60FPS. He gets smooth walking people but you can't freeze frame it cause every frame is a blur, meanwhile my 12FPS gets the clean freeze frame. Shutter speed is more important the FPS. We both run the same shutter speed by the way, but his camera CPU is maxing out and something gotta give when you push it that hard.
 
Ok, I just figured it out. It seems that I wasn't live viewing the full resolution image because I didn't have "Solo selected camera" checked in the right-click menu. It's confusing because I only have one camera connected. (so the image shows large) When I checked that I got a very clear image. Then I looked at the recording and it was still low quality. I then under "Record" tab of Camera settings I deselected "Record dual-streams if available". Again, that helped make the recording look clear.

I don't know why I had that selected anyhow :thumbdown: I think I need a good video guide on how to set things up properly. There are too many videos on youtube lol

I also made all the changes you recommended above and will leave it at 15FPS. Does H.265 help cpu usage if I do add enough cameras to make my usage high?

Thanks again.
 
  • Like
Reactions: bp2008
Glad you figured it out!

The record dual-streams if available isn't doing what you think. What you have it set to record is what is important:

Continuous = records 24/7 in mainstream
Cont+alerts = records substream until alert and then mainstream for alert duration, then back to substream
Cont+triggered=records substream until triggered and then mainstream for alert duration, then back to substream.
Triggered=only records when the camera is triggered.

With the substream option, the H265 versus H264 doesn't do anything to CPU. Folks here run 50 cameras on a 4th generation CPU at 30ish% and another member just reported 18 cams on a 3rd generation at 12% CPU.
 
Very good explanation. Thank you. With my old analog Revo system I was only recording upon motion triggers. This is at a retail business and I really only need that. I would set any motion at all to start the recording. Although that system was rather limited. I'll probably try to keep it on Cont+triggered for now. See how I like it.

So what is the point of the "Record dual-streams if available" do?
 
The "record dual-streams if available" allows you to use the substream to save CPU% and is used for those using Deepstack. It allows mainstream images to be sent to Deepstack for AI identification.

But if you are recording cont+triggers, that doesn't mean that you can see a mainstream outside of the times that the camera wasn't triggered - all you will see is substream until the camera is triggered and then you will see mainstream. So you watch it long enough you will see the video go substream to mainstream back to substream.
 
  • Like
Reactions: sebastiantombs
Got it. I think I'll stick with "When Triggered" as I can't think of a reason to record at other times since this is all indoors. I did install Deepstack since a video I watched recommend it. Although I'm not sure I have any use for it.

If I stick with cont+triggers, does the GUI show me when the events were triggered in the timeline? Or does it just show one continuous timeline since it's recording all the time? This has been very important in the past to find out certain things.
 
Ok, I just tested this. I had it "time out" so it was not longer triggered while still recording. Then i triggered it again and it does show the orange line to let you know of the triggered duration. But I didn't see a difference in video quality as it was supposed to be in sub stream mode. Is there a delay time or something I missed?
 
Yeah, it will show alerts on the timeline if you record 24/7 for the triggers. As well as the thumbnail alerts to the left.

There are pre-trigger times and post-trigger times that it will record before and after motion, so maybe those are set too long or you triggered the camera too quick so the pre-trigger and post trigger overlapped and it didn't go back to substream?
 
So I'm growing more confused about the ability to do continuous recording in low resolution with the sub stream... then when the camera is triggered it switches to the Main stream. I'm not able to do this yet.

Current settings: select "Continuous + Triggered", have no (0.00) "Pre-trigger video buffer", set "End trigger unless re-triggered" to 4 seconds and "Maximum trigger /alert duration" to 4 seconds. I'm not using Alerts.

Then I test by leaving it to record, untriggered for a few minutes. Then I trigger it so it's in a triggered state for the 4 seconds. I then watch the video and the entire thing is in 1080p (main stream). Even the part that's being recorded in an untriggered state.

Other threads are saying you need to have a 2nd camera set up to record the low definition substream. Some are saying do not use Continuous + Trigger but to just use Continuous and it should work as I hoped. Not sure what I'm doing wrong here.

Thoughts?
 
Something isn't right.

You do not need a 2nd camera. Some people will "clone" a camera and record it 24/7 substream, so that is probably what you saw.

Cont will give you 24/7 mainstream. Cont+triggered is what you need.

Have you tried a reboot of the computer? Sometimes when you make a setting change, BI needs to be restarted for it to take effect.

Post screenshots of your BI Camera settings and the associated tabs. It sounds like the substream is also the mainstream or the substream isn't on.

Let's take a look at that first. If all of that is in order, then sometimes a delete of the camera from BI and re-add is in order.
 
Will do. I'm also adding another camera. I'm guessing things will run more "normal" if I have a few cameras going.

Will take some screen shots too.

Also, I just received the Loryta IPC-T2431T-AS 2.8mm from EmpireTech-Andy today. I'd like to upgrade the firmware first thing.

Would it be from here?: IPC-HDW2431T-AS-S2

Called out as: DH_IPC-HX2XXX-Molec_MultiLang_PN_V2.820.0000000.37.R.210901 ?

Current Version:

1643767109806.png
 
As an Amazon Associate IPCamTalk earns from qualifying purchases.
One thing you will find out from most of us is we do not update firmware unless it is fixing a known problem we have. Sometimes it breaks something we had working.

Here are issues I have seen people report here where they were upgrading just for the sake of upgrading:
  • A Dahua Z12E that someone updated and then constantly reboots comes to mind,
  • The Dahua 49225 and 49425 PTZ that loses autotracking with an update come to mind,
  • A Hikvision ANPR camera losing half the FPS and loses the ability to read US plates - those are big deals to have happen.
  • A Hikvision camera that the user lost ability to control the LED light function at night.
  • Countless other instances where the camera simply bricked and became useless.
  • Countless examples where the camera went into Chinese.
Since you haven't used the camera yet, you don't know whether it works for your needs or not LOL.

You can certainly update from the Dahua website as Andy's cameras are legit Dahua OEM and not hacked cameras, but Andy also puts out here the firmware he recommends for the cameras. Sometimes they are newer than what Dahua publishes or sometimes he recommends an older version. Here is the thread on that camera:


 
  • Like
Reactions: SouthernYankee
Right on. I'll hold off on upgrading for now. But that helped me find the latest firmware.

Here's another one for ya. I got the new cam working in Blue Iris. But the Stream Profile Main and Sub paths don't auto populate.

So for camera: Loryta IPC-T2431T-AS-2.8mm what would use for the path? I did a lot of searching for this.

ispyconnect.com doesn't have much for Loryta camers. I'd rather not download a utility to find this.

Thanks

sub setup.PNG
 
WOW - you are getting all the crazy stuff LOL.

So when you hit the find/inspect, you get nothing for main and sub other than / ?

Put this in for the mainstream:

/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif

And the substream:

/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif
 
So I just tried:

Main Stream: /cam/realmonitor?channel=1&subtype=0
1st Sub Stream: /cam/realmonitor?channel=1&subtype=1

This is right from the Sub Stream Guide. So far it seemed to work. General Tab of the Camera settings are now showing Sub Stream activity.

Should I keep this or change it to your recommendation?
 
Ok, I just figured it out. It seems that I wasn't live viewing the full resolution image because I didn't have "Solo selected camera" checked in the right-click menu. It's confusing because I only have one camera connected. (so the image shows large) When I checked that I got a very clear image.

This is a common point of confusion. When a user only has one camera (or a camera group that only contains one camera), then it is not obvious what is going on, whether you're viewing a camera group or a single camera, because it looks so similar both ways.