How to install zm 1.24.1 from source on Ubuntu 8.10 - SOLVED

Forum for questions and support relating to the 1.24.x releases only.
craver84
Posts: 96
Joined: Sun Aug 31, 2008 7:35 am

Post by craver84 »

hi everyone,
I'm reinstalling ubuntu intrepid again followin the guide of jsylvia007
I still have problems:

first of all

Code: Select all

garda@Byakugan:~$ sudo echo "/usr/local/lib" > /etc/ld.so.conf.d/ffmpeg.conf 
bash: /etc/ld.so.conf.d/ffmpeg.conf: Permission denied
???
so I did not do this part

Code: Select all

   echo "/usr/local/lib" > /etc/ld.so.conf.d/ffmpeg.conf
   echo "LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> /etc/bash.bashrc
   echo "export LD_LIBRARY_PATH" >> /etc/bash.bashrc

   ldconfig
   reboot
I installed ffmpeg from SVN but when I try to compile zm

Code: Select all

_rtsp.o zm_rtsp.cpp
zm_rtsp.cpp: In constructor ‘RtspThread::RtspThread(int, RtspThread::RtspMethod, const std::string&, const std::string&, const std::string&, const std::string&, const std::string&, const std::string&)’:
zm_rtsp.cpp:183: error: ‘av_’ was not declared in this scope
zm_rtsp.cpp:183: error: expected `;' before ‘alloc_’
make[2]: *** [zm_rtsp.o] Error 1
make[2]: Leaving directory `/usr/src/zm/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/zm'
make: *** [all] Error 2
I

can you help me please?
craver84
Posts: 96
Joined: Sun Aug 31, 2008 7:35 am

Post by craver84 »

wow resolved!


nano -w src/zm_rtsp.cpp
don't change line 183 to:

Code: Select all

   
         mFormatContext = av_ alloc_ format_context(); 
but to

Code: Select all

         mFormatContext = av_alloc_format_context(); 
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer »

So there is a bug where it is putting a space? You should definitely report that!
jsylvia007
Posts: 116
Joined: Wed Mar 11, 2009 8:32 pm

Post by jsylvia007 »

I'm posting from my Blackberry, so I'm sorry if the format gets messed up.

Craver84 found a typo in my guide, I'll look into that and fix it.

Also, punk_ecas, I will try what you suggested about removing those libraries. What you say makes perfect sense. I can't believe I missed that!!

Also, that guide was mean to be run as root, hence no "sudo" before many of the lines. Which is why you had a peoblem with one of the echo lines.
jsylvia007
Posts: 116
Joined: Wed Mar 11, 2009 8:32 pm

Post by jsylvia007 »

Ok. I've updated my guide to remove the 3 packages provided by ffmpeg, and also removed the typo with the av_alloc_format line.

I'm starting from scratch on a Virtual Machine. I'll report back.

I'm going to try using the SVN ffmpeg first, then i'll try the other version.

~Jake
jsylvia007
Posts: 116
Joined: Wed Mar 11, 2009 8:32 pm

Post by jsylvia007 »

SUCCESS!!! I've updated my guide as to how it works using the current SVN of FFmpeg and the SVN of ZoneMinder.

No older versions needed. I'm going to test this out on my production system, but look for the post below this one to see the complete guide start to finish.
jsylvia007
Posts: 116
Joined: Wed Mar 11, 2009 8:32 pm

Post by jsylvia007 »

Here is my setup, exactly as I am doing it. No changes, no deviations.

I've added this guide to the Wiki as I am happy now after 10 complete installs that this works.

Ubuntu 8.10 Vanilla 32bit (with FFmpeg SVN, ZoneMinder SVN, jscalendar-1.0, cambozola-0.7)

Again, this is meant to be installed on a FRESH install of 8.10 with no modifications. Also, this guide is meant to be run as root, as such I have left out all the 'sudo' prefixes.

Please try and let me know your success. I've installed this way 3 times from scratch on a virtual machine, and I think this guide is now complete.
timf
Posts: 132
Joined: Mon Mar 21, 2005 4:07 pm
Location: Lytham St.Annes Lancs.

Great job...

Post by timf »

Followed this how to and everything works as promised even the ffmpeg part !

Just a couple of suggestions - during zm config it complained about not having mime:lite installed which is required for e mailing events.

This is a useful feature should the zm box go down or get stolen !

Secondly are you sure about the sysctl.conf settings ?

I was under the impression that kernel.shmall refers to the number of 4k pages in kernal.shmmax

Thus I have set mine to

kernel.shmall = 262144
kernel.shmmax = 1073741824

I'll now go and delete my initial attempt at a how to as yours is so much better.

Tim
jsylvia007
Posts: 116
Joined: Wed Mar 11, 2009 8:32 pm

Post by jsylvia007 »

I've updated my Wiki post to reflect MIME::Lite. Great catch!!

Also, no, to be honest, I have NO IDEA WHATSOEVER about the kernel settings. Somewhere on the forums, people have discussed calculations and an excel worksheet.

I dont really know what the correct Kernel parameters should be. From my understanding its also dependent on the amount of physical memory.
jsylvia007
Posts: 116
Joined: Wed Mar 11, 2009 8:32 pm

Post by jsylvia007 »

Timf: Also could you please put a link to the wiki page in the 1st post and change the title to include [SOLVED]

Also, I'd like to thank everyone in this thread, especially Timf, because his guide was the one that helped me to get mine started.

I found this link in the wiki:

http://www.zoneminder.com/wiki/index.ph ... solutions.

This post seems to recommend that you use the following for kernel.shmall:

Physical Memory * 1024 * 1024 / 4096

For my 6GB I would use ((6000 * 1024 * 1024) / 4096) = 1536000

For kernel.shmmax, they recommend what seems to be 1/2 of your physical memory converted to bytes, so for me that would be:

kernel.shmmax = 3221225472

Thoughts? I'm going to update the Wiki with that link and the link to this post.
nickmcg
Posts: 14
Joined: Thu Mar 05, 2009 8:30 am

Post by nickmcg »

I've tried using your excellent instructions, but on Jaunty, and I get the following errors

Code: Select all

Mar 19 10:54:32 kitchen-computer zmdc[3392]: INF [Starting pending process, zmc -d /dev/video1] 
Mar 19 10:54:32 kitchen-computer zmdc[3392]: INF ['zmc -d /dev/video1' starting at 09/03/19 10:54:32, pid = 16465] 
Mar 19 10:54:32 kitchen-computer zmdc[16465]: INF ['zmc -d /dev/video1' started at 09/03/19 10:54:32] 
Mar 19 10:54:32 kitchen-computer zmc_dvideo1[16465]: INF [Debug Level = 0, Debug Log = <none>]
Mar 19 10:54:32 kitchen-computer zmc_dvideo1[16465]: INF [Starting Capture]
Mar 19 10:54:33 kitchen-computer kernel: [ 3932.832534] zc3xx: probe 2wr ov vga 0x0000
Mar 19 10:54:34 kitchen-computer zmc_dvideo1[16465]: INF [Got signal 11 (Segmentation fault), crashing]
Mar 19 10:54:34 kitchen-computer zmc_dvideo1[16465]: INF [Backtrace complete, please execute the following command for more information]
Mar 19 10:54:34 kitchen-computer zmc_dvideo1[16465]: INF [addr2line -e /lib/tls/i686/cmov/libc.so.6(memcpy+0x46) 0xb7306896 0xb7306896]
Mar 19 10:54:39 kitchen-computer kernel: [ 3938.046299] ===>rt_ioctl_giwscan. 2(2) BSS returned, data->length = 315
Mar 19 10:56:39 kitchen-computer kernel: [ 4058.205404] ===>rt_ioctl_giwscan. 3(3) BSS returned, data->length = 400
This is similar to the messages I was getting on my much abused Hardy system.

Any ideas would be greatly appreciated

Thanks

Nick
jsylvia007
Posts: 116
Joined: Wed Mar 11, 2009 8:32 pm

Post by jsylvia007 »

I'll setup a test VM and see what I can find. My guess is that there is still a dependency up stream with bugs because Jaunty hasn't been released yet.
nickmcg
Posts: 14
Joined: Thu Mar 05, 2009 8:30 am

Post by nickmcg »

Thanks - I had very similar errors on Intrepid too - I'm wondering if it could be my memory seetings.
I have 4 Gb physical ram, and the zmu gives

Code: Select all

Video Capabilities
  Name: USB Camera (046d:08da)
  Type: 1
    Can capture
  Video Channels: 1
  Audio Channels: 0
  Maximum Width: 640
  Maximum Height: 480
  Minimum Width: 48
  Minimum Height: 32
Window Attributes
  X Offset: 0
  Y Offset: 0
  Width: 320
  Height: 240
Picture Attributes
  Palette: 0 - Unknown
  Colour Depth: 8
  Brightness: 32896
  Hue: 0
  Colour :0
  Contrast: 32768
  Whiteness: 39321
Channel 0 Attributes
  Name: zc3xx
  Channel: 0
  Flags: 0
  Type: 2 - Camera
  Format: 0 - PAL
Thanks

Nick
nickmcg
Posts: 14
Joined: Thu Mar 05, 2009 8:30 am

Post by nickmcg »

more ... this seems to be a palette problem - if I set the capture palette to yuv, I get lots of pretty colours at 12fps. it looks like an untuned (analog) tv picture, the image is not visible at all, although the timestamp shows up

Nick
nickmcg
Posts: 14
Joined: Thu Mar 05, 2009 8:30 am

Post by nickmcg »

I've managed to work rounf the problem - it seems to be a problem with the logitech webcam & zoneminder.

I used mjpg_streamer as documented in these two threads
http://ubuntuforums.org/showthread.php?t=882863
http://www.zoneminder.com/forums/viewtopic.php?t=12082
and everything works really well.

You can now add to the wikki that the instructions in the guide work for Jaunty!

Thanks for your responses

Nick
Locked