Page 10 of 12

Re: ZM 1.25.0 Performance Patch - Completed

Posted: Mon Apr 16, 2012 10:27 pm
by TylerSchwend
When will these changes become official contribs to the Zoneminder source? Would like to see these changes as standard rather than another patch.

Re: ZM 1.25.0 Performance Patch - Completed

Posted: Wed May 16, 2012 12:16 pm
by gblanco
Hi,

i have a issue with this patch ....


May 16 09:12:35 SecuritySystem zms[3557]: INF [Authenticated user 'admin']
May 16 09:12:35 SecuritySystem zms[3557]: ERR [Got unexpected memory map file size 0, expected 30722560]
May 16 09:12:35 SecuritySystem zms[3557]: INF [Got signal 7 (Bus error), crashing]
May 16 09:12:35 SecuritySystem zms[3557]: ERR [Signal address is 0x10293, no eip]
May 16 09:12:35 SecuritySystem zms[3557]: ERR [Backtrace: /lib/x86_64-linux-gnu/libpthread.so.0(+0xfc60) [0x7f4e653a1c60]]
May 16 09:12:35 SecuritySystem zms[3557]: ERR [Backtrace: /usr/lib/cgi-bin/nph-zms() [0x467991]]
May 16 09:12:35 SecuritySystem zms[3557]: ERR [Backtrace: /usr/lib/cgi-bin/nph-zms() [0x46c96a]]
May 16 09:12:35 SecuritySystem zms[3557]: ERR [Backtrace: /usr/lib/cgi-bin/nph-zms() [0x4c9846]]
May 16 09:12:35 SecuritySystem zms[3557]: ERR [Backtrace: /usr/lib/cgi-bin/nph-zms() [0x40bb04]]
May 16 09:12:35 SecuritySystem zms[3557]: ERR [Backtrace: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff) [0x7f4e64473eff]]
May 16 09:12:35 SecuritySystem zms[3557]: ERR [Backtrace: /usr/lib/cgi-bin/nph-zms() [0x40af19]]
May 16 09:12:35 SecuritySystem zms[3557]: INF [Backtrace complete, please execute the following command for more information]
May 16 09:12:35 SecuritySystem zms[3557]: INF [addr2line -e /usr/lib/cgi-bin/nph-zms() 0x7f4e653a1c60 0x467991 0x46c96a 0x4c9846 0x40bb04 0x7f4e64473eff 0x40af19]


guiseco@SecuritySystem:~$ addr2line -e /usr/lib/cgi-bin/nph-zms 0x7f4e653a1c60 0x467991 0x46c96a 0x4c9846 0x40bb04 0x7f4e64473eff 0x40af19
??:0
/home/guiseco/mastertheknife-ZoneMinder-kfir-e413042/src/zm_monitor.cpp:439
/home/guiseco/mastertheknife-ZoneMinder-kfir-e413042/src/zm_monitor.cpp:2545
/home/guiseco/mastertheknife-ZoneMinder-kfir-e413042/src/zm_stream.cpp:40
/home/guiseco/mastertheknife-ZoneMinder-kfir-e413042/src/zms.cpp:262
??:0
??:0


thanks

Re: ZM 1.25.0 Performance Patch - Completed

Posted: Wed May 16, 2012 11:21 pm
by mastertheknife
Hi gblanco,

Have you tried restarting ZM after changing monitor options?

mastertheknife

Re: ZM 1.25.0 Performance Patch - Completed

Posted: Thu May 17, 2012 4:23 pm
by gblanco
Hi,

Yes, many times ...
This error only occurs in "montage" view !

this is the only issue with your patch !!!

Re: ZM 1.25.0 Performance Patch - Completed

Posted: Tue Jun 05, 2012 7:53 pm
by tibetfreedom
Hi I am using this with a camera that is meant to be 540 TV lines in PAL Format.
However the only image I get is at 320*240
or
924 x 576
which seems odd…

Am I missing anything ?

Re: ZM 1.25.0 Performance Patch - Completed

Posted: Fri Jul 20, 2012 3:35 pm
by mastertheknife
tibetfreedom wrote:Hi I am using this with a camera that is meant to be 540 TV lines in PAL Format.
However the only image I get is at 320*240
or
924 x 576
which seems odd…

Am I missing anything ?
If using shared memory instead of mmap (default), perhaps shmmax or shmall are too low. For PAL, the maximum capture resolution should be 768x576 or 720x576 depending on your hardware.

mastertheknife.

Re: ZM 1.25.0 Performance Patch - Completed

Posted: Fri Jul 20, 2012 3:35 pm
by mastertheknife
gblanco wrote:Hi,

Yes, many times ...
This error only occurs in "montage" view !

this is the only issue with your patch !!!
I have been unable to reproduce the problem. Perhaps you let me look or let me know how to reproduce the problem, so i can fix it.

mastertheknife

Re: ZM 1.25.0 Performance Patch - Completed

Posted: Fri Jul 20, 2012 3:51 pm
by mastertheknife
Hi all,

The deinterlacing code is now included in the code. There are few deinterlacing techniques included:
1) Discard: This simply copies the even lines into the odd lines. This is the fastest technique, but results in lowest quality.
2) Linear: The odd lines are average of the line above and line below. Should result in slightly better quality than discard, and may be a little slower.
3) Blend: The odd and even lines are blended together. This may create a ghosting effect.
4) Four field motion adaptive deinterlacing: Motion detection is done between the current frame and the next frame, and only motion areas are deinterlaced (using Linear). This is the best technique, results in the best quality, but it is the slowest of all and at the moment, is not perfect yet and white lines may show up sometimes (quite rare), a bug i couldn't fix so far.

To update existing database, run this SQL statement:

Code: Select all

ALTER TABLE `Monitors` ADD `Deinterlacing` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `Orientation`
Enjoy,
mastertheknife

Re: ZM 1.25.0 Performance Patch - Completed

Posted: Tue Jul 24, 2012 7:00 pm
by marcodefreitas
Great job, mastertheknife.
Can I recommend a feature to speed-up ZM database connection?

Re: ZM 1.25.0 Performance Patch - Completed

Posted: Thu Aug 02, 2012 3:14 am
by The_Penguin
TylerSchwend wrote:When will these changes become official contribs to the Zoneminder source? Would like to see these changes as standard rather than another patch.
I don't believe anyone answered this question.

Why wouldn't these changes get rolled in to the official source?

Re: ZM 1.25.0 Performance Patch - Completed

Posted: Tue Aug 14, 2012 9:39 am
by Carrier82
Hi and thank you for your excellent work, mastertheknife. I'm trying to compile the performance patch on a low-end Aspire One with ubuntu 12.04. I get the following error on compilation:

zm_mpeg.cpp: Jäsenfunktio ”double VideoStream::EncodeFrame(const uint8_t*, int, bool, unsigned int)”:
zm_mpeg.cpp:423:77: virhe: ”av_rescale_q” on esittelemättä tällä näkyvyysalueella
make[2]: *** [zm_mpeg.o] Virhe 1

error: av_rescale_q not introduced on this zone or something? What could be wrong? I do have libjpegturbo-8-dev installed... Sorry if the solution is simple, but it's been 15 years since i've last compiled something on Linux... :)

Re: ZM 1.25.0 Performance Patch - Completed

Posted: Tue Aug 14, 2012 9:47 am
by Carrier82
Oh, and I did use ZM_SSL_LIB=openssl on the configure line as configure suggested.

Re: ZM 1.25.0 Performance Patch - Completed

Posted: Tue Aug 14, 2012 10:43 am
by Carrier82
Some googling gave libav: undocumented API change: libavutil/avutil.h doesn't include mathematics.h any more. This can be fixed by adding #include <libavutil/mathematics.h> in the file cap_ffmpeg_impl.hpp (or something similar) before
#include <ffmpeg/avcodec.h>. I'll try that when I get home.

Re: ZM 1.25.0 Performance Patch - Completed

Posted: Tue Aug 14, 2012 1:56 pm
by Carrier82
Adding #include "mathematics.h" to the top of /usr/include/libavutil/avutil.h fixed this problem in case somebody else experiences problems with Ubuntu 12.04 and this patch. Thank you for reading.

Re: ZM 1.25.0 Performance Patch - Completed

Posted: Fri Aug 24, 2012 8:26 am
by Dopey
This is a very very good patch.

I don't know if the original author of zoneminder is aware of it but it would benefit zoneminder to include it in the official source code !