What is the likely cause of pixellation?

Forum for questions and support relating to the 1.30.x releases only.
Locked
ckilner
Posts: 25
Joined: Sun Feb 10, 2019 12:05 pm

What is the likely cause of pixellation?

Post by ckilner »

I have 4 cameras connected to a 24 port PoE Gigbit switch. I regularly get pixellated event recordings and I can even sometimes see a splodge or two when viewing them live. Zoneminder is running from a freshly installed Ubuntu 18.10 build on a dedicated i5 PC with 16Gb RAM and 500Gb SSD. The recordings are being made to a Synology DS918+ NAS drive using a NFS share. Both the Synology and the PC are connected to the same Gigbit switch.
Rather a vague question I appreciate, so just looking for some guidance on what sort of thing to look for to isolate the problem.
User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

Re: What is the likely cause of pixellation?

Post by snake »

What model of camera are you using? Has this always been an issue?

The libraries vary between ZM releases, it's possible that 1.32+ will have different performance. I wouldn't jump to updating yet though. 1.30.4 is stable.

What method are you using, Remote, FFMPEG? You can try LibVLC or something different from what you are currently using.

Historically, these issues are camera related, or due to the method / libraries. It's probably not a symptom of the switch, or the computer hardware as long as you have enough CPU and RAM available. Though I can't speak for the NAS. Why did you install 18.10 and not 18.04? The install guides in the wiki document 18.04, which would be advised over 18.10.
ckilner
Posts: 25
Joined: Sun Feb 10, 2019 12:05 pm

Re: What is the likely cause of pixellation?

Post by ckilner »

I have an 1 of Axis, 2 of HandyKam IP cameras and 1 of HikVision Bullet camera. I mainly use the cameras for bird watching so I have the Axis trained on the bird table, 2 mini IP cameras in nestboxes and 1 x HikVision on the front door (my attempt at security).
They are all ffmpeg. I tried libvlc but Zoneminder just gave an error so I guess I didn't configure it correctly.
It all used to work fine but made a rooky error of changing more than one thing at one time. The things I changed:
* Moved storage from local SSD to NFS drive on NAS
* Added a HikVision camera
* Removed a Genie camera
* Physically moved the NAS and the PC next to the Gigabit switch

No particular reason why I installed Ubuntu 18.10. I found this Wiki so I went with it.
https://wiki.zoneminder.com/Ubuntu_Serv ... der_1.30.4

I plan to replace a couple of the network cables over the next day or two to see if that helps. It's a long shot but for a few quid it's worth a try.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: What is the likely cause of pixellation?

Post by bbunge »

Couple of things to try:
lower the resolution
lower the frame rate (do this at the camera)
with ffmpeg use TCP

Your cameras likely support several formats. Try several at the lower frame rate and resolution. Get it working at lower rates then increase the settings. With an i5 and 15 GB RAM you should not be out of space in tmpfs. Run mysqltuner on your database as you may need to give it more resources.

If you want to start over install Ubuntu Bionic and ZM 1.30.4 (18.10 will not be supported for long). See the WIKI for the install procedure. You can also take a backup of your existing 1.30.4 database and import it into the new setup. I manage my server with Webmin which has a lot of tools to keep your system running and up to date.

Or just install a Bionic with 1.32.3.... The support date for that may just outlast your i5...
jwarfin
Posts: 41
Joined: Mon Jul 23, 2018 4:36 am

Re: What is the likely cause of pixellation?

Post by jwarfin »

Pixelation can happen if there are constraints on the stream. For example: relatively high frame rate for the resolution, color depth for a given bitrate. If the bitrate is set too low for the resolution+bit_depth+frame_rate, the encoder will still do its best to comply but pixelation/blocking can result.

In ZM, you can set the bitrate and fps for event viewing in the settings for High, Medium and Low B/W (bandwidth) modes. For example, in my 1.30.4 setup I have WEB_H_VIDEO_BITRATE set at 7500 for Medium B/W and WEB_H_VIDEO_MAXFPS set at 6. High B/W bitrate is set to 30000 (overkill as it's virtually infinite) and for Low B/W it is set to 3000. Medium B/W is what I usually use. My cams are all 1280x720 resolution, 8 bit greyscale.

If the above doesn't help, then:

Many multi-megapixel cams let you set their bitrate and the default settings are sometimes set way too low (like < 1500). If that's the case with your cam(s), experiment raising the bitrate in the cam(s). 3000 would be a good starting point.

As mentioned above, if you're using a relatively high resolution and/or frame rate, try a lowering them. If you're using color streams then using gray scale might be an option (but this would likely be non-optimal for observing wildlife).
ckilner
Posts: 25
Joined: Sun Feb 10, 2019 12:05 pm

Re: What is the likely cause of pixellation?

Post by ckilner »

Thanks bbunge and jwarfin.
It's a rainy day here today so it's a good time to rebuild the PC with Bionic Beaver and 1.32.3
I'll report back.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: What is the likely cause of pixellation?

Post by bbunge »

ckilner wrote: Tue Mar 12, 2019 11:29 am Thanks bbunge and jwarfin.
It's a rainy day here today so it's a good time to rebuild the PC with Bionic Beaver and 1.32.3
I'll report back.
If you are interested I've updated my install script to install Apache2, Mariadb, PHP and Zoneminder 1.32.x

See: https://wiki.zoneminder.com/Ubuntu_Serv ... ell_script
Locked