<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://blueirissoftware.com/forum/app.php/feed/topic/2598" />

	<title>Blue Iris</title>
	<subtitle>Blue Iris User Group</subtitle>
	<link href="https://blueirissoftware.com/forum/index.php" />
	<updated>2021-09-17T21:36:29+00:00</updated>

	<author><name><![CDATA[Blue Iris]]></name></author>
	<id>https://blueirissoftware.com/forum/app.php/feed/topic/2598</id>

		<entry>
		<author><name><![CDATA[varghesesa]]></name></author>
		<updated>2021-09-17T21:36:29+00:00</updated>

		<published>2021-09-17T21:36:29+00:00</published>
		<id>https://blueirissoftware.com/forum/viewtopic.php?p=10297#p10297</id>
		<link href="https://blueirissoftware.com/forum/viewtopic.php?p=10297#p10297"/>
		<title type="html"><![CDATA[Camera setup]]></title>

		
		<content type="html" xml:base="https://blueirissoftware.com/forum/viewtopic.php?p=10297#p10297"><![CDATA[
<span style="font-size:150%;line-height:116%"><strong class="text-strong">Introduction</strong></span><br><br>This article is about the proper camera settings ON the camera in order to work well with BI.<br>There is nothing more frustrating than NOT being able to connect your cameras.<br><br>BI can only connect to equipment that supports the ONVIF protocol and/or standard video streaming formats such as RTSP, RTMP, MJPEG and JPEG.<br><br><br><span style="font-size:150%;line-height:116%"><strong class="text-strong"><a name="Network setup">Network setup</a></strong></span><br><br>This section is about getting a new camera connected to the network and understanding the ports available on the camera in order to connect BI.  This section also explains some common gotchas with cameras and extracting important ONVIF information.<br><br>The point of this section is to understand the camera well enough so that connecting the camera to BI will go without issues.  If you are seeking general guidance on how to connect IP cameras to a network or setup a surveillance network, you will need to do your own research on the internet.  Alternatively, speak with your local experts at Managed IT firms or Video Surveillance firms.  We are software engineers with expertise in only connecting your network camera to BI.<br><br><strong class="text-strong">NVR / DVR</strong><br><a href="viewtopic.php?f=22&amp;t=2043#Step%205" class="postlink">Details on connecting an NVR/DVR</a>.<br><br><strong class="text-strong">Cameras</strong><br>BI supports the RTSP and ONVIF standards to get access to your cameras.  This section is about BI considerations when connecting a new camera to the network.  A large part of this section is about gathering the information needed for the connector article as well as maximizing the opportunity to pull ONVIF information if available on the camera.  <br><br>If you are seeking guidance on troubleshooting a camera that does not connect any longer, there are two approaches:<ul><li>Error message: If the camera window shares an error code go to the <a href="viewtopic.php?f=15&amp;t=2773" class="postlink">Camera Errors article</a> for guidance.</li><li>No signal error: The No signal error can have many causes.  The <a href="viewtopic.php?f=15&amp;t=2484" class="postlink">No Signal Error article</a> documents known issues and fixes.</li></ul><div style="margin-left:3em"><br><strong class="text-strong"><a name="Network connectivity">Network connectivity</a></strong><br>The easiest way to connect cameras to the network is to follow the manufacturer's installation instructions.  Below are ways to confirm whether the cameras are connected properly:<div style="margin-left:3em"><br><strong class="text-strong">Camera app</strong><br>Many cameras come with an app.  Follow the manufacturer instructions to connect your camera to your phone/app.  If the camera is connected to the network properly, then the app should work and you should be able to see the video from the camera.<br>The app will often provide the key information needed to connect BI to a camera.<br><br><strong class="text-strong">Camera - Web interface</strong><br>Try to login to the camera using the camera's web interface.  You need to know the camera's IP address.  You may need to use the techniques below to get the information needed to login.<div style="margin-left:3em"><br>Login to your router and identify all the cameras that are connected to the network.  Note their IP Addresses.<br><br>Use <a href="viewtopic.php?f=14&amp;t=2800#Advanced%20Port%20Scanner" class="postlink">Advanced Port Scanner</a> to identify all cameras on your network.  <br>Note the IP Address and ports available on each camera.</div><br>To login simply type the IP Address into the browser window.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2080" class="postimage" alt="connector_camera ip.png" onclick="viewableArea(this);" /></dt></dl></div><br>The camera's login page should appear.  If the browser times out you either have the wrong IP address, port number or the camera does NOT have a web interface.  <br><br>Foscam is an example of a vendor that uses port 88 commonly for the web interface.  Know your cameras.<br>If the camera has other ports available (Advanced Port Scanner) try those ports as well.<br>Simply type in the browser window &lt;ip address&gt;:&lt;port number&gt;, e.g. 10.0.0.7:8080.<br><br>Alternatively, if you already tried connecting the camera to BI, go to Camera settings -&gt; Video tab.  Select the URL link.  If the URL opens in a browser with the login screen for the camera, then you know the IP address is correct.  If the camera home screen appears after attempting login with username/password, then you have confirmed the username/password are correct.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2119" class="postimage" alt="CheckIP.png" onclick="viewableArea(this);" /></dt></dl></div><br><br></div><strong class="text-strong">No web interface</strong><br>If the camera does not have a web interface, this often means the camera is not open for 3rd party integration and can only be accessible via the proprietary phone app provided by the vendor.  This may be a good time to approach the camera vendor and ask how to connect the camera to 3rd party VMS systems using RTSP. One user asked how to connect the camera to VLC. After much prying, the vendor finally gave up the information. Camera vendors would prefer you use their software and lock you into their ecosystem.  <br><br><strong class="text-strong">RTSP or other video formats</strong><br>Leverage 3rd party players such as <a href="viewtopic.php?f=22&amp;t=2043#Step%204" class="postlink">VLC to connect to the camera</a>.  If VLC cannot connect, more likely than not, BI will not be able to do so either.<br><br>Some vendors may still provide access to the RTSP port to pull the video stream.  TP Link is one such vendor that has a proprietary app interface, yet still provides RTSP access to the video stream.  If the camera has a web interface, the RTSP port may be shared.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2466" class="postimage" alt="camera setup_rtsp port.png" onclick="viewableArea(this);" /></dt></dl></div><br></div><br><strong class="text-strong">Summary of key camera settings needed to connect cameras to BI</strong><ul><li>IP address</li><li>Username</li><li>Password</li><li>Web, RTSP and ONVIF ports.<br>Keep in mind some cameras provide no port access.  Completely closed to third party access, e.g. Ring, Arlo etc.<br>As little as an RTSP port, i.e. access to the video ONLY may be shared.</li></ul><strong class="text-strong">Ports</strong><br><br>BI ideally works with three channels of communication with a camera.<div style="margin-left:3em"><span style="text-decoration:underline">Port 80</span><br>The default web port for all internet devices is often the port used by cameras to access the web interface as well.<br>Keep in mind many camera vendors use Port 80 to relay ONVIF information as well.  By default, BI will check for ONVIF support on Port 80.<br>Also keep in mind, vendors can use another port for the web interface.  For example, Foscam uses port 88 for the web interface.  Know your cameras.<br><br><span style="text-decoration:underline">Port 554</span><br>Port 554 is the default RTSP port.  This is the port to access the video stream assuming the camera allows 3rd party access.<br>If the camera uses another port for the video stream for heightened security, often the camera provides the port information via ONVIF.<br>Sometimes you may need to review the camera documentation and/or reach out to the vendor.<br><br><span style="text-decoration:underline">Port 8999</span><br>If cameras choose NOT to convey ONVIF information via port 80, they often choose port 8999 which is also checked by BI by default.<br><br><strong class="text-strong"><a name="ONVIF Gotchas">ONVIF Gotchas</a></strong><br><br><strong class="text-strong">ONVIF Gotcha 1</strong><br>KNOW your camera.  If the camera states ONVIF support, but when hitting Find/Inspect, you do not see rich ONVIF information being pulled from the camera (<a href="viewtopic.php?f=22&amp;t=2043#ONVIF" class="postlink">ONVIF section</a> below has details), then you have not established an ONVIF connection.  Below is a camera that happens to use port 8080 as the default ONVIF port.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2081" class="postimage" alt="onvif settings.png" onclick="viewableArea(this);" /></dt></dl></div>If you do not change the Discovery/ONVIF value in the IP Config Dialog from the default 8999 to 8080, BI will not know how to connect to the camera and pull the ONVIF information.<br><br>Another user had a camera that had ONVIF on port 8120.  Ironically, he discovered the ONVIF port and successfully connected to the camera using ONVIF Device Manager (ODM).  <br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2082" class="postimage" alt="ODM port 8120.png" onclick="viewableArea(this);" /></dt></dl></div><br>Ironically he did not tell BI, ONVIF was available on port 8120 and thus BI could not connect until he changed the IP Config Dialog.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2083" class="postimage" alt="onvif 8120.png" onclick="viewableArea(this);" /></dt></dl></div><br><br><strong class="text-strong">ONVIF Gotcha 2</strong><br>It turns out camera vendors are adding another layer of security to their ONVIF controls.  The ONVIF ports may be open by default.  However, the amount of information available through the port can be limited until security permissions are set on the camera.  In the Hikvision example below, access to the ONVIF capabilities were limited until we added the user account used by BI into the ONVIF user list with admin privileges.<br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2084" class="postimage" alt="ONVIF-gotcha.png" onclick="viewableArea(this);" /></dt></dl></div><br><strong class="text-strong">Axis cameras</strong> also have this functionality.  The username/password placed in BI needs to be an ONVIF account in order to pull in the ONVIF features.<br><br><br></div><strong class="text-strong"><br>At this point, you should know the key information needed to connect cameras to BI.</strong><ul><li><strong class="text-strong">IP Address</strong></li><li><strong class="text-strong">Username</strong></li><li><strong class="text-strong">Password</strong></li><li><strong class="text-strong">Web, RTSP and ONVIF ports (if available)</strong></li></ul><strong class="text-strong"><br></strong><br><br><strong class="text-strong">Camera vendors</strong><br>This section documents quirks associated with specific camera vendors.<div style="margin-left:3em"><br><strong class="text-strong">Reolink</strong><br>99% of cameras only support the RTSP protocol.  On occasion, a vendor will support RTSP and RTMP.  Reolink is one such vendor and the RTMP protocol seems to provide a healthier stream.<br>Checkout the <a href="viewtopic.php?f=22&amp;t=2807" class="postlink">Reolink Gotchas article</a> for best practices on connecting Reolink cameras.<br><br><a href="viewtopic.php?f=22&amp;t=2806" class="postlink">Other vendors</a>.  (work in progress)</div><br><br><span style="font-size:150%;line-height:116%"><strong class="text-strong"><a name="Camera settings">Camera settings</a></strong></span><br><br>This section is about camera video settings that can affect BI.  Setting the encoding and fps etc is critical to attaining a good live view in BI. <br><br>Below are the most common camera settings that can affect the video quality seen in Blue Iris.  Think of these settings as levers on the camera (NOT BI) that can be adjusted to provide the optimal video stream.<ul><li>H.264 vs H.265</li><li>H.264/265 Encoding Profiles: Baseline, Main, High etc</li><li>FPS</li><li>Key frame interval</li></ul>Below are the recommended settings when first connecting a camera or when having problems connecting a camera.  Start off with the easiest settings to give BI a chance to connect.  Optimize afterwards.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1747" class="postimage" alt="simple encoding settings.png" onclick="viewableArea(this);" /></dt></dl></div><br><strong class="text-strong">Camera encoding</strong><div style="margin-left:3em"><br><strong class="text-strong">BI only works with the H.264 and H.265 standards.</strong>  Camera manufacturers have tweaked their encoding to optimize bandwidth for their apps.  H.264+, H.265+ (note the + sign) Smart Codec etc are all proprietary encodings that can only be used by the vendor apps.  <strong class="text-strong">When customers report the cameras work on their app but not in BI, the encoding is often times the reason.  The No Signal Error is almost always due to the fact that the cameras are using a proprietary encoding.</strong><br><br>Also best to start with H.264 encoding before moving to H.265.  Also, choose H.264 Main/Baseline instead of High if given the choice.  Provide BI the easiest connection available first and increase the complexity if and when needed.  <br><br>Older Intel CPUs (before Skylake) with QuickSync do NOT have H.265 support.  If the camera is set to H.265 encoding and your QuickSync does not support H.265, the Server may crash.  See <a href="viewtopic.php?f=20&amp;t=2463#Server%20Recommendations" class="postlink">Hardware Recommendations article</a> for details.<br>In order to get the server running again, you may need to turn off HA in the registry.  <a href="viewtopic.php?f=14&amp;t=2052#Hardware%20acceleration" class="postlink">See details</a>.<br><br><br></div><strong class="text-strong">FPS</strong><div style="margin-left:3em"><br>Keep settings simple such that all the streams have the same FPS.  Choosing between 30 fps or 15 fps is a user preference.  <strong class="text-strong">For most surveillance situations, 10 - 15 fps is plenty good.</strong>  <br><strong class="text-strong">Setting all streams to have the same fps makes time reconciliation easier for BI.</strong>  Turns out certain vendors like Hikvision set different fps (10, 15) for different streams.  Different fps settings unnecessarily complicate playback synchronization with dual streams.  <br><br></div><strong class="text-strong"><a name="Key frame ratio">Key frame ratio</a></strong><div style="margin-left:3em"><br>A key frame ratio &gt;0.5, ideally 1.0 leads to a healthy video stream that delivers a good user experience.  BI will tell you the key frame ratio.  In this example, all the camera key frame ratios = 0.1<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1748" class="postimage" alt="low key frames.png" onclick="viewableArea(this);" /></dt></dl></div><br>Rule of thumb:  <strong class="text-strong">Make sure the key frame (i-frame) interval on your camera equals the FPS for the camera</strong>.  This will deliver a key frame ratio equal to 1.0.<br><br>The setting on the camera is often referred to as <strong class="text-strong">i-frame interval or key frame interval</strong>.  On more technical cameras, e.g. Axis, the setting is referred to as <strong class="text-strong">GOP (group of pictures)</strong>.  GOP means how many compressed frames are allowed before the next key frame (full frame).<br><br><br>Examples:<ul><li>Camera fps = 30.  key frame interval = 30 (1.0 fps).  Can consider key frame interval as high as = 60 (0.5 fps)</li><li>Camera fps = 15.  key frame interval = 15 (1.0 fps).  Can consider key frame interval as high as = 30 (0.5 fps)</li></ul>Every camera vendor has a different UI.  However, observe the default settings for the i-frame interval for each of the streams for the camera vendor (below).  All the streams are 15 fps.  However the i-frame interval is 30/60/120!  The only setting that may provide an ok user experience is the main stream.  If dual streams are connected, the live view will probably be choppy, slow, sluggish!  The i-frame interval for the two streams chosen to be used by BI for below example needs to be lowered to 15.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1749" class="postimage" alt="key-frame-sample_optimized.png" onclick="viewableArea(this);" /></dt></dl></div><br>FYI, not all cameras allow the ability to set key frame intervals.  Reolinks for example do not allow so for sub streams.  Key frame ratios for sub streams will be 0.25.  You can choose to disable sub streams if your server can handle the load.  If not, you can compensate for low key frame ratios with larger pre-trigger buffers as stated below.<br><br><span style="text-decoration:underline">Pre-trigger buffer</span><br><br>This topic is discussed in the <a href="viewtopic.php?f=11&amp;t=2305#Record%20format" class="postlink">Record tab</a> article because it's a recording setting.  However, the Pre-trigger buffer goes hand in hand with the key frame ratio so placed here as well.  Because D2D has become such a popular record setting (CPU savings), if the pre-trigger buffer is not set correctly based on the camera's key frame ratio, lots of issues may occur.  <div style="margin-left:3em"><br>For example, users may want a high-res jpeg of the alert image.  If the key frame / pre-trigger buffer are not set correctly, when BI requests the corresponding main stream frame which is only available in the pre-trigger buffer, the frame may not be available because the pre-trigger buffer does not have a key frame.  BI then generates an image from the sub stream.  Better something than nothing.<br><br>Another example is alert playback is sometimes a black screen.  This often means there was no key frame available in the alert recording.<br><br></div>Largely set based on user preference (5s is recommended).  Rule of thumb:<br>Pre-trigger buffer &gt;= 1/key frame ratio<br>For example, if the camera stats state 0.5 for the key frame ratio, 1/0.5 = 2s.  The pre-trigger buffer for the camera should be &gt;= 2s.  Or just use a default 5s pre-trigger buffer for all cameras and increase if you cannot control the key frame interval on the camera and it is really low.<br><br> <img class="smilies" src="https://blueirissoftware.com/forum/images/smilies/icon_idea.gif" width="15" height="17" alt=":idea:" title="Idea"> Creating healthy streams by setting the key frame ratio (&gt;0.5) and a correct pre-trigger buffer removes so many issues. <ul><li>Users have noted missed triggers.</li><li>Users have noted no recordings (0s recordings) for their alerts.</li><li>Email alerts have black image attachments.</li><li>Email alerts have images from wrong earlier alerts.</li></ul>The reason having the right key frame ratio and pre-trigger buffer is so critical is because not doing so, results in BI not having the desired frames when needed.  If the frame does not exist, bugs pop up!<br><br></div><strong class="text-strong"><a name="Warning symbol">Warning symbol</a></strong><div style="margin-left:3em"><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1750" class="postimage" alt="fps warning.png" onclick="viewableArea(this);" /></dt></dl></div><br>While just a warning symbol, i.e. BI will stream the video, this can have very adverse affects.  This warning is a clue that some of your camera settings (above) are not working well with BI.  If you are receiving these warnings recently, it is because we are now also monitoring key frame ratios when the setting has an affect on your configuration, like direct to disc or limit decoding.  The warning symbol appears if the key frame ratios drops below 0.4.<br><br>Fix: Revisit your <a href="viewtopic.php?f=22&amp;t=2598#Camera%20settings" class="postlink">camera encoding settings</a>, especially the Key frame ratio section right above!<br><br>Reolink known issue:  The sub stream for Reolinks often run at 0.25 kfps and the key frame interval is not configurable.  Sub streams are a huge benefit for CPU load.  So overall, if the video is not choppy, lagging etc, we recommend using sub streams.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1769" class="postimage" alt="camera settings kfps.png" onclick="viewableArea(this);" /></dt></dl></div><br><br>From Help file:<br><blockquote class="uncited"><div>The Log page in Status contains one or more warning messages or one or more<br>cameras has an error condition or warning, such as low frame rate or a push<br>webcasting error.</div></blockquote>Historically, the warning message was frequently due to the camera's FPS.  BI constantly measures the fps of your cameras.  At a peak time maybe the camera was sending 15 fps.  Maybe because of network congestion etc. the fps for that camera temporarily dropped to 2 fps.  The warning message would pop up.  Unless you observe persistent frozen cameras or lagging cameras, the issue resolved itself and you can ignore.  BI will display this warning when the FPS is 15% of the observed actual <em class="text-italics">max frame rate</em>.<br><br><br></div><p>Statistics: Posted by <a href="https://blueirissoftware.com/forum/memberlist.php?mode=viewprofile&amp;u=521">varghesesa</a> — Fri Sep 17, 2021 9:36 pm</p><hr />
]]></content>
	</entry>
	</feed>
