ffmpeg setup

Forum for questions and support relating to the 1.24.x releases only.
Locked
kevin_robson
Posts: 247
Joined: Sun Jan 16, 2005 11:26 am

ffmpeg setup

Post by kevin_robson »

I was hoping someone could explain how the ffmpeg installation works, in respect of building from source, on ubuntu.
Time and time again people are hitting problems with different versions of ffmpeg, and upgrades to distros breaking things.

What I'd like to do is have a seperate install of ffmpeg just for zm. So the distro has it's own packaged ffmpeg which is in /usr/bin and /usr/lib, and we have our own static and older version in say /opt/ffmpeg.

I thought I'd got this working before in the past using:

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --disable-shared --enable-static --enable-pthreads --prefix=/opt/ffmpeg

and then in configure command:
configure --with-webdir=/var/www/zm --with-cgidir=/usr/lib/cgi-bin/zm --with-webuser=www-data --with-webgroup=www-data --with-ffmpeg=/opt

Anyway, this doesn't really seem to be working for me so well, and ZM is still trying to look at lib files in /usr/lib. The configure command is warning me of various bits being required for streaming.

Looking at the Ubuntu guides, (http://www.zoneminder.com/wiki/index.ph ... _Cambozola) there is a bit of symbolic linking and ldconfig going on, but I'm not sure exactly what it is doing. I'm happy to just blindly follow that guide, but my assumption is that the minute I install ffmpeg from package (as mythtv will) it will all break again.

What I'm after is a bit of a definitive guide as to how to get around this issue of:
1. Version specifics of ffmpeg (can we have a preferred version no for each release)
2. Compilation flags for ffmpeg
3. configure commands for zm, to match the above
4. any extra stuff, like ldconfigs that should be done.
5. coexistance of a zoneminder ffmpeg install and a seperate distro installed version

I know this is quite a broad and general question, but ffmpeg seems to cause more issues on here than anything else, and I'd like to understand how people deal with it.

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

Re: ffmpeg setup

Post by asturgeon »

The thing is, if it was possible to have a definitive guide, it would be done already because so many people suffer with ffmpeg. It's a great software package in what it achieves, but it changes so much and breaks things all too often, so I share in your frustration.

I wil give some generic advice.. Firstly, trying to run 2 versions at the same time is really not a good idea unless you absolutely must. I switch versions quite a bit, but only maintain one installed version since I have tried 2 without success. I have some generic suggestions:

- nuke all ffmpeg packages, and the libraries it installs first... This is a must. This means libavcore, libavutil, libavformat etc...
- once you sync up to their SVN tree and build from source successfully, switching versions is a synch... Their compilation process is mostly unchanged, so you just sync up to the right version you want, and make install.
- one additional step I added is to use ubuntu checkinstall. This basically fakes a package for you such that when you install other things that require ffmpeg (like mythtv), it doesn't touch your ffmpeg install since you did a fake install.

Stay away from ffmpeg packages, that's my main advice. Our eyezm user guide has some pointers on building from source, so it may be of some use to you: http://eyezm.com/help (under h264).
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.
kevin_robson
Posts: 247
Joined: Sun Jan 16, 2005 11:26 am

Re: ffmpeg setup

Post by kevin_robson »

Thanks. That looks useful, especially the install guide.
I'll get the configure options from the ubuntu package, nuke it, then start again using that config.

From experience, do you know what revisions work with which versions of zm?
And is it normal to get the errors about lib****.h required for MPEG streaming. Is this fixable, or just permanently broken?

Thanks again though, that something to get me started on.
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: ffmpeg setup

Post by mastertheknife »

asturgeon is right, ffmpeg changes all the time without much notice and breaks compatibility with applications very often. ffmpeg is a big headache for many developers.
ffmpeg is open source done wrong.

When in doubt, use ffmpeg from SVN.

mastertheknife
Kfir Itzhak.
User avatar
asturgeon
Posts: 23
Joined: Fri Apr 15, 2011 12:10 am

Re: ffmpeg setup

Post by asturgeon »

See if this thread helps you at all: http://www.zoneminder.com/forums/viewto ... 21&t=17665
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.
Locked