Troubleshooting Streaming Problems

  • Views Views: 1,547
  • Last updated Last updated:
  • 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:

    1) 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.

    2) 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.

    3) 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.

    4) 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 users of UI3: Firefox has a problem with UI3's HTML5 video player, forcing UI3 to use a 1-second i-frame interval when using that player in Firefox. This is a very common cause of the visual pulsing problem described here. To work around it, choose to use the JavaScript player from within UI3's options or use a different web browser with UI3.

    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

    ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

    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)
    • 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.
Top