<?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/forum/28" />

	<title>Blue Iris</title>
	<subtitle>Blue Iris User Group</subtitle>
	<link href="https://blueirissoftware.com/forum/index.php" />
	<updated>2022-01-10T06:39:21+00:00</updated>

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

		<entry>
		<author><name><![CDATA[varghesesa]]></name></author>
		<updated>2022-01-10T06:39:21+00:00</updated>

		<published>2022-01-10T06:39:21+00:00</published>
		<id>https://blueirissoftware.com/forum/viewtopic.php?p=12043#p12043</id>
		<link href="https://blueirissoftware.com/forum/viewtopic.php?p=12043#p12043"/>
		<title type="html"><![CDATA[Camera streams • Console - Playback]]></title>

					<category term="Camera streams" scheme="https://blueirissoftware.com/forum/viewforum.php?f=28" label="Camera streams"/>
		
		<content type="html" xml:base="https://blueirissoftware.com/forum/viewtopic.php?p=12043#p12043"><![CDATA[
<span style="font-size:150%;line-height:116%"><strong class="text-strong">Introduction</strong></span><div style="margin-left:3em">This article focuses on resolving video quality issues of a camera during playback at the console.  For example, the screen is black when trying to playback a recording.  Once you know the video pipeline, it becomes easy to understand and troubleshoot the issue.  The <a href="viewtopic.php?f=27&amp;t=2049" class="postlink">Camera streams article</a> explains all the video pipelines.<br><br>For playback at the console, the video path is:<br><strong class="text-strong">Video path:  Recording (BVR) -&gt; Decode -&gt; Playback window</strong><br><br>This article explains how to resolve many playback issues by knowing the video pipeline.<br><br></div><span style="font-size:125%;line-height:116%"><strong class="text-strong">Playback Issues</strong></span><div style="margin-left:3em"><strong class="text-strong">Video path for console playback: Recording (BVR) -&gt; Decode -&gt; Playback window.</strong><br><br>The biggest difference between Playback vs Live view is the video source is coming from the recording.  Make sure Live view is working first. <br> Garbage in = Garbage recorded.<br><br>This means the recording format (Re-encode / D2D) comes into play.  This also means the hard drive is also in play since the feed comes from a file recording.<br><br><br><span style="text-decoration:underline"><strong class="text-strong">Gotcha 1: Playback is a black screen.</strong></span><br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2353" class="postimage" alt="playback black screen.png" onclick="viewableArea(this);" /></dt></dl></div><br><strong class="text-strong">Reported issue</strong>: Usual ticket states Live view is fine but playback has a black screen.<br><br><strong class="text-strong">Decode node: Hardware acceleration</strong><div style="margin-left:3em">Starting with the Decode node because easy to test.  HA is frequently the biggest difference between live view and playback.  <div style="margin-left:3em">Live view: Camera feed -&gt; Decode (usually on) -&gt; Console<br>Playback: Recording (BVR file) -&gt; Decode (usually off) -&gt; Console.  <br><br>Keep in mind, D2D recording is very popular due to CPU savings.  Thus the Recording content is often the same content as the Camera feed.  Therefore, the biggest difference between live view and playback is frequently HA.<br><br></div>If live view works, turn HA on/off during playback (select/unselect Also BVR).  Also BVR is unselected by default.  HA works well with steady streams (live view) because the GPU buffer can fill up and the hardware can process frames at a steady rate.  With playback, users can go back and forth in the video using the playback controls.  This use case is not conducive in general for HA so HA is frequently off during playback.  <div style="margin-left:3em">If <strong class="text-strong">Also BVR</strong> is selected test exhaustively.  First, see if playback works at all.  Then test playback by scrubbing back and forth in the recording to make sure playback works fine with Also BVR selected.<br><br></div></div><strong class="text-strong">Record settings</strong><br>Camera settings -&gt; Record tab -&gt; Video file format and compression<div style="margin-left:3em"><br><strong class="text-strong">D2D</strong><br>If your record settings are set to D2D (very popular due to CPU savings), the camera feed is saved directly to disk.  D2D should work with playback if live view works.  <div style="margin-left:3em"><strong class="text-strong">D2D and Key frames</strong><br>If you are recording Direct to Disk (D2D) and the key frame interval is sub-par, e.g. &lt;1, then it is possible the bvr file is open for recording, but no key frames have actually been recorded yet so BI cannot play back.  See <a href="viewtopic.php?f=11&amp;t=2598#Key%20frame%20ratio" class="postlink">Camera setup article -&gt; Key frame section</a> for details.<br><br></div>Changing the encoding settings on the camera affects the contents being saved to the file.  This is how you indirectly fix playback by altering the content being recorded.  See <a href="viewtopic.php?f=22&amp;t=2598#Camera%20settings" class="postlink">camera setup article</a> for ideal encoding settings.<br><br><strong class="text-strong">Re-encode</strong><br>If you cannot get playback working with D2D, then switch to Re-encode.  If playback works, you may take a CPU hit, but at least the recording can be played back on the media player on your server.<br><br></div>The Fix:<br><strong class="text-strong">Change the Recording from D2D to Re-encode</strong>.<br>Camera settings -&gt; Record tab -&gt; Video file format and compression.<br>Create the BVR file using BI software for decoding/encoding instead of saving the camera's video.<br>This will lead to a bump in CPU.  Monitor usage.<br><br><strong class="text-strong">Playback summary</strong><div style="margin-left:3em">The quick fix is to switch from D2D to Re-encode.  This tells BI to save the camera video stream using BI's decoding/encoding.  This almost always works, but you will get the CPU bump.<br>If you want to troubleshoot D2D, the levers to pull are as follow<div style="margin-left:3em">Maybe Also BVR will work.<br>Maybe the key frame issue resolves the problem.<br>Maybe simplifying your camera encoding resolves the problem<br><br><br></div></div></div><span style="font-size:150%;line-height:116%"><strong class="text-strong">Disk issues</strong></span><div style="margin-left:3em">It goes without saying that playback will not work if you have hard disk issues.  Look for <a href="viewtopic.php?f=14&amp;t=2086" class="postlink">Storage and Record errors in the logs</a>.  Another test is to turn the shield to red to stop recordings temporarily.  Click on alerts and see if playbacks start working again.<br><br><br></div><span style="font-size:150%;line-height:116%"><strong class="text-strong">Submitting a ticket</strong></span><div style="margin-left:3em"><strong class="text-strong">Summary</strong><div style="margin-left:3em">Effects of turning Also BVR on/off.<br>Screenshot of camera stats.  Camera settings -&gt; General tab.<br>Server health<div style="margin-left:3em">Confirm any and all errors in the logs were addressed and resolved prior to submitting a ticket.<br><br></div></div><strong class="text-strong">Remote testing</strong><br>If you cannot resolve on your own, put the camera on the WAN for <a href="viewtopic.php?f=15&amp;t=3130" class="postlink">Remote testing</a>.<br><br><br></div><p>Statistics: Posted by <a href="https://blueirissoftware.com/forum/memberlist.php?mode=viewprofile&amp;u=521">varghesesa</a> — Mon Jan 10, 2022 6:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[varghesesa]]></name></author>
		<updated>2022-01-09T23:44:12+00:00</updated>

		<published>2022-01-09T23:44:12+00:00</published>
		<id>https://blueirissoftware.com/forum/viewtopic.php?p=12039#p12039</id>
		<link href="https://blueirissoftware.com/forum/viewtopic.php?p=12039#p12039"/>
		<title type="html"><![CDATA[Camera streams • Console - Live view]]></title>

					<category term="Camera streams" scheme="https://blueirissoftware.com/forum/viewforum.php?f=28" label="Camera streams"/>
		
		<content type="html" xml:base="https://blueirissoftware.com/forum/viewtopic.php?p=12039#p12039"><![CDATA[
<span style="font-size:150%;line-height:116%"><strong class="text-strong">Introduction</strong></span><div style="margin-left:3em"><br>This article focuses on resolving video quality issues of a camera at the console.  This article explains how to resolve many live video issues by knowing the video pipeline.<br><br></div><span style="font-size:150%;line-height:116%"><strong class="text-strong">Warning symbol</strong></span><div style="margin-left:3em"><br>If your camera window has the warning symbol below, <a href="viewtopic.php?f=11&amp;t=2598#Warning%20symbol" class="postlink">please resolve</a>.  This alone may resolve your issue and not requiring proceeding further.<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=2393" class="postimage" alt="fps warning.png" onclick="viewableArea(this);" /></dt></dl></div><br></div></div><strong class="text-strong"><span style="font-size:150%;line-height:116%">Pipeline nodes</span></strong><br><br>If there is no warning symbol, it becomes more challenging how to resolve the issue.  For example the video is choppy when viewing from the console.  <br><br>Once you know the video pipeline, it becomes easy to understand and troubleshoot the issue.  The <a href="viewtopic.php?f=27&amp;t=2049" class="postlink">Camera streams article</a> explains all the video pipelines.  For live view at the console, the video path is:<br><strong class="text-strong">Video path:  Camera video / feed -&gt; Decode -&gt; Console view</strong><br><div style="margin-left:3em"><br><strong class="text-strong">Camera video / feed</strong><br><br>Nothing has a bigger impact on any of the video pipelines than the camera encoding settings.  Garbage in = &lt;uncertainty&gt;<br>We created an entire article for dealing with Cameras, the <a href="viewtopic.php?f=22&amp;t=2598" class="postlink">Camera setup article</a>.  If the live view video has issues, go to the <strong class="text-strong">Camera settings section</strong> and simplify the video encoding so BI has the best shot of interpreting the video.<br><br><strong class="text-strong">Decode</strong><br><br>The <a href="viewtopic.php?f=22&amp;t=2778" class="postlink">Video tab</a> -&gt; <strong class="text-strong">Hardware decode</strong> section deep dives into selecting HA and turning it on/off for cameras.  That being said, I have seen issues with HA on and off.  With it on, there were tickets showing video artifacts (ghost images, discussed further below).  With it off, a user's PC could not handle the load of decoding the camera which resulted in significant delays in the video feed.<br><blockquote class="uncited"><div>I have a camera out of 10 cameras that has lately been consistently delayed on blue iris by a minute or more sometimes.</div></blockquote>I have also seen tickets where users upgraded their gpu graphics card which improved results.  But I do not have the expertise to know when or why the upgrade had a positive affect.  The <a href="viewtopic.php?f=20&amp;t=2463" class="postlink">hardware recommendations article</a> -&gt; <strong class="text-strong">Server Recommendations section</strong> goes into detail about Intel QuickSync via iGPU vs external graphics cards.  In general, a PC with an iGPU (QuickSync) is favored.  I have seen on occasion where a graphics card upgrade (NVidia) did provide improvements as well.<br><br><br></div><span style="font-size:150%;line-height:116%"><strong class="text-strong">Gotchas</strong></span><br><br>This section is learnings from past tickets.  We apply the video pipeline to quickly get to resolution.<br><br><strong class="text-strong">Video artifacts</strong><div style="margin-left:3em"><br><strong class="text-strong">Gotcha 1: Video distortion</strong><div style="margin-left:3em"><br>Reported Issues.  Many, many artifacts/permutations of the same issue.<ul><li>Green bars as seen below.<br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2348" class="postimage" alt="Encoding-HighToBaseline.png" onclick="viewableArea(this);" /></dt></dl></div></li><li>Washed out image<br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2349" class="postimage" alt="console-live-view-artifact.png" onclick="viewableArea(this);" /></dt></dl></div></li></ul><strong class="text-strong">The fix: Camera feed node</strong>  <br>Simplify encoding.  In this case, we changed the camera's encoding from H.264 High to H.264 Baseline.  Alter <a href="viewtopic.php?f=22&amp;t=2598#Camera%20settings" class="postlink">Camera encoding settings</a> until streams work.<br><br></div><strong class="text-strong">Gotcha 2: Ghost images</strong><div style="margin-left:3em"><br>Reported Issue:<br>Ghost images.  See below.<br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2350" class="postimage" alt="ghost.png" onclick="viewableArea(this);" /></dt></dl></div><br>Very common problem.<br><br>Ghost images occur when BI cannot decode the intermediate frames (p-frames / b-frames) coming from the camera.  The image on the left, i.e. the actual scene was in the same mp4 video (video created on phone recording the console, not an mp4 export. to be discussed below) and would flash every 1s which was the key frame.  In the ghost image (intermediate frame) you can kind of make out the mailbox behind the man walking.  FYI, I enlarged the ghost image portion in the second image so you could see the correlation to the original scene.  The image is not to scale.<br><br><strong class="text-strong">The fix: Decode node</strong><br>Turned off hwva.  <br>In this case, the encoding/decoding incompatibility was between the camera and Intel QuickSync.  For some reason, the camera stats were saying the key frame ratio was 30 (mjpeg stream).  It was almost as if the H.265 encoding from the camera was interpreted by the hwva as an mjpeg stream and thus rendering each intermediate frame as if it were a key frame.  When hwva was turned off, the key frame ratio was 1 just as the camera settings show (GOP 1 I-frame / 1s).<br><br>As mentioned earlier, the user used his mobile device to create the video, not exporting to a file in BI.  The user stated when exporting to a file (MP4), the video was fine.  Big clue.<div style="margin-left:3em"><br>The video path for exporting to video is: <br>Read the file (recording) -&gt; Decode -&gt; Encode -&gt; Save to MP4.<br><br></div>I also know the default export setting is to re-encode using BI software.  Thus the decode node for live view was through hwva, but decode during export is through BI software.  A big difference between the two video paths is how decoding is done, so I suspected hwva must be the culprit.  An example of using BI functionality to Isolate the issue.<br><br></div><strong class="text-strong">Live view summary</strong><div style="margin-left:3em"><br>The video pipeline for live view is very basic: Camera feed -&gt; Decode -&gt; Live view.  If your live view quality is poor you only have 3 options.<ul><li>Revisit the camera feed settings:  <a href="viewtopic.php?f=22&amp;t=2598#Camera%20settings" class="postlink">Camera setup article</a> has best practices.  (Fix for Gotcha 1)</li><li>Toggle hwva on/off and see if video improves.  <a href="viewtopic.php?f=22&amp;t=2778" class="postlink">Video tab article</a> discusses hwva and the many other BI server settings affecting streams. (Fix for Gotcha 2)</li><li>If you turned off hwva (above) and the issue was resolved, maybe upgrade drivers or upgrade the graphics card.</li><li>Maybe revisit your <a href="viewtopic.php?f=22&amp;t=2043" class="postlink">connector settings</a>.  Switch from Generic/RTSP driver (Step 2) to a vendor driver (Step 3) and see if it makes a difference.</li></ul>If still an issue, <a href="viewtopic.php?f=21&amp;t=2704" class="postlink">support may need to get involved  and remote test</a>.<br><br></div></div><br><strong class="text-strong">Streaming artifacts</strong><br>These gotchas are more about the video quality being smooth, i.e. not choppy, jittery, lagging etc.<div style="margin-left:3em"><br><strong class="text-strong">Gotcha 1: Choppy streams</strong><div style="margin-left:3em">Choppy streams, i.e. the live view or the playback is not smooth or the seconds on the time overlay are not sequential.  These issues are almost entirely due to camera encoding settings.  If the cameras are speaking Spanish and BI is speaking English, neither party can understand each other resulting in a poor experience.<br><br>Video path: <strong class="text-strong">Camera video</strong> -&gt; Decode -&gt; Console view<br><ul><li>Camera video: Check out the camera stats, Status -&gt; Cameras tab.  The FPS should be at least 15 fps.</li><li>Camera video: Look at the key frame ratio in Camera -&gt; Stats.  Anything less than 0.5 may provide a bad experience.  Set Key frame interval = fps, e.g. 15.</li><li>Revisit <a href="viewtopic.php?f=22&amp;t=2598#Camera%20settings" class="postlink">Camera setup article</a>.</li></ul></div><strong class="text-strong">Gotcha 2: Camera streams lagging or sluggish or high latency</strong><div style="margin-left:3em"><br>Video path: <strong class="text-strong">Camera video</strong> -&gt; <strong class="text-strong">Decode</strong> -&gt; Console view<br><br>Almost always, camera streams are sluggish because BI is not receiving enough key frames (i-frames).  Need to alter encoding settings on the camera.<br>As stated above, key frame ratios less than 0.5 lead to sluggish cameras.<br>Revisit <a href="viewtopic.php?f=22&amp;t=2598#Camera%20settings" class="postlink">Camera setup article</a>.<br><br><br><em class="text-italics">CPU maxed out</em><br><br>The other reason for lagging camera feeds in live view is the cameras are high resolution and the BI server cannot keep up.  If your CPU is running above 80%, it is working too hard.  In my opinion, above 50% is concerning.  My CPU with (4) 2 MP cameras (I know, not much) hovers around 8%.<br><br>See <a href="viewtopic.php?f=20&amp;t=2080#Gotcha%201" class="postlink">CPU Utilization Gotcha</a> for possible fixes.<br><br></div><strong class="text-strong">Gotcha 3: Stuttering at common intervals, e.g. every 1 or 2s.</strong><div style="margin-left:3em"><br>Video path: <strong class="text-strong">Camera video/feed</strong> -&gt; Decode -&gt; Console view<br><br>Camera feed:  Change stream setting from Constant Bit Rate (CBR) to Variable Bit Rate (VBR)<br>Suppose a key frame is sent from the camera every 1s.  If the CBR setting is too low, then the camera needs to perform image optimizations to get the frame across the network. Those optimizations lead to the glitches. So simply changing the camera setting to VBR instead of CBR should resolve the issue. <strong class="text-strong">In general, setting your cameras with VBR is a better user experience. CBR should only be considered if you have network bandwidth issues.</strong><br><br></div><strong class="text-strong">Live view summary</strong><div style="margin-left:3em"><br>Streaming artifacts are often due to camera encoding settings or HA as seen above.  Occasionally, Video tab settings can affect streams.  If the above suggestions do not resolve the issue, revisit the <a href="viewtopic.php?f=22&amp;t=2778#Video%20tab" class="postlink">Video tab article</a>.  Below are settings that generally work.  The highlighted settings are the ones that usually get people in trouble when set or unset to non-default values.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2351" class="postimage" alt="console live view_video settings.png" onclick="viewableArea(this);" /></dt></dl></div><br><br></div></div><span style="font-size:150%;line-height:116%"><strong class="text-strong">Submitting a ticket</strong></span><div style="margin-left:3em"><strong class="text-strong">Remote testing</strong><br>If you cannot resolve on your own, put the camera on the WAN for <a href="viewtopic.php?f=15&amp;t=3130" class="postlink">Remote testing</a>.<br><br><br></div><p>Statistics: Posted by <a href="https://blueirissoftware.com/forum/memberlist.php?mode=viewprofile&amp;u=521">varghesesa</a> — Sun Jan 09, 2022 11:44 pm</p><hr />
]]></content>
	</entry>
	</feed>
