Updating ZM 1.28 to use turbo-jpeg *after* it is set up

Forum for questions and support relating to the 1.28.x releases only.
Post Reply
User avatar
asker
Posts: 1392
Joined: Sun Mar 01, 2015 12:12 pm

Updating ZM 1.28 to use turbo-jpeg *after* it is set up

Post by asker » Tue Mar 03, 2015 5:54 pm

Hello,
I've set up an ubuntu 14.04 desktop with ZM. I installed ZM 1.8 using instructions in this link:
http://www.zoneminder.com/wiki/index.ph ... e_easy_way

I'm now working on performance optimization, and discovered turbo-jpeg

I installed turbo-jpeg via the instructions provided (including creating the symlinks and doing an ldconfig
If I look at my /usr/lib for libjpeg it shows the right links

Code: Select all

root@camerapc:/usr/lib# ls libj* -l
lrwxrwxrwx 1 root root    20 Feb 28 14:19 libjbig2dec.so.0 -> libjbig2dec.so.0.0.0
-rw-r--r-- 1 root root 92384 Nov 29  2012 libjbig2dec.so.0.0.0
lrwxrwxrwx 1 root root    34 Mar  3 12:01 libjpeg.a -> /opt/libjpeg-turbo/lib64/libjpeg.a
lrwxrwxrwx 1 root root    15 Feb 28 14:19 libjte.so.1 -> libjte.so.1.0.0
-rw-r--r-- 1 root root 47544 Dec 23  2013 libjte.so.1.0.0
root@camerapc:/usr/lib# 
Now how do I make sure ZoneMinder is using these libs and not some libjpeg library in another path?

thanks
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

User avatar
asker
Posts: 1392
Joined: Sun Mar 01, 2015 12:12 pm

Re: Updating ZM 1.28 to use turbo-jpeg *after* it is set up

Post by asker » Tue Mar 03, 2015 6:56 pm

Okay, it looks like zmc/zma is still using libjpeg and not turbo. This is after I
a) added export LD_LIBRARY_PATH to /etc/init.d/zoneminder to point to turbo libs
b) did an apt-get uninstall zoneminder followed by an apt-get install zoneminder

Do I need to remove the zone minder package and compile from source? If so, how do I use the turbo libs and how to I ensure all my settings are not cleared?
thanks

r

Code: Select all

oot@camerapc:/usr/lib/x86_64-linux-gnu# lsof | grep libjpeg | grep www-data
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
zmc       9491        www-data  mem       REG                8,5    281288    3285698 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
zmc       9491 9556   www-data  mem       REG                8,5    281288    3285698 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
zmc       9491 9557   www-data  mem       REG                8,5    281288    3285698 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
zmc       9491 9558   www-data  mem       REG                8,5    281288    3285698 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
zmc       9510        www-data  mem       REG                8,5    281288    3285698 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
zmc       9519        www-data  mem       REG                8,5    281288    3285698 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
zmc       9519 9553   www-data  mem       REG                8,5    281288    3285698 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
zmc       9519 9554   www-data  mem       REG                8,5    281288    3285698 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
zmc       9519 9555   www-data  mem       REG                8,5    281288    3285698 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
zma       9559        www-data  mem       REG                8,5    281288    3285698 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
zma       9561        www-data  mem       REG                8,5    281288    3285698 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

User avatar
knight-of-ni
Posts: 2304
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Updating ZM 1.28 to use turbo-jpeg *after* it is set up

Post by knight-of-ni » Tue Mar 03, 2015 7:43 pm

I think you really mean libjpeg-turbo. libjpeg-turbo contains the turbjpeg api wihin it.
http://www.libjpeg-turbo.org/About/TurboJPEG

Ubuntu has been using libjpeg-turbo as the default libjpeg library for some time now.

Code: Select all

abauer@techeng-wks01:~/git/ZoneMinder/distros$ apt-file search /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
libjpeg-turbo8: /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
So you are in fact, already using it.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

User avatar
asker
Posts: 1392
Joined: Sun Mar 01, 2015 12:12 pm

Re: Updating ZM 1.28 to use turbo-jpeg *after* it is set up

Post by asker » Tue Mar 03, 2015 8:08 pm

Oh! *sheepish-grin*. I just finished recompiling source :lol: Looks like I wasted my time
I never knew about apt-file --> I just installed it and ran the same command. Based on reading it's help, it seems to be saying "libjpeg.so.8.0.2" is included in "libjpeg-turbo8" and no other package for ubuntu. So thusly, you can confirm that if I have that file, and ZM is using it, then that must have been installed by libjpeg-turbo8 which is what I was going for in the first place. Is that correct?

thanks!
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests