Ubuntu 10.10 install script with x264 support

Forum for questions and support relating to the 1.24.x releases only.
buddyp
Posts: 6
Joined: Tue Nov 02, 2010 1:13 am
Location: Lake Villa, Illinois

Acolades

Post by buddyp »

Thank you letsharehowto & Panda for all your knowledge and sharing.
Total newbie at security cam apps
User avatar
jdhar
Posts: 125
Joined: Fri Oct 01, 2010 9:15 pm
Location: California

Post by jdhar »

Good work Pada.

I didn't even see this post, but have been struggling for 3 days to get ZoneMinder + FFMPEG + x264 working on Ubuntu Lucid LTS, and finally have. I will just post briefly about my experience, and if anyone wants more details, they can ask.

I ended up in apt-get package hell; my big mistake was actually installing ZoneMinder from Ubuntu package along with the libavcodec/avutil stuff.. because FFMPEG requires a build from source for x264, this did not play nicely with APT-get.

What I found was the easiest way was to nuke the ZoneMinder, FFMPEG and libav* packages. Then:

1. Build FFMPEG from SVN with --lib-x264 --enable-shared options. This builds the libav* stuff, and then it doesn't conflict with the packages.
2. Build ZoneMinder from source pointing to FFMPEG

This worked beautifully. Building ZoneMinder from source isn't bad actually, but I can see how people who haven't build from source before may find it daunting.
eyeZm, Native iPhone App for ZoneMinder: http://www.eyezm.com

Version 1.3 now available on iTunes, introduces Montage view, HTTPS/SSL support and H264 native streaming!

Subscribe to RSS feed for updates: http://www.eyezm.com/rssfeed.xml
Pada
Posts: 69
Joined: Fri Jul 30, 2010 12:29 am

Post by Pada »

jdhar, Thanks for the feedback.

I've had so many issues with conflicts between FFMPEG that I installed from the package manager and FFMPEG that I've built from source.
Most of the time I ended up reinstalling Ubuntu. Eventually I ran my test systems in VirtualBox just so that I can recover faster :(
User avatar
jdhar
Posts: 125
Joined: Fri Oct 01, 2010 9:15 pm
Location: California

Post by jdhar »

Pada wrote:jdhar, Thanks for the feedback.

I've had so many issues with conflicts between FFMPEG that I installed from the package manager and FFMPEG that I've built from source.
Most of the time I ended up reinstalling Ubuntu. Eventually I ran my test systems in VirtualBox just so that I can recover faster :(
Yes, the conflict between FFMPEG and the libAV libraries was what killed me; that's why I decided to just manage FFMPEG + libav* + ZoneMinder manually. It works out better now because now an update on ffmpeg doesn't break the other two since they are compiled against the latest version of ffmpeg and not some older libraries installed by Ubuntu.

Oh well... that's Linux for you :)
eyeZm, Native iPhone App for ZoneMinder: http://www.eyezm.com

Version 1.3 now available on iTunes, introduces Montage view, HTTPS/SSL support and H264 native streaming!

Subscribe to RSS feed for updates: http://www.eyezm.com/rssfeed.xml
Pada
Posts: 69
Joined: Fri Jul 30, 2010 12:29 am

Post by Pada »

The restore points of the VM was a real lifesaver.

I'm quite impressed that you can actually install ZM + FFmpeg + libav* from the package manager and that it would work out of the box, but I would also prefer installing it from source code.
The primary reason for that is due to the bugs being fixed in the SVN versions of ZM.
buddyp
Posts: 6
Joined: Tue Nov 02, 2010 1:13 am
Location: Lake Villa, Illinois

Post by buddyp »

I can tell that I'm going to be following you guys. I've learned a lot in the past few days and hope to be learning a lot more. Installing from source taught me a lot but just from reading what you guys know, tells me that I have so much more to learn. I'm sure as upgrades occur I'll be right back in the thick of it. Its great to be able to come to a sight like this have the resources of people like you guys.
Total newbie at security cam apps
scarrz
Posts: 23
Joined: Thu Aug 20, 2009 12:40 pm

Post by scarrz »

I have ubuntu server 10.10 installed with ZM 1.24.2 via the directions in this post and everything seems to work correctly, I can add a monitor and it stays orange in monitor mode. When I click on the camera it now brings up the popup window with controls and a black box with the words "WAITING FOR VIDEO". I have no error reported in the /var/log/syslog other than its capturing video.

The one change I just did was the changes under Options > Images:

* STREAM_METHOD = mpeg
* MPEG_LIVE_FORMAT = asf

Prior to that I had no video box just the controls.

Any suggestions?
DREMA
Posts: 162
Joined: Fri Dec 12, 2008 2:39 am
Location: México

Post by DREMA »

What line do you use in FFMPEG_OUTPUT_OPTIONS to export the events in x264 ?
Pada
Posts: 69
Joined: Fri Jul 30, 2010 12:29 am

Post by Pada »

Drema:
You have to specify the vcodec as libx264 and you have to specify the codec presets.
You can try something like:
-vcodec libx264 -vpre hq -vpre main -sameq

There are a couple of presets and bitrate settings that you might want to experiment with. The -sameq could be replaced with -b <bitrate>k
eg. -vcodec libx264 -vpre hq -vpre main -b 1500k

Here are a couple of examples of FFmpeg and x264 presets: http://juliensimon.blogspot.com/2009/01 ... esets.html

scarrz:
Did you install ZM & FFmpeg from source or from the package manager?

Perhaps leave the format on asf and then see if you can stream the video using VLC. When you can get the URL by viewing the webpage's source, but you might have to change some of the characters like '&' to '&'.

You can also try the swf output format, but then your browser requires that shockwave/flash is installed.
dima_the_chieff
Posts: 4
Joined: Thu Dec 02, 2010 5:03 pm

Re: Setup Zoneminder 1.24.x on Ubuntu server with Pada scrip

Post by dima_the_chieff »

letsharehowto wrote:My box:
-Intel(R) Pentium(R) Dual CPU E2200 @ 2.20GHz, 2 cores
-Memory: 2G
-Dvr card: http://picasaweb.google.com/letsharehowto/DvrCard#
. . . . . .
Great thanks for this post!

Question about the DVR Card : is there 8 red lights on the back of the card, which lit when the corresponding chip is in poperation mode?

THanks 4 everyone!
letsharehowto
Posts: 10
Joined: Sun Oct 24, 2010 11:31 am
Location: Sai Gon - Viet Nam

Post by letsharehowto »

Yes, it have 8 red lights on the back of the card.

Windows OS:

- 8 lights lit about haft second when computer start and they solid when software for them be loaded.

Ubuntu OS:

- 8 lights lit about half second when computer start. That's it. They still off when Zoneminder running.
letsharehowto
Posts: 10
Joined: Sun Oct 24, 2010 11:31 am
Location: Sai Gon - Viet Nam

Post by letsharehowto »

Mine and this one: High Performance 8 Channel 240 FPS Zoneminder compatible BT878a DVR card ( http://www.camsecure.co.uk/Zoneminder.html ) is same one.
dima_the_chieff
Posts: 4
Joined: Thu Dec 02, 2010 5:03 pm

Post by dima_the_chieff »

letsharehowto wrote:Yes, it have 8 red lights on the back of the card.

Windows OS:

- 8 lights lit about haft second when computer start and they solid when software for them be loaded.

Ubuntu OS:

- 8 lights lit about half second when computer start. That's it. They still off when Zoneminder running.
Hi All!

Thanks for reply.
I'm too, confirming the same behavior here.

May bee, there is some extra functionality in "native" DigiNet drivers, that control lights.
Also, it seems possible to "disable" some chips via that DigiNet interface, ex. if they are not used, and it seems this reduses chip's operating temperature (to the touch).
dima_the_chief
Pada
Posts: 69
Joined: Fri Jul 30, 2010 12:29 am

Post by Pada »

Guys, please try to keep to the original topic.
If you want to discuss DVR cards, please create a new thread instead, unless you have something (like drivers) that should be included in my installation script :)
Thermopyle
Posts: 3
Joined: Sun Dec 12, 2010 7:50 pm

Post by Thermopyle »

I'm just now starting to get in to ZM, and this topic has piqued my curiosity.

What advantages are to be had from using x264 instead of whatever ZM uses otherwise?
Locked