Ever since I started with the IP camera’s described in my previous posts I’ve been plagued by a problem that the RTSP streams would sometimes show corruption in the lower/bottom part of the picture as shown below:
I attributed this towards either buggy firmware or other problems, but with some excellent support of Genius Vision and some research of my own I believe I have found the root causes for most of these problems. This blog post will explain which problems you might be having and also serve as a guide on how to configure and fix the problem in Genius Vision.
There seem to be two main causes I have found that is causing this problem.
Broken FFMPEG builds:
First there have been builds of FFMPEG which would show this corruption because of a bug that slipped into it’s UDP-RTSP routine. A lot of software uses these routines internally so if you are seeing the same phenomenon in the NVR software you are using, and they have not kept up their version of FFMPEG for a while, they might need to update.
The most interesting links I have been able to find about this are the following:
The problem described on the FFMPEG forum: https://ffmpeg.org/trac/ffmpeg/ticket/285
A forum post for a NVR using FFMPEG internally and showing problems: http://vitamindvideo.com/forums/viewtopic.php?f=3&t=645
A temporary fix is trying to get your stream over TCP and not UDP, but best is to get an updated version of FFMPEG in your software.
update– Since writing this I have come to the conclusion that using FFMPEG will always produce corrupted output with my 5Mpix IP camera. In my observation VLC does not have these problems because they are using the LIVE555 RTSP libraries. The RTSP implementation in FFMPEG has some serious issues handling higher MegaPixel IP cameras. For more information see the following blog post: new method using VLC. The date this article was written is 2013-03-25 and is true for all current builds of FFMPEG.
Not enough packet buffers (Genius Vision guide):
With Genius Vision the problem turned out to not be a bug but an effect of using a MegaPixel IP camera. The software has a default value for the packet buffers and this is too low for MegaPixel cameras and can cause corruption if not adjusted manually. The reason they have the setting as they have it is because they want the software to work reliably with lots of cameras connected and don’t want to waste memory when it’s not needed.
Below I will show in pictures how to add the 5Mpix camera in Genius Vision and how to set the packet buffer to remove the corruption. Although this guide is specific to my camera and Genius Vision the same should apply to any ONVIF or RSTP camera and whatever software you might be using.
I’ll be using the ONVIF method which is now available with the new firmware for the camera as described in my previous blog post.
Genius Vision adding a camera: