ZM 1.24.3 + ffmpeg w/ libx264 install script for Ubuntu

Forum for questions and support relating to the 1.24.x releases only.
nojstevens
Posts: 22
Joined: Sat Jul 04, 2009 4:53 pm

Re: ZM 1.24.3 + ffmpeg w/ libx264 install script for Ubuntu

Post by nojstevens »

I'm now trying to install the httpsegmenter so i can stream to my ipad. I'm in the httpsegmenter directory and I type sudo make; make install and get the following errors....

gcc -Wall -g segmenter.c -o segmenter -lavformat -lavcodec -lavutil
segmenter.c: In function ‘main’:
segmenter.c:313:5: warning: ‘av_set_parameters’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1396)
segmenter.c:318:5: warning: ‘dump_format’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1496)
segmenter.c:332:5: warning: ‘url_fopen’ is deprecated (declared at /usr/local/include/libavformat/avio.h:281)
segmenter.c:370:13: warning: ‘put_flush_packet’ is deprecated (declared at /usr/local/include/libavformat/avio.h:295)
segmenter.c:371:13: warning: ‘url_fclose’ is deprecated (declared at /usr/local/include/libavformat/avio.h:282)
segmenter.c:391:13: warning: ‘url_fopen’ is deprecated (declared at /usr/local/include/libavformat/avio.h:281)
segmenter.c:433:5: warning: ‘url_fclose’ is deprecated (declared at /usr/local/include/libavformat/avio.h:282)
cp segmenter /usr/local/bin/
cp: cannot create regular file `/usr/local/bin/segmenter': Permission denied
make: *** [install] Error 1

Not sure what to try next

Jon
User avatar
asturgeon
Posts: 23
Joined: Fri Apr 15, 2011 12:10 am

Re: ZM 1.24.3 + ffmpeg w/ libx264 install script for Ubuntu

Post by asturgeon »

nojstevens wrote:I'm now trying to install the httpsegmenter so i can stream to my ipad. I'm in the httpsegmenter directory and I type sudo make; make install and get the following errors....

gcc -Wall -g segmenter.c -o segmenter -lavformat -lavcodec -lavutil
segmenter.c: In function ‘main’:
segmenter.c:313:5: warning: ‘av_set_parameters’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1396)
segmenter.c:318:5: warning: ‘dump_format’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1496)
segmenter.c:332:5: warning: ‘url_fopen’ is deprecated (declared at /usr/local/include/libavformat/avio.h:281)
segmenter.c:370:13: warning: ‘put_flush_packet’ is deprecated (declared at /usr/local/include/libavformat/avio.h:295)
segmenter.c:371:13: warning: ‘url_fclose’ is deprecated (declared at /usr/local/include/libavformat/avio.h:282)
segmenter.c:391:13: warning: ‘url_fopen’ is deprecated (declared at /usr/local/include/libavformat/avio.h:281)
segmenter.c:433:5: warning: ‘url_fclose’ is deprecated (declared at /usr/local/include/libavformat/avio.h:282)
cp segmenter /usr/local/bin/
cp: cannot create regular file `/usr/local/bin/segmenter': Permission denied
make: *** [install] Error 1

Not sure what to try next

Jon
The warnings are fine... You flipped the sudo in your command. It should be sudo make install, not sudo make. You don't need to be root to make a package (unless you changed permissions), although now that you ran t as root, you will likely need to keep doing it.

Type sudo make; sudo make install.
Native iPhone and iPad control for ZoneMinder with eyeZm, the premiere iOS app for use with ZoneMinder.

Visit http://eyezm.com for more info, and subscribe to our RSS feed at http://eyezm.com/rssfeed.xml for news and updates.
hengst
Posts: 28
Joined: Sun Sep 26, 2010 7:15 am
Location: Netherlands

Re: ZM 1.24.3 + ffmpeg w/ libx264 install script for Ubuntu

Post by hengst »

2 servers with Ubuntu 10.04 Desktop / Zoneminder 1.24.2 ( installed from .deb while ago )
Had a lot of pain trying to upgrade them to 1.24.4 from tarball.


was using this "tutorial" http://www.zoneminder.com/forums/viewto ... 21&t=17676

but in the end still having trouble with ffmpeg/ libxvid / avutil problems i ques and unable to install 1.24.4 on top of my 1.24.2
might be the fact that i had 1.24.2 installed from .deb

Then i ran into this install script ( see top message ) and just ran it, but also gives same pain as before.

then i had an idea to just remove/install ffmpeg with apt-get by typing :

sudo apt-get remove ffmpeg
sudo apt-get install ffmpeg

then running the script from this topic, and that did it !
i lost my settings/database somewhere, but i can live with that.

so happy to see how smooth zoneminder runs on 11.04 here. server loads are much lower as before , and system is much more responsive somehow.
User avatar
asturgeon
Posts: 23
Joined: Fri Apr 15, 2011 12:10 am

Re: ZM 1.24.3 + ffmpeg w/ libx264 install script for Ubuntu

Post by asturgeon »

Removing ffmpeg is definitely key. We still recommend building ffmpeg from source since if you have already removed it, that's the hardest part. It usually builds pretty easy. But glad to hear you got it working!
Native iPhone and iPad control for ZoneMinder with eyeZm, the premiere iOS app for use with ZoneMinder.

Visit http://eyezm.com for more info, and subscribe to our RSS feed at http://eyezm.com/rssfeed.xml for news and updates.
hengst
Posts: 28
Joined: Sun Sep 26, 2010 7:15 am
Location: Netherlands

Re: ZM 1.24.3 + ffmpeg w/ libx264 install script for Ubuntu

Post by hengst »

Greetings professor... :wink:

doing my 3rd Zoneminder server upgrade.
here is my experience,
this one i started from scratch. no updating.

- downloaded the Ubuntu 11.04 Server edition CD.
- Installed server as LAMP server only

log in from other pc to the server :
ssh <your server IP>

create empty file :
sudo nano <your_file_name_to_be_created>

copy paste complete script from topic top post to your empty file and change the file/url in the code to the one you would like to be installed.

save file.

change file to be a exutable :
sudo chmod 755 <your_file_name_you_created>

then execute that it :
sudo ./<your_file_name_you_created>

get a cup of coffee and follow the screen input/output.

oops, did not completed as should be, install is not completed. ( complains about Sys:Mmap not installed )

well i learned something at earlier temps :
sudo apt-get install ffmpeg

after that execute the script again :
sudo ./<your_file_name_you_created>

oops, did not complete , drops out at the end complaining it can find zm files for config and make etc.

so thats not going well :
sudo apt-get remove ffmpeg

after that execute the script again :
sudo ./<your_file_name_you_created>

no luck yet, complaining again ( complains about Sys:Mmap not installed )

well in the end i have done it, but cant tell you how i did it in the end.
meshed arround with the scripts and adding the

Alias /zm "/usr/share/zoneminder"
<Directory "/usr/share/zoneminder">
Options FollowSymLinks
AllowOverride All
</Directory>

code to the /etc/apache2/apache2.conf

seems to be it to succeed.

not as simple as it looks like in the beginning.
User avatar
asturgeon
Posts: 23
Joined: Fri Apr 15, 2011 12:10 am

Re: ZM 1.24.3 + ffmpeg w/ libx264 install script for Ubuntu

Post by asturgeon »

hengst wrote:Greetings professor... :wink:

doing my 3rd Zoneminder server upgrade.
here is my experience,
this one i started from scratch. no updating.

- downloaded the Ubuntu 11.04 Server edition CD.
- Installed server as LAMP server only
This wasn't necessary since the script sets up LAMP for you. The point of this script is for totally blank machines with a bare install
get a cup of coffee and follow the screen input/output.

oops, did not completed as should be, install is not completed. ( complains about Sys:Mmap not installed )
This is clearly installed in the script where it says 'sudo perl -MCPAN -e "install Sys::Mmap" '. Did this line give you any errors? Since you already installed LAMP (including Perl), it's possible that CPAN didn't get set up correctly, but using the script to install LAMP, it works.
well i learned something at earlier temps :
sudo apt-get install ffmpeg

after that execute the script again :
sudo ./<your_file_name_you_created>

oops, did not complete , drops out at the end complaining it can find zm files for config and make etc.

so thats not going well :
sudo apt-get remove ffmpeg

after that execute the script again :
sudo ./<your_file_name_you_created>

no luck yet, complaining again ( complains about Sys:Mmap not installed )
Installing FFMPEG via apt-get defeats the purpose of using the script since it builds it from source for you.
well in the end i have done it, but cant tell you how i did it in the end.
meshed arround with the scripts and adding the

Alias /zm "/usr/share/zoneminder"
<Directory "/usr/share/zoneminder">
Options FollowSymLinks
AllowOverride All
</Directory>

code to the /etc/apache2/apache2.conf

seems to be it to succeed.

not as simple as it looks like in the beginning.
You are correct about adding the Apache lines, this was not added to the script, and I can modify it to do so. However, the script is quite simple if you start from a blank machine :) Glad you got it working in the end though.
Native iPhone and iPad control for ZoneMinder with eyeZm, the premiere iOS app for use with ZoneMinder.

Visit http://eyezm.com for more info, and subscribe to our RSS feed at http://eyezm.com/rssfeed.xml for news and updates.
User avatar
muse
Posts: 3
Joined: Mon Feb 21, 2011 8:17 am

Re: ZM 1.24.3 + ffmpeg w/ libx264 install script for Ubuntu

Post by muse »

It would be great if someone could write a script to compile zoneminder 1.24.4 with the jpeg turbo library and the performance patch
this could drastically reduce cpu load.

Bye
blazingice3
Posts: 3
Joined: Mon Jun 20, 2011 9:46 am

Re: ZM 1.24.3 + ffmpeg w/ libx264 install script for Ubuntu

Post by blazingice3 »

I have used this script few times with a fresh install of Ubuntu server 11.04 and always get this message when I try to run sudo zmpkg.pl

Code: Select all

Can't connect: No such file or directory at /usr/local/share/perl/5.10.1/ZoneMinder/Debug.pm line 349
        ZoneMinder::Debug::Fatal('Can\'t connect: No such file or directory') called at /usr/local/bin/zmdc.pl line 168
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: ZM 1.24.3 + ffmpeg w/ libx264 install script for Ubuntu

Post by mastertheknife »

blazingice3 wrote:I have used this script few times with a fresh install of Ubuntu server 11.04 and always get this message when I try to run sudo zmpkg.pl

Code: Select all

Can't connect: No such file or directory at /usr/local/share/perl/5.10.1/ZoneMinder/Debug.pm line 349
        ZoneMinder::Debug::Fatal('Can\'t connect: No such file or directory') called at /usr/local/bin/zmdc.pl line 168
Fixed in zoneminder 1.24.4.

mastertheknife
Kfir Itzhak.
tfuller
Posts: 20
Joined: Tue Jun 14, 2011 10:07 pm

Re: ZM 1.24.3 + ffmpeg w/ libx264 install script for Ubuntu

Post by tfuller »

I am trying this script on a freshly installed ubuntu server 11.04 32 bit, and I get this error. Configure error: zm requires libmysqlclient.a and then make and make install fail from there. Any ideas of what I'm doing wrong?
User avatar
muse
Posts: 3
Joined: Mon Feb 21, 2011 8:17 am

Re: ZM 1.24.3 + ffmpeg w/ libx264 install script for Ubuntu

Post by muse »

Hi,
i installed zm with the script in first post, changing it a little bit to install 1.24.4 instead 1.24.3... always went fine but when i try to lunch zm i get this error :

sudo /etc/init.d/zm start
Starting ZoneMinder: /usr/local/bin/zmfix: relocation error: /usr/local/lib/libavdevice.so.52: symbol av_new_packet, version LIBAVCODEC_52 not defined in file libavcodec.so.52 with link time reference
failure

I'm using Ubuntu 10.04 LTS

Any ideas ?
ffmpeg was not installed before launch the installation script..
Thanks
bye
User avatar
pete_c
Posts: 88
Joined: Thu Jan 24, 2008 3:21 am
Location: USA

Re: ZM 1.24.3 + ffmpeg w/ libx264 install script for Ubuntu

Post by pete_c »

asturgeon,

Thank-you for the script posted. I also changed it to 1.24.4.

Took 5 minutes on an Ubuntu 11.04 Server base with just SSH installed.

Noticing an issue going on with mootools. I saw the same with the 1.24.2 install on Unbuntu 11.04 with previous playing. I am not sure though if anyone else is seeing it. Its noticed when you utilize the montage view. It relates to two versions of mootools; 1.2.5 and 1.2.4. You just have to delete a symbolic link and add another one.


The fix is:
/usr/share/javascript/mootools# rm mootools-more.js


and
ln -s /usr/share/javascript/mootools/mootools-more-nc.js /usr/share/javascript/mootools/mootools-more.js
Zoneminder User

Box #1 and # 2 - Intel Ubuntu 14.04 64 bit server - Most current beta 1.28 - XX HD IP cams
Box #3 - AMD Ubuntu 14.04 64 bit server - Most current beta 1.28 - XX HD IP cams
Moved rest of analogue cams to Axis Servers and Grandstream cams.
User avatar
pete_c
Posts: 88
Joined: Thu Jan 24, 2008 3:21 am
Location: USA

Re: ZM 1.24.3 + ffmpeg w/ libx264 install script for Ubuntu

Post by pete_c »

I'm noticing that ZM is running at a "crawl" with two IPCams to test. I am not sure why as I do not see any errors in the log. The ZM page takes about 5-10 seconds to come up. If I SSH to the box; it too is very slow. If I shut down the ZM service then the PC goes to running normal.

I currently have one ZM box (production) which has an 8 port analogue card and 5 IP cams connected to it. Runs fast and just fine.

I am not sure what to make of this yet. When I tested the same OS; IE: Ubuntu 11.04 Server with ZM 1.24.2 its plenty fast. I really want to see though if I can migrate my production box to ZM 1.24.2. I built it twice last night with the same results.

This is what my syslog shows; not sure what to make of it though.
Jul 14 11:09:01 ICS-ZM2 CRON[4254]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete)
Jul 14 11:09:48 ICS-ZM2 zmc_m1[977]: INF [IP-154: 459000 - Capturing at 8.13 fps]
Jul 14 11:11:55 ICS-ZM2 zmc_m1[977]: INF [IP-154: 460000 - Capturing at 7.87 fps]
Jul 14 11:13:57 ICS-ZM2 zmc_m1[977]: INF [IP-154: 461000 - Capturing at 8.20 fps]
Jul 14 11:16:00 ICS-ZM2 zmc_m1[977]: INF [IP-154: 462000 - Capturing at 8.13 fps]
Jul 14 11:17:01 ICS-ZM2 CRON[4318]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jul 14 11:18:09 ICS-ZM2 zmc_m1[977]: INF [IP-154: 463000 - Capturing at 7.75 fps]
Jul 14 11:20:12 ICS-ZM2 zmc_m1[977]: INF [IP-154: 464000 - Capturing at 8.13 fps]
Jul 14 11:22:02 ICS-ZM2 zmc_m1[977]: INF [IP-154: 465000 - Capturing at 9.09 fps]
Jul 14 11:23:53 ICS-ZM2 zmc_m1[977]: INF [IP-154: 466000 - Capturing at 9.01 fps]
Jul 14 11:25:36 ICS-ZM2 zmc_m1[977]: INF [IP-154: 467000 - Capturing at 9.71 fps]
Jul 14 11:27:13 ICS-ZM2 zmc_m1[977]: INF [IP-154: 468000 - Capturing at 10.31 fps]
Jul 14 11:28:57 ICS-ZM2 zmc_m1[977]: INF [IP-154: 469000 - Capturing at 9.62 fps]
Jul 14 11:30:46 ICS-ZM2 zmc_m1[977]: INF [IP-154: 470000 - Capturing at 9.17 fps]
Jul 14 11:32:47 ICS-ZM2 zmc_m1[977]: INF [IP-154: 471000 - Capturing at 8.26 fps]
Jul 14 11:34:49 ICS-ZM2 zmc_m1[977]: INF [IP-154: 472000 - Capturing at 8.20 fps]
Jul 14 11:36:52 ICS-ZM2 zmc_m1[977]: INF [IP-154: 473000 - Capturing at 8.13 fps]
Jul 14 11:38:48 ICS-ZM2 zmc_m1[977]: INF [IP-154: 474000 - Capturing at 8.62 fps]
Jul 14 11:39:01 ICS-ZM2 CRON[4474]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete)
Jul 14 11:40:41 ICS-ZM2 zmc_m1[977]: INF [IP-154: 475000 - Capturing at 8.85 fps]
Jul 14 11:41:03 ICS-ZM2 zmpkg[4591]: INF [Command: stop]
Zoneminder User

Box #1 and # 2 - Intel Ubuntu 14.04 64 bit server - Most current beta 1.28 - XX HD IP cams
Box #3 - AMD Ubuntu 14.04 64 bit server - Most current beta 1.28 - XX HD IP cams
Moved rest of analogue cams to Axis Servers and Grandstream cams.
User avatar
pete_c
Posts: 88
Joined: Thu Jan 24, 2008 3:21 am
Location: USA

Re: ZM 1.24.3 + ffmpeg w/ libx264 install script for Ubuntu

Post by pete_c »

I tried it again about 3 times or so. I'm using a fresh build of Ubuntu 11.04 with just SSH as the option picked to install.

The script takes 5 minutes to install.

Same results each time.

The Zoneminder GUI takes probably 30 seconds to come up. I configured it with two IP cams. I can click on either cam and they come up fine.

I SSH to the box and I either get a time out or its extremely slow.

I stop the ZM service and the speeds of accessing SSH come back to normal.

I am not sure what it is that's slowing down ZM. Top doesn't show excessive CPU usage.

I am only changing the instance of the ZM install from 1.24.3 to 1.24.4

I will try a ZM 1.24.3 / Ubuntu 10.10.04 install instead today to see if that makes a difference. I will also give it a try in a VM today.

I am installing this on a Shuttle Atom based D510 with 2Gb of memory and a 160Gb Sata drive. Using VMWare; will choose dual core ample memory to test.

I have tested a ZM 1.24.2 installation on the same box with Ubuntu 10.10 and Ubuntu 11.04 server just fine.

My "production" ZM box is a core duo with 4Gb of memory running ZM 1.24.2 on recently installed Ubuntu 11.04 server with 8 analogue cams and 5 IP cams (13 total) with no issues at this time. The only additional application has been Webmin, shutting off the Nullmailserver, ZMXAP and fixing mootools.

If possible I would like to document a working plug n play set up on another forum (Home automation with use of the IPhone / IPad pieces)
Zoneminder User

Box #1 and # 2 - Intel Ubuntu 14.04 64 bit server - Most current beta 1.28 - XX HD IP cams
Box #3 - AMD Ubuntu 14.04 64 bit server - Most current beta 1.28 - XX HD IP cams
Moved rest of analogue cams to Axis Servers and Grandstream cams.
Locked