RGB24 not working but BGR24 working on Kodicom 8800 clone.

Forum for questions and support relating to the 1.24.x releases only.
m1ke
Posts: 53
Joined: Thu Nov 08, 2007 1:37 pm
Location: Surrey

Re: RGB24 not working but BGR24 working on Kodicom 8800 clon

Post by m1ke »

I have added:
ZM_CPU_EXTENSIONS=true
ZM_FAST_IMAGE_BLENDS=true

to /usr/local/etc/zm.conf.

I think this brought CPU usage % down a bit more.

Only major issue I have now is that I can no longer view events I just get a blank white screen. No errors seem to be in the logs.

Any idea why that could be ?

Mike.
m1ke
Posts: 53
Joined: Thu Nov 08, 2007 1:37 pm
Location: Surrey

Re: RGB24 not working but BGR24 working on Kodicom 8800 clon

Post by m1ke »

m1ke wrote:I have added:
ZM_CPU_EXTENSIONS=true
ZM_FAST_IMAGE_BLENDS=true

to /usr/local/etc/zm.conf.

I think this brought CPU usage % down a bit more.

Only major issue I have now is that I can no longer view events I just get a blank white screen. No errors seem to be in the logs.

Any idea why that could be ?

Mike.
OK I've found ZM_CPU_EXTENSIONS & ZM_FAST_IMAGE_BLENDS in the options screen. Didn't look hard enough :)

I still have a blank event screen when try to play back events however. I have cambozola.jar in /var/www/html/zm & OPT_CAMBOZOLA ticked & RELOAD_CAMBOZOLA set to 0.

What else could be wrong ?

Mike.
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: RGB24 not working but BGR24 working on Kodicom 8800 clon

Post by mastertheknife »

Hi,

Glad to hear its working. From my testing, 32bit is only faster on processors with SSSE3.
About the blank events. Whats in the syslog? and where are the events stored?

mastertheknife.
Kfir Itzhak.
m1ke
Posts: 53
Joined: Thu Nov 08, 2007 1:37 pm
Location: Surrey

Re: RGB24 not working but BGR24 working on Kodicom 8800 clon

Post by m1ke »

Hi Kfir,
Yes the events are stored OK. I can convert them to video & download & view. I can also view the stills. If I use IE to view I just get a white screen with cambozola writen in the middle. If I use Firefox I get only a bank white screen.

In /var/log/messages (syslog) I get the following when I click to view an event:

Jun 28 17:06:19 zm1 zmc_dvideo1[24704]: INF [Monitor-2: 77000 - Capturing at 25.00 fps]
Jun 28 17:06:21 zm1 zmc_dvideo0[24696]: INF [Monitor-1: 77000 - Capturing at 25.00 fps]
Jun 28 17:06:25 zm1 zms[24917]: INF [Debug Level = 0, Debug Log = <none>]
Jun 28 17:06:25 zm1 zms[24917]: INF [Authenticated user 'admin']
Jun 28 17:06:25 zm1 zms[24917]: ERR [Unable to send raw frame 1: Invalid argument]

What do you think ?

Mike
m1ke
Posts: 53
Joined: Thu Nov 08, 2007 1:37 pm
Location: Surrey

Re: RGB24 not working but BGR24 working on Kodicom 8800 clon

Post by m1ke »

Sorry miss-read your post you asked "where are the events stored" not "are the events stored"!
OK - they seem to be stored in '/var/www/html/zm/events' with a sub dir for each cam 1, 2 etc.

Mike
m1ke
Posts: 53
Joined: Thu Nov 08, 2007 1:37 pm
Location: Surrey

Re: RGB24 not working but BGR24 working on Kodicom 8800 clon

Post by m1ke »

Option DIR_EVENTS is set to 'events' which seems correct also...

Mike.
m1ke
Posts: 53
Joined: Thu Nov 08, 2007 1:37 pm
Location: Surrey

Re: RGB24 not working but BGR24 working on Kodicom 8800 clon

Post by m1ke »

Anyone got any ideas on why I get :
Jun 28 17:06:25 zm1 zms[24917]: ERR [Unable to send raw frame 1: Invalid argument]

whenever I go to view a recorded event ??

Thanks in advance,

Mike.
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: RGB24 not working but BGR24 working on Kodicom 8800 clon

Post by mastertheknife »

Hi mike,

Sorry for the delay. It seems the sendfile() function doesn't work on your platform correctly but is broken. I will soon attach a modified zm_event.cpp that switches back to the old and slower way if sendfile() fails.

mastertheknife
Last edited by mastertheknife on Wed Jun 29, 2011 9:34 am, edited 1 time in total.
Kfir Itzhak.
m1ke
Posts: 53
Joined: Thu Nov 08, 2007 1:37 pm
Location: Surrey

Re: RGB24 not working but BGR24 working on Kodicom 8800 clon

Post by m1ke »

mastertheknife wrote:Hi mike,

Sorry for the delay. Anyways, it seems the sendfile() function doesn't work on your platform correctly but is broken. I will soon attach a modified zm_event.cpp that doesn't use sendfile but the old and slower way.

mastertheknife
Ahh, OK.
Wonder why that function it doesn't work on my platform - I suppose that function assumes something my Prescott CPU doesn't have or something...

Look forward to the modified zm_event.cpp :)

Cheers, Mike.
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: RGB24 not working but BGR24 working on Kodicom 8800 clon

Post by mastertheknife »

Hi,

Here is zm_event.cpp that falls back to the standard way if sendfile() fails. I tested it on my machine and it appears to be working. if you also confirm it to be working, i'll update the patch.

Thank you,
mastertheknife
Attachments
zm_event.cpp.zip
(9.92 KiB) Downloaded 172 times
Kfir Itzhak.
m1ke
Posts: 53
Joined: Thu Nov 08, 2007 1:37 pm
Location: Surrey

Re: RGB24 not working but BGR24 working on Kodicom 8800 clon

Post by m1ke »

Fantastic - it works !! :D

I replaced the original ../src/zm_event.cpp with your new one did the following:
service zm stop
autoconf
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg CFLAGS="-g -O3 -march=prescott -mtune=prescott" CXXFLAGS="-g -O3 -march=prescott -mtune=prescott" --enable-mmap --enable-debug=yes --enable-crashtrace=yes CPPFLAGS="-D__STDC_CONSTANT_MACROS -msse2 -I/opt/libjpeg-turbo/include"
make
make install
service zm start

Bingo all working.
Why do you think it didn't work on my platform ?

Cheers, Mike.
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: RGB24 not working but BGR24 working on Kodicom 8800 clon

Post by mastertheknife »

"make" and "make install" in the src directory is also enough :D

Not sure why it didn't work, maybe you are using a bugged glibc version. There should be no noticeable performance difference between sendfile() and the other way, so it doesn't really matter :D

Thank you for testing. I will update the patch in my thread soon to include this.

mastertheknife
Kfir Itzhak.
Locked