issues getting same quality as from source

Forum for questions and support relating to the 1.30.x releases only.
Locked
lbm
Posts: 87
Joined: Mon Mar 26, 2018 7:44 pm

issues getting same quality as from source

Post by lbm »

Hi,
When a recording is made with zoneminder, the video is kinda laggy and "smudgy". Is it any way possible to get the same quality and smoothness as from the original source?
I seems to get something like this, (at 10:20, when he walks down the entrance road):
https://youtu.be/hN2GOGzyS_8?t=618

I've tried to record an video directly from the hikvision webgui, and here its actualy kinda perfect.
Then I actually get something like this:
https://www.youtube.com/watch?v=WNmOXRiOKM8

In zoneminder, i've tried to increase the image quality, but then it just gets even more laggy.
I've also tried to configure the ffmpeg settings, with examples from here, https://github.com/ZoneMinder/ZoneMinder/issues/536 and here https://wiki.zoneminder.com/Ffmpeg, but it does not really seem to do anything?

Any suggestions are really appreciated. :)
Paranoid
Posts: 129
Joined: Thu Feb 05, 2009 10:40 pm

Re: issues getting same quality as from source

Post by Paranoid »

I think it is because of the way zm works.
It decodes the stream and save it as jpegs and then uses ffmpeg to string the jpegs together and produce a video.
This will produce a lower quality stream where the motion doesn't look smooth because the time gap between each jpeg isn't uniform. It will also be lower quality video because converting the original stream to jpeg loses detail as does converting from jpeg to whatever video codec you are encoding your video in.

You'll get the best possible output by setting JPEG_FILE_QUALITY and JPEG_ALARM_FILE_QUALITY to 100 and using a lossless jpeg to video encoding. Here's a link for the lossless encoding: https://video.stackexchange.com/questio ... -in-ffmpeg

Personally I use ffmpeg to losslessly save the high quality stream in ten minute segments and use a low quality stream for zoneminder to analyse and store events. That way if anything interesting happens I can look at the high quality recording to pick up details/faces.
Locked