IP Camera lower part of image missing / streaked

Forum for questions and support relating to the 1.26.x releases only.
Locked
AnotherBrian
Posts: 112
Joined: Tue Jul 27, 2010 6:36 am

IP Camera lower part of image missing / streaked

Post by AnotherBrian »

When I watch video on an IP camera using the manufacturer's supplied software, the video looks fine over a wide range of camera video settings.
When I do the same on zoneminder, I get the following images intermittently depending on the camera's video settings:

Image

Changing the following settings in relation to other settings tends to elminate the problem.

The following tends to correct the issue:
  • Lowering I Frame Interval (10 down to 8 )
    Lowering Max BitRate (2048 to 1024 to 512)
    Lowering Image Resolution (e.g., 1920x1080 to 1280x720)
    Lowering Image Quality (Higher, Medium, Lower)
    Changing the Frame Rate does not seem to have an effect.
Setting I Frame Interval from 8 to 10 on 1920x1080 medium quality will trigger the streaking.
The streaking occurs without an indication of an issue in the zoneminder log, then later this message occured
zms 8078 ERR Frame send time 653 msec too slow, throttling maxfps to 1.48.
and later followed by this message
zma_m6 7498 INF HighDefinitoin: 175000 - Processing at 8.00 fps

Changing quality to Higher requires Max BitRate to be set to 1024 or 512).

The zoneminder source type is set to ffmpeg. Camera is Hikvision 2032.
AnotherBrian
Posts: 112
Joined: Tue Jul 27, 2010 6:36 am

Re: IP Camera lower part of image missing / streaked

Post by AnotherBrian »

Played around with this some more.
The image above was obtained from amd phenom II x4 955 machine with a Kodicom analog camera converter card.
Using an intel i5 machine with no kodicom it has a less of a problem but still not equivalent to using hikvision supplied software with a vlc plugin.
However, using the intel 5 machine as a wireless zoneminder server makes it worst.
To further isolate the differences I wanted to get streams up and running with ffmpeg but that isn't within the repositories of ubuntu 14.04.
AnotherBrian
Posts: 112
Joined: Tue Jul 27, 2010 6:36 am

Re: IP Camera lower part of image missing / streaked

Post by AnotherBrian »

Noticed that zoneminder allows serveral options to be set related to ffmpeg.
Noticed that vlc has no problems displaying the video streams.
Perhaps if I can determine the ffmpeg options used by vlc, they might be useful to use.
Example: FFMPEG_INPUT_OPTIONS
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: IP Camera lower part of image missing / streaked

Post by bbunge »

You can use the ffmpeg option on Ubuntu 14.04 and it will work. Yes, ffmpeg is not on the distro but it does work with h.264 cameras. I have a Foscam h.264 working just fine. If you are using rtsp try to force TCP with the ?tcp option at the end of your camera string. Also lookk for a setting called key frame interval in your camera settings and set it to a lower (more often) value. If you go up to ZM 1.27 you can try the VLC option but I had problems with it streaming in mocord mode.

Here is a link to some settings for your camera:
http://www.zoneminder.com/wiki/index.php/Hikvision
AnotherBrian
Posts: 112
Joined: Tue Jul 27, 2010 6:36 am

Re: IP Camera lower part of image missing / streaked

Post by AnotherBrian »

On a website found this for mjpeg which did not work for me:

http://IPADDRESS:554/videostream.cgi?ra ... =[PASSWORD]

I attempted using source_type=remote and then a variety of settings starting with remote_protocal=http, etc but never got it to work.

I had been using this:

source_type=ffmpeg
source_path=
rtsp://<userid>:password>@192.168.1.64:554/Streaming/Channels/1?tcp

So made this mix of the two that works good enough:

source_type=ffmpeg
source_path=
rtsp://<userid>:<password>@192.168.1.64:554/videostream.cgi?rate=0

And I set i Frame Interval to 1 on the camera (which I assume means zero compression).

vlc appears to be buiit upon ffmpeg as is zoneminder. So I was hoping to figure out why I get prefect vlc video but not with zoneminder.
My goal then was to discover the options that can be set in zoneminder via FFMPEG_INPUT_OPTIONS and FFMPEG_OUTPUT_OPTIONS that will simulate whatever vlc is doing.

Its working good enough for me now so won't be spending more time on this but I'd be curious whats going on here.

Thanks for replying - I was aware of the settings you pointed out. Glad to hear there is a vlc option coming in the future.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: IP Camera lower part of image missing / streaked

Post by bbunge »

You are welcome. Us retired folks enjoy playing...err "working" with computer problems! Can't solve everything, though..

I'm running one Vivotek IP8331 outdoor camera that works with ffmpeg and H.264 but throws streaked images every several minutes. I have turned the settings down to a bare minimum to try to get it to stop streaking with no luck yet. It is on a WIFI bridge with three other cameras so it may be a bandwidth issue. Some day I'll pull CAT5e to the cameras and eliminate bridge. It does work best on mjpg stream for now. I have a Foscam running on ffmpeg and H.264 and it has no problems. It is a newer camera with up to date firmware which may help.
When you are ready to try the 1.27.99 from the iconnor PPA I can post a current how to the easy way for you. bb
damned_virus
Posts: 3
Joined: Wed Oct 15, 2014 10:44 am

Re: IP Camera lower part of image missing / streaked

Post by damned_virus »

I have the same camera, same problem. Bandwidth does not appear to be the issue as I have my camera wired into my core switch and machine "grunt" doesn't appear to be the issue either as I have a dell poweredge R410 server running zoneminder.

I am looking into it, but not much joy at the moment.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: IP Camera lower part of image missing / streaked

Post by bbunge »

Looking at the online manual for Hikvision 2032 camera does not give me a great deal of information. My guess is to get into the video settings and configure stream three for video only, 640x480 resolution (or something low like that), variable bitrate, frame rate of 5, max bitrate set to something low, video encoding to mjpeg, and if needed pick a low iframe interval.

ZM settings: remote, modect, rtsp and enter your ip address, port (554) and path to the stream 3 as well as the resolution you selected. May also work with http and port 80.

Try several settings but use video only with low setting values. Get it to work then push things up if needed.

bb
AnotherBrian
Posts: 112
Joined: Tue Jul 27, 2010 6:36 am

Re: IP Camera lower part of image missing / streaked

Post by AnotherBrian »

I got it to work by upgrading to zoneminder 1.27 and using sourch type vlc (actually Libvlc).
The upgrade procedure described for ubuntu 12 and 13 works for unbuntu 14:
http://www.zoneminder.com/wiki/index.ph ... e_easy_way

The official zoneminder hikvision configuration has a typo. It states
(example: rtsp://admin:12345@mycamera.mydomain.com//Streaming/Channels/1)

Instead it should be
rtsp://admin:12345@mycamera.mydomain.com//Streaming/Channels/1?tcp

I could run 5 cameras simultaneously at any resolution 1280x720, 1920x1020, 2048x1536.
At 1920x1080 each cpu on the quad system was running at 90 percent and zoneminder claimed the load was at around 6.
Locked