Ubuntu 7.10 server/ZM 1.23.2 from src, how to (31/03/2008)

Support and queries relating to all previous versions of ZoneMinder
barkeep8
Posts: 15
Joined: Fri Mar 31, 2006 2:55 am

Re: How about Dapper support?

Post by barkeep8 »

barkeep8 wrote:
timcraig wrote:
barkeep8 wrote: Does anyone have a tutorial for upgrading ZM 1.22.3 on Ubuntu 6.06 server to 1.23.1?
The wiki has documentation on upgrading: http://www.zoneminder.com/wiki/index.ph ... #Upgrading

I followed it for upgrading my ZM 1.22.3 install to 1.23.1 and it worked fine for me. Don't use the new deep storage feature if you have events in ZM you want to keep.
THANKS!!!
Ok, I'm looking at the upgrade instructions on the wiki now. The part I'm having difficulty with is the configure script. I get to a point and it quits on"

"configure: error: zm requires gnutls/openssl.h"

I then tried:

apt-get install libssl-dev and get:

"libssl-dev is already the latest version"

I thought I saw in another post that installing libssl-dev would get the gnutls stuff working.

Any ideas on how gnutls/openssl.h is supported on Ubuntu Dapper 6.06?

Thanks
timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA

Re: How about Dapper support?

Post by timcraig »

barkeep8 wrote: Any ideas on how gnutls/openssl.h is supported on Ubuntu Dapper 6.06?
Try apt-get install libgnutls-dev.
socsuser
Posts: 43
Joined: Tue Mar 20, 2007 1:36 pm

Post by socsuser »

Adding "--with-ffmpeg=/usr/local/include/ffmpeg/" to the ./configure seems to help, however I'm still running into an issue:

zm_mpeg.o(.text+0x97f): In function `VideoStream::EncodeFrame(unsigned char*, int, bool, unsigned int)':
/user/zm1231/ZoneMinder-1.23.1/src/zm_mpeg.cpp:362: undefined reference to `av_init_packet'
zm_mpeg.o(.text+0xa70):/user/zm1231/ZoneMinder-1.23.1/src/zm_mpeg.cpp:341: undefined reference to `av_init_packet'
collect2: ld returned 1 exit status
kevin_robson
Posts: 247
Joined: Sun Jan 16, 2005 11:26 am

Post by kevin_robson »

I believe ffmpeg needs to be compiled from source. In some cases an old version of source. Have a search through the forums.
timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA

Post by timcraig »

I checked out ffmpeg from the svn a few days ago when I made the ZM upgrade. I haven't had any errors with it so far. The revision number of my ffmpeg checkout is 11637.

If the current version of ffmpeg is giving you problems you can try building revision 11637. You can get it from the svn by typing

Code: Select all

svn checkout -r 11637 svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
Last edited by timcraig on Wed Jan 30, 2008 4:55 am, edited 1 time in total.
socsuser
Posts: 43
Joined: Tue Mar 20, 2007 1:36 pm

Post by socsuser »

Could you offer up your exact `./configure ...` line for reference?

FYI, you need to remove the middle "svn checkout" from your line which would make it read:

Code: Select all

`svn checkout -r 11637 svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg`
timcraig wrote:I checked out ffmpeg from the svn a few days ago when I made the ZM upgrade. I haven't had any errors with it so far. The revision number of my ffmpeg checkout is 11637.

If the current version of ffmpeg is giving you problems you can try building revision 11637. You can get it from the svn by typing

Code: Select all

svn checkout -r 11637 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA

Post by timcraig »

socsuser wrote:Could you offer up your exact `./configure ...` line for reference?

FYI, you need to remove the middle "svn checkout" from your line which would make it read:

Code: Select all

`svn checkout -r 11637 svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg`
timcraig wrote:I checked out ffmpeg from the svn a few days ago when I made the ZM upgrade. I haven't had any errors with it so far. The revision number of my ffmpeg checkout is 11637.

If the current version of ffmpeg is giving you problems you can try building revision 11637. You can get it from the svn by typing

Code: Select all

svn checkout -r 11637 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
Opps! Thanks for pointing out that that typo. I edited my post.

Here is my ffmpeg -version output:

Code: Select all

FFmpeg version SVN-r11637, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-pp --enable-libvorbis --enable-liba52 --enable-libgsm --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-libxvid --enable-pthreads --enable-libx264 --enable-shared --enable-pp --enable-swscaler --enable-gpl
  libavutil version: 49.6.0
  libavcodec version: 51.50.0
  libavformat version: 52.6.0
  libavdevice version: 52.0.0
  built on Jan 27 2008 10:21:29, gcc: 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
FFmpeg SVN-r11637
libavutil   3212800
libavcodec  3355136
libavformat 3409408
libavdevice 3407872
The 'configuration:' part shows the ./configure options I used. I threw in support for a lot a various codecs (I perfer to make my video conversions of events in Xvid or X264 to save space). The configure options the orginal poster used are the only ones required for zoneminder..
socsuser
Posts: 43
Joined: Tue Mar 20, 2007 1:36 pm

Post by socsuser »

Thanks timcraig, I actually was referring to pasting your ./configure cmd for the zoneminder configuration so that we're sure that we're on the same page in terms of include and lib locations.

Thanks again!
timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA

Post by timcraig »

My ZM configure was (If I remember right)

./configure --with-webdir=/var/www/html/zm --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --with-ffmpeg=/usr/local/bin/ffmpeg



Last night I built ZM on my Ubuntu 7.10 Desktop (my main ZM machine is an Ubuntu 7.10 Server) and I had troubles with ffmpeg. It looks like the ubuntu repository version of ffmpeg (which gets automatically installed in the Desktop edition and probably not the Server edition) causes problems even if you do your own build of ffmpeg. The include files of ffmpeg were not getting overwritten with the latest version when I did the svn source install. I finally had to do what the post at the bottom of this thread did:
http://www.zoneminder.com/forums/viewto ... f035626e64

which is to install the lastest ffmpeg in /opt (passing --prefix=/opt/ in configure) and set ZM's configure option to --with-ffmpeg=/opt
socsuser
Posts: 43
Joined: Tue Mar 20, 2007 1:36 pm

Post by socsuser »

[EDIT]
I ended up resolving this issue by mv'ing the folder and untar'ing it again. ZM compiled properly and w/o a hitch this time, thanks much.

I've actually done this on SME Server / RHEL4 with apt installed for a little assistance, but this has worked very well. I did modify some items in your ZM ./configure to match SME Server 7.2 a bit more closely, but this looks good all in all. Thanks much!


[OLD MSG BELOW, DISREGARD]
Having a very odd issue while compiling now. I did get through the ffmpeg issue alright, but now when ./configure'ing ZM I am receiving the following error:

config.status: error: cannot find input file: web/graphics/Makefile.in

In config.log I'm only seeing:
config.status:676: creating Makefile
config.status:676: creating src/Makefile
config.status:676: creating web/Makefile
config.status:662: error: cannot find input file: web/graphics/Makefile.in

Anyone able to help?
User avatar
caladeira
Posts: 64
Joined: Wed Dec 05, 2007 10:57 am
Location: Lisbon

Post by caladeira »

timcraig wrote:My ZM configure was (If I remember right)

./configure --with-webdir=/var/www/html/zm --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --with-ffmpeg=/usr/local/bin/ffmpeg



Last night I built ZM on my Ubuntu 7.10 Desktop (my main ZM machine is an Ubuntu 7.10 Server) and I had troubles with ffmpeg. It looks like the ubuntu repository version of ffmpeg (which gets automatically installed in the Desktop edition and probably not the Server edition) causes problems even if you do your own build of ffmpeg. The include files of ffmpeg were not getting overwritten with the latest version when I did the svn source install. I finally had to do what the post at the bottom of this thread did:
http://www.zoneminder.com/forums/viewto ... f035626e64

which is to install the lastest ffmpeg in /opt (passing --prefix=/opt/ in configure) and set ZM's configure option to --with-ffmpeg=/opt
Hello!

I've been trying to setup ffmpeg in the /opt and I can compile ffmpeg (from svn) and zoneminder (1.23.1) without problems.

Then I've set the "Options|Images|Path to (optional) ffmpeg mpeg encoder" to "/opt/bin/ffmpeg" and set the mpeg encoder to ffmpeg.

When I try to generate a video, I always get the message: "Video Generation Failed!"

When I check the log "/tmp/zmvideo.log" I have two lines:

02/01/08 22:57:16.648877 zmvideo[15778].INF [Creating video file Event-6291-r4-s1.mpg for event 6291]
02/01/08 22:57:16.656702 zmvideo[15778].ERR [Unable to generate video, check /var/www/html/zm/events/1/6291/ffmpeg.log for details]

The file "/var/www/html/zm/events/1/6291/ffmpeg.log" that should contain more details, doesn't exist!

I have authentication active, but without it doesn't work either.

Any ideas?

Best regards.
User avatar
caladeira
Posts: 64
Joined: Wed Dec 05, 2007 10:57 am
Location: Lisbon

Post by caladeira »

Autostart solved and added apache configuration file.

Video generation still not working.
timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA

Post by timcraig »

caladeira wrote: Hello!

I've been trying to setup ffmpeg in the /opt and I can compile ffmpeg (from svn) and zoneminder (1.23.1) without problems.

Then I've set the "Options|Images|Path to (optional) ffmpeg mpeg encoder" to "/opt/bin/ffmpeg" and set the mpeg encoder to ffmpeg.

When I try to generate a video, I always get the message: "Video Generation Failed!"

When I check the log "/tmp/zmvideo.log" I have two lines:

02/01/08 22:57:16.648877 zmvideo[15778].INF [Creating video file Event-6291-r4-s1.mpg for event 6291]
02/01/08 22:57:16.656702 zmvideo[15778].ERR [Unable to generate video, check /var/www/html/zm/events/1/6291/ffmpeg.log for details]

The file "/var/www/html/zm/events/1/6291/ffmpeg.log" that should contain more details, doesn't exist!

I have authentication active, but without it doesn't work either.

Any ideas?

Best regards.
If the ffmpeg path in your ZM options are correct, then I can't think of what might be the cause of your problem.

I believe that /usr/local/bin/zmvideo.pl is the Perl script responsible for creating videos.

The script passes the ffmpeg command it uses to try to create the video to the debug logger. I would play with ZM's debug modes to see if I can get ZM to spit out a debug log that includes the call to ffmpeg. There you can cut and paste the command into the command line and try running the same call ZM was trying to do. That should show you the cause of your problems when trying to generate video.
User avatar
caladeira
Posts: 64
Joined: Wed Dec 05, 2007 10:57 am
Location: Lisbon

Post by caladeira »

Hello!

Thanks for your support.

I've been doing some tests and now I'm even more confuse.

I've activated extra log and set the log level to 9.
Restart Zoneminder.
Then I try to generate a video and get the usual fail message.
Disable logs and restart zoneminder
Go to the /tmp and start checking the files zm_debug.log.* and found nothing related to ffmpeg or video generation.
Then I execute the command "cat * | grep zmvideo" and only the contents of zmvideo.log came out.
The file zmvideo.log only contains the information I've already posted.

Now what?!

Where else should I look?

Thanks for all help.
User avatar
caladeira
Posts: 64
Joined: Wed Dec 05, 2007 10:57 am
Location: Lisbon

Post by caladeira »

Hello!

I've finally solved the ffmpeg error "video generation failed!".

I've never imagined this could be the problem since it was known from a previous version: 1.22.3 (at least).

I simply edited the file zmvideo.pl at line 323 and remove the & near the end of the line:

Changed:

">& ffmpeg.log"

to:

"> ffmpeg.log"


Hope it help.

Best regards.
Locked