Just got 1st cam (5442). Configuration questions. Quicksync, H.265 etc

Warptrooper

Pulling my weight
Joined
Jun 17, 2020
Messages
321
Reaction score
153
Location
Toronto
So I'm tinkering and reading the wiki etc. Some questions:
1) H.264 or H.265 ? I selected H.265, Intel+VPP enabled (Core i3 8100 quadcore) but I don't know if QuickSync is working.
CPU/GPU at 6-8% each if BI is minimized.
20%/10% if viewing the stream in BI.
Cam is set to full resolution and 8Mbps bitrate from web console and 30FPS in BI.

EDIT: Testing VBR with 15 FPS, Quality 6 (best) and max available 6144 Kbps for that framerate. CPU/GPU usage minimized is like 4%. Looking good.

2) Substream yay or nay ?
3) How do I configure the cam itself to record to MicroSD only when motion is detected ?
4) Direct to disk is enabled but it is trial mode. It should be working since it's selected yeah ?
5) Why is Substream on web viewer so squished sideways ?


Thanks for any answers. Also if anyone can please share their 5442 configs it would be appreciated.
 
Last edited:

Kn10

Pulling my weight
Joined
Mar 27, 2020
Messages
103
Reaction score
133
Location
Australia
1) I think GPU-Z can show whether QS is working.
2) Depends on your load. It really helped with people who are running mutliple 4K streams, since you dont need to display 4K when the screen for that cam visual is only 2 inches wide.
I think overall, if your CPU is fine, just leave it off.
3) You set that up in the cams web interface itself, not in Blue Iris.
4) Not sure.
5) Check the substream resolution in the camera, and then the resolution set in Blue Iris. Sounds like they might differ.
 

shalem2014

Getting the hang of it
Joined
Nov 18, 2018
Messages
75
Reaction score
69
Location
Ohio
So I'm tinkering and reading the wiki etc. Some questions:
1) H.264 or H.265 ? I selected H.265, Intel+VPP enabled (Core i3 8100 quadcore) but I don't know if QuickSync is working.
CPU/GPU at 6-8% each if BI is minimized.
20%/10% if viewing the stream in BI.
Cam is set to full resolution and 8Mbps bitrate from web console and 30FPS in BI.

EDIT: Testing VBR with 15 FPS, Quality 6 (best) and max available 6144 Kbps for that framerate. CPU/GPU usage minimized is like 4%. Looking good.

2) Substream yay or nay ?
3) How do I configure the cam itself to record to MicroSD only when motion is detected ?
4) Direct to disk is enabled but it is trial mode. It should be working since it's selected yeah ?
5) Why is Substream on web viewer so squished sideways ?

Oh also CBR or VBR? What max bitrate do you guys usually set. Full 8Mbps? Also Smart Codec on or off ?
As for recording, footage will be recorded to 2x 3TB WD Red drives (2x 4MP cams per drive once I get all 4)

Thanks for any answers. Also if anyone can please share their 5442 configs it would be appreciated.
  1. H.265 would be preferable; you'll get fewer compression artifacts with H.265 plus a lower bitrate. Downside is higher CPU usage to decode.
  2. Wouldn't consider going without it. Can't believe it took until 2020 to get this feature and that it isn't more widespread!
  3. Can be done but I don't have the time to explain here. Dahua's motion detector is worthless however; so you'd be looking into some of the more advanced AI features this camera sports to establish a more useful trigger mechanism on the camera.
  4. Apparently not...
  5. Uh...you must have set it up wrong. It's supposed to detect the correct resolution, and then force the substream to the correct aspect ratio automatically. Try creating the camera anew in Blue Iris. Use the Dahua, *Main Stream RTSP profile, copy Main stream and paste into Sub stream, add a '?', copy Params and add it too, changing subtype=0 to subtype=1 (or 2; whatever sub stream you're using on the camera). Set Audio format to 16-bit PCM, bump the Receive buffer to 20 MB, and click [OK]. The camera window should automatically resize to the correct aspect ratio. You can attempt to manually correct the substream aspect ratio by going to BI's camera settings -> Video -> Image format, and ticking Anamorphic (force size), and selecting the 1280 x 720 size, or manually keying in 854 x 480.
  6. Main Stream, H.265, Smart Codec off, 25 FPS, VBR q=6 (best), max bitrate custom 14000 Kb/s, I-frame 150, SVC off.
  7. Sub stream 1, disabled. Maxes out at VGA resolution, which is too low for me, causing blurry previews in Blue Iris, partially thanks to the camera's poor downscaling quality. Sub stream 2 can do 720p, which is perfect for me and much clearer with the camera's downscaler.
  8. Sub stream 2, H.264H, 1280*720, 25 FPS, VBR q=6 (best), max bitrate custom 6000 Kb/s, I-frame 25, SVC off.
  9. Audio format PCM 48k if available (need latest firmware to access), otherwise AAC 48k (Blue Iris can trick the camera into PCM on AAC, but will use the other poor quality telephone formats if you choose any of them). Always disable the noise filter—it just garbles the sound.
Smart Codec is a great concept, disabling regular key frames, but there isn't a way to get Blue Iris to request a key frame when starting a clip or when a new viewer wants to hop on to the stream. So it's best to leave it disabled and just maximize the key frame interval (I set mine to 150, which is 6 seconds at 25 FPS).
 
Last edited:

Warptrooper

Pulling my weight
Joined
Jun 17, 2020
Messages
321
Reaction score
153
Location
Toronto
  1. H.265 would be preferable. The Dahua cameras H.264 encoder isn't that terrific, so you'll get fewer compression artifacts with H.265 plus a lower bitrate. Downside is higher CPU usage to decode.
  2. Wouldn't consider going without it. Can't believe it took until 2020 to get this feature and that it isn't more widespread!
  3. Can be done but I don't have the time to explain here. Dahua's motion detector is (and has always been) completely worthless however; so you'd be looking into some of the more advanced AI features this camera sports.
  4. Apparently not...
  5. Uh...you must have set it up wrong. It's supposed to detect the correct resolution, and then force the substream to the correct aspect ratio automatically. Try creating the camera anew in Blue Iris. Use the Dahua, *Main Stream RTSP profile, copy Main stream and paste into Sub stream, add a '?', copy Params and add it too, changing subtype=0 to subtype=1 (or 2; whatever sub stream you're using on the camera). Set Audio format to 16-bit PCM, bump the Receive buffer to 20 MB, and click [OK]. The camera window should automatically resize to the correct aspect ratio. You can attempt to manually correct the substream aspect ratio by going to BI's camera settings -> Video -> Image format, and ticking Anamorphic (force size), and selecting the 1280 x 720 size, or manually keying in 854 x 480.
  6. Main Stream, H.265, Smart Codec off, 25 FPS, VBR q=6 (best), max bitrate custom 14000 Kb/s, I-frame 150, SVC off.
  7. Sub stream 1, disabled. Maxes out at VGA resolution, which is too low for me, causing blurry previews in Blue Iris, partially thanks to the camera's poor downscaling quality. Sub stream 2 can do 720p, which is perfect for me and much clearer with the camera's downscaler.
  8. Sub stream 2, H.264H, 1280*720, 25 FPS, VBR q=6 (best), max bitrate custom 4000 Kb/s, I-frame 25, SVC off.
  9. Audio format PCM 48k if available (need latest firmware to access), otherwise AAC 48k (Blue Iris can trick the camera into PCM on AAC, but will use the other poor quality telephone formats if you choose any of them). Always disable the noise filter—it just garbles the sound.
Smart Codec is a great concept, disabling regular key frames, but there isn't a way to get Blue Iris to request a key frame when starting a clip or when a new viewer wants to hop on to the stream. So it's best to leave it disabled and just maximize the key frame interval (I set mine to 150, which is 6 seconds at 25 FPS).
Yeah I made it wrong. Gonna try these settings. I wont have too many cams. Just 4 at max recording on a 8th gen quad core and 2x 3TB harddrives.
Wondering if I even need substream because I am not resource starved at all. Way overkill already for 4 cams.
What resolution do you use for substream?
 

shalem2014

Getting the hang of it
Joined
Nov 18, 2018
Messages
75
Reaction score
69
Location
Ohio
In that case, you might not need substreaming, although it will definitely let your PC run easier. I use 720p on these cameras. You will have to use Sub stream 2 to go that high, however. And you'll have to drop the framerate to 25 so you can match framerates as the camera can't quite encode both streams at 30fps. See #6-8 in my previous post where I shared my 5442 settings.
 

Warptrooper

Pulling my weight
Joined
Jun 17, 2020
Messages
321
Reaction score
153
Location
Toronto
  1. Try creating the camera anew in Blue Iris. Use the Dahua, *Main Stream RTSP profile, copy Main stream and paste into Sub stream, add a '?', copy Params and add it too, changing subtype=0 to subtype=1 (or 2; whatever sub stream you're using on the camera).
This bit confusing me. Params is already empty when it imports main streams field after selecting dahua and entering my user/pw

EDIT: Nvm it changed dahua to generic doh
 

shalem2014

Getting the hang of it
Joined
Nov 18, 2018
Messages
75
Reaction score
69
Location
Ohio
Yeah, that's really confusing. I will be contacting Ken to see if I can convince him to change that. The auto-detect function (which I never use) practically ignores the Params box and puts the entire URL in the Main stream box. I'd like to see them merged just like the Sub stream box. That way they'd be the same and less confusing! Plus enabling the sub stream would be a simple copy/paste and change one number instead of the procedure I wrote out above.

When you're done, you should have Main stream:
/cam/realmonitor
Params:
channel={CAMNO}&subtype=0&authbasic={AUTH64}
Sub stream:
/cam/realmonitor?channel={CAMNO}&subtype=2&authbasic={AUTH64}
 

Warptrooper

Pulling my weight
Joined
Jun 17, 2020
Messages
321
Reaction score
153
Location
Toronto
Yeah, that's really confusing. I will be contacting Ken to see if I can convince him to change that. The auto-detect function (which I never use) practically ignores the Params box and puts the entire URL in the Main stream box. I'd like to see them merged just like the Sub stream box. That way they'd be the same and less confusing! Plus enabling the sub stream would be a simple copy/paste and change one number instead of the procedure I wrote out above.

When you're done, you should have Main stream:
/cam/realmonitor
Params:
channel={CAMNO}&subtype=0&authbasic={AUTH64}
Sub stream:
/cam/realmonitor?channel={CAMNO}&subtype=2&authbasic={AUTH64}
For main stream are you using BI built-in motion detection or some AI ?
 

shalem2014

Getting the hang of it
Joined
Nov 18, 2018
Messages
75
Reaction score
69
Location
Ohio
Just got these cameras a couple weeks back, so I haven't had the opportunity to fully evaluate the new AI features yet. Up until now, I have relied on Blue Iris's motion detector as it does a decent job. If you've enabled sub streaming, BI will use the sub stream for motion detection. In the absence of a sub stream, it will use the main stream for motion detection, which increases CPU usage.
 

Warptrooper

Pulling my weight
Joined
Jun 17, 2020
Messages
321
Reaction score
153
Location
Toronto
Just got these cameras a couple weeks back, so I haven't had the opportunity to fully evaluate the new AI features yet. Up until now, I have relied on Blue Iris's motion detector as it does a decent job. If you've enabled sub streaming, BI will use the sub stream for motion detection. In the absence of a sub stream, it will use the main stream for motion detection, which increases CPU usage.
Any changes to settings in BI Trigger / Record tabs for the camera ? Thanks for all the help.
 

Warptrooper

Pulling my weight
Joined
Jun 17, 2020
Messages
321
Reaction score
153
Location
Toronto
I'm having an issue.

Either it won't record sub-stream and only the motion or it will record everything in high quality mainstream.

I tried Triggered, Continuous, Triggered + Continuous under Record tab in BI

Do I need to clone the cam ? Can't find any other way.
 
Last edited:

Warptrooper

Pulling my weight
Joined
Jun 17, 2020
Messages
321
Reaction score
153
Location
Toronto
Holyshit. Running it as a service.... 2% CPU usage.

TWO PERCENT on a 14Mbps bitrate 20FPS main stream this is crazy lol
 

shalem2014

Getting the hang of it
Joined
Nov 18, 2018
Messages
75
Reaction score
69
Location
Ohio
Any changes to settings in BI Trigger / Record tabs for the camera ? Thanks for all the help.
Well, a lot of that stuff is application specific. In my applications, I am only recording motion events as the majority of the time, nothing is happening. As a result, I need high motion detector accuracy, filtering of false positives, and yet recording long enough to catch everything. My substream trigger settings need adjusted and that is a work still in progress, so I am not sharing all of the numbers here. As a result, my settings are usually something like this:
  1. Increase Break time -> End trigger to 60 seconds. The default is 10 seconds, which cuts the recordings too short most of the time. I wish it had a dynamic break time, where it could go for 60-180 seconds, and then go back and trim the clip to like 30 seconds after the last trigger. And if there was only the initial trigger, delete the clip entirely.
  2. Motion sensor -> [Configure]. I usually drop Min contrast to 26 and up Make time to 1-3 seconds.
  3. Record -> Pre-trigger video buffer, up it to 10 seconds. Between Make time and the key frame interval set on the camera, you'll want to increase this so you always catch the actual beginning of a scene.
  4. Combine or cut video I turn off, as I want each clip/event to have its own file. I imagine this could cause problems for continuous recording...
  5. Video file format and compression, always Blue Iris DVR with FLAC, and Direct-to-disk.
  6. Watchdog... Timeout 10 sec, Delay motion detection 3 sec, Restart camera window yes, after 3 times, Send camera reboot no, Interpret monochrome no, auto-reconnect camera 24 hrs (and then I set the camera to reboot every day at something like 4am).

I'm having an issue.

Either it won't record sub-stream and only the motion or it will record everything in high quality mainstream.

I tried Triggered, Continuous, Triggered + Continuous under Record tab in BI

Do I need to clone the cam ? Can't find any other way.
Yes, that is a unique usage scenario and I believe the only way to achieve it would be cloning. You'd put the sub stream URL in as the main stream on the clone. Actually, might as well do the motion detection over there and just set it to trigger the main stream "clone", while only having the main stream on that one.

Holyshit. Running it as a service.... 2% CPU usage.

TWO PERCENT on a 14Mbps bitrate 20FPS main stream this is crazy lol
Nice! Now if you've got motion detection turned off in BI, that would partially explain the low CPU usage. Note that you can disable the BI motion detector and have it pull the Smart AI events from the camera to trigger recordings too! Also note that CPU usage will spike when viewing the camera. And, if you're using VBR 14 Mb/s like I suggested, most of the time it will run around 5 Mb/s. 14 Mb/s only comes into play when there's lots of activity, which keeps it from getting pixelated and reduces the "key frame flash" phenomenon. It also suggests to the camera that I don't just want "6 (best)" high quality, I want "very high" quality.
 

Warptrooper

Pulling my weight
Joined
Jun 17, 2020
Messages
321
Reaction score
153
Location
Toronto
Well, a lot of that stuff is application specific. In my applications, I am only recording motion events as the majority of the time, nothing is happening. As a result, I need high motion detector accuracy, filtering of false positives, and yet recording long enough to catch everything. My substream trigger settings need adjusted and that is a work still in progress, so I am not sharing all of the numbers here. As a result, my settings are usually something like this:
  1. Increase Break time -> End trigger to 60 seconds. The default is 10 seconds, which cuts the recordings too short most of the time. I wish it had a dynamic break time, where it could go for 60-180 seconds, and then go back and trim the clip to like 30 seconds after the last trigger. And if there was only the initial trigger, delete the clip entirely.
  2. Motion sensor -> [Configure]. I usually drop Min contrast to 26 and up Make time to 1-3 seconds.
  3. Record -> Pre-trigger video buffer, up it to 10 seconds. Between Make time and the key frame interval set on the camera, you'll want to increase this so you always catch the actual beginning of a scene.
  4. Combine or cut video I turn off, as I want each clip/event to have its own file. I imagine this could cause problems for continuous recording...
  5. Video file format and compression, always Blue Iris DVR with FLAC, and Direct-to-disk.
  6. Watchdog... Timeout 10 sec, Delay motion detection 3 sec, Restart camera window yes, after 3 times, Send camera reboot no, Interpret monochrome no, auto-reconnect camera 24 hrs (and then I set the camera to reboot every day at something like 4am).


Yes, that is a unique usage scenario and I believe the only way to achieve it would be cloning. You'd put the sub stream URL in as the main stream on the clone. Actually, might as well do the motion detection over there and just set it to trigger the main stream "clone", while only having the main stream on that one.


Nice! Now if you've got motion detection turned off in BI, that would partially explain the low CPU usage. Note that you can disable the BI motion detector and have it pull the Smart AI events from the camera to trigger recordings too! Also note that CPU usage will spike when viewing the camera. And, if you're using VBR 14 Mb/s like I suggested, most of the time it will run around 5 Mb/s. 14 Mb/s only comes into play when there's lots of activity, which keeps it from getting pixelated and reduces the "key frame flash" phenomenon. It also suggests to the camera that I don't just want "6 (best)" high quality, I want "very high" quality.
I decided not to run a clone since low quality footage is kinda useless and I have tons of space. I have motion detection enabled but its just so I can see motion on the timeline thingy. So 2% running continuous I'm pretty happy with this.

Trying to figure out remote view through my android now.

I don't have vpn or anything but I'm not paranoid. Router upnp/nat-pmp already disabled . Not sure what's the best way to access cams remotely. gDMSS only seems to be working on local Network.
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,572
Reaction score
2,855
Ideally a VPN for remote viewing. Port forwarding at your own peril.
 

shalem2014

Getting the hang of it
Joined
Nov 18, 2018
Messages
75
Reaction score
69
Location
Ohio
I don't have vpn or anything but I'm not paranoid. Router upnp/nat-pmp already disabled . Not sure what's the best way to access cams remotely. gDMSS only seems to be working on local Network.
Good. View remotely through the Blue Iris app on your phone, or Blue Iris's UI3 web interface on your tablet/PC/Mac. Don't forward any IP camera ports as they have backdoors and super passwords and potentially hackable firmware vulnerabilities as well; forward Blue Iris only or use a VPN. If you port forward Blue Iris, don't use port 80, 81 or 8080; use an obscure port number—like 53976.
 
Top