Troubleshooting Streaming Problems
"Pulsing" or "Shifting" video■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
Some people notice their video stream suddenly change quality at a regular interval and describe it as a "pulsing" or "shifting" effect. I have produced a sample video to demonstrate this effect. In this sample, the effect is exaggerated to make it more obvious. In practice, the effect is often much more subtle.
The pulsing effect happens when i-frames in the video stream are encoded at a quality that is so different from the neighboring frames that it causes a noticeable, temporary shift in quality. I-frames usually occur between 1 and 4 seconds apart, though in some cases such as UI3 streaming they can be 10+ seconds apart. In the sample video, the i-frame quality is too low, as is most common when observing this problem. As a result, there is a sudden loss of quality followed by gradual recovery.
How to Solve the Problem
Unfortunately, the quality of i-frames relative to other frames is not something you can directly control, so sometimes it is not possible to fully eliminate the problem. However, it should be possible to greatly reduce the jarring effect by modifying the video encoding settings.
The first thing you need to do is determine where the pulsing quality problem originates, so you know which settings you need to modify. Answer these questions for yourself:
Does the pulsing problem occur when viewing live video in the camera's web interface? (or VLC media player, or another 3rd-party player which connects directly to the camera)
If yes, the problem is in the camera's encoding settings in its web interface.
Does the pulsing problem occur when viewing live video in Blue Iris's local console?
If yes, the problem is in the camera's encoding settings in its web interface.
Does the pulsing problem only occur when viewing a clip recorded by Blue Iris?
If yes, the problem is likely caused by not using "Direct-to-disc" in Blue Iris's recording settings. Open Blue Iris's Camera Properties > Record tab. Click the "Video file format and compression" button. Here is where "Direct-to-disc" can be enabled. However if you must re-encode the video, this panel is where you can configure the re-encoding settings to reduce or eliminate the pulsing problem.
Does the pulsing problem only occur when viewing video through UI3 or a Blue Iris mobile app?
If the problem only occurs when remote viewing through a Blue Iris mobile app, UI3, or default.htm, then the problem is most likely in Blue Iris's streaming settings. Go to Blue Iris Options > Web server tab > Advanced. Here, you can Configure each of 3 streaming profiles. Streaming 0 is the default profile used by the mobile apps and default.htm. UI3 also uses Streaming 0, but UI3 extends Streaming 0 with its own streaming profiles (720p, 1080p, etc.). Each of UI3's streaming profiles overrides the bit rate limit setting from Streaming 0, so to edit bit rates for UI3 you will need to edit UI3's streaming profiles. Learn more about UI3's streaming profiles.
* Note for Firefox
I've found where the problem originates. Now, how do I fix it?
As noted before, it may not be possible to fully eliminate the pulsing/shifting quality problem, but here are some things you can do to improve the situation:
* Increase the bit rate.
The higher the better, but consider any bandwidth or storage constraints you may have.
* Reduce the frame rate.
Fewer frames means you can get away with a lower bit rate and still achieve high quality output. 15 FPS is a common compromise between smoothness and efficiency.
* Increase the i-frame interval (a.k.a. GOP).
The best i-frame interval depends on the purpose of the video stream. If this is for UI3 or a Blue Iris mobile app
(if you answered yes to question #4 above, and you are configuring a Blue Iris/UI3 streaming profile) then set it to 300, which is the maximum allowed by Blue Iris. Otherwise
, I recommend setting it between one and four times the frame rate. E.g. for a 15 FPS stream, set the i-frame interval between 15 and 60. A higher i-frame interval means fewer i-frames, which means the pulsing effect will happen less often. It also allows the camera's video encoder to spread out the relatively high cost of an i-frame across more time, which may help equalize the image quality and reduce the pulsing effect. Beware that a high i-frame interval set in a camera's web interface will affect certain Blue Iris features (direct-to-disc and limit decoding) -- Read more about that in Blue Iris's help file.
* Lower the quality setting.
"Quality" is only an option when your encoding method is "VBR" (Variable Bit Rate). A quality setting that is too high for your chosen bit rate limit may induce the pulsing problem because the bit rate limit can prevent your i-frames from reaching the quality target. Of course, a particularly low quality setting may produce very poor output even if you have increased the bit rate setting by a large amount, so it is best to find a balance.
Important note about the Quality setting in Blue Iris
: Blue Iris's encoding profiles have a Quality setting which goes from 0% to 100%. Many people set this extremely high, such as 90% or 100%, not realizing that this can produce extremely high bit rate video that is difficult to stream over wifi or the internet. I encourage leaving this at 50% (default) unless you really know what you are doing. In Blue Iris, 50% Quality is very good already.
Delayed video can be caused by several things. Some of them are listed here.
- Insufficient network bandwidth (common with wifi cameras)
- Overloaded CPU in Blue Iris PC. (see Optimizing Blue Iris's CPU Usage | IP Cam Talk). Note that a particularly demanding video stream could overload the CPU core it is running on without actually maxing-out the entire CPU, making the problem hard to diagnose. Reducing the frame rate is usually the best fix.
- Using Intel®+VideoPostProc as a hardware acceleration option for more than a few cameras. The VideoPostProc function, also known as "VPP", is very resource-intensive for the integrated graphics processor, and overuse of this function can cause video delay, among other problems. It is recommended to not use the VPP option unless absolutely necessary. NOTE: As of approximately Blue Iris 5.2.5, "VPP" behavior has changed such that the previous advice is no longer valid.
There are many different kinds of video corruption you might experience, and many different solutions.
Many of the possible corruption problems are caused in some way by Intel hardware accelerated video decoding. A possible way to mitigate these issues is to go to advanced power settings
> Intel Graphics Power Plan
and set it to Maximum Performance
Here is advice for dealing with specific types of video corruption:
Video skipping or dropping frames
When the system is unable to process all the incoming video in realtime, it may attempt to keep up by dropping some frames. This causes the video to stutter and can in some cases cause visible corruption which lasts up to several seconds. If you have this problem, check resource usage (CPU, Memory, GPU usage, Network, etc) to ensure that nothing is being overloaded. Note that a particularly demanding video stream could overload the CPU core it is running on without actually maxing-out the entire CPU, making the problem hard to diagnose. Reducing the frame rate is usually the best fix.
Moving objects leaving trails (ghosting)
Depending on the severity of the effect, it could be caused by dropped frames (see above) or simply by your camera settings. Particularly if the effect only happens in low light, it could be the result of using too strong of WDR or 3D NR (noise reduction) in the camera's web interface.
If you sometimes see rainbow corruption like this, the most common cause is Intel hardware acceleration. A temporary fix is to restart the video stream (in Blue Iris, right-click and choose Restart camera
). If this corruption is persistent, you may need to disable Intel hardware acceleration entirely. You could also try setting Intel Graphics Power Plan
to Maximum Performance
as described at the beginning of this section, although I doubt it will help.
This type of corruption normally does not affect recordings, only live viewing (as long as you record with direct-to-disc
). However it also wrecks motion detection and thumbnail creation, making it a nuisance.