Compiling FFmpeg for Collax Business Server
I’m hosting our pictures on our CBS server and also would like to upload some videos. In order for Gallery to create video-thumbnails, FFmpeg is needed. Since there’s no default package for CBS available, I have to compile FFmpeg from the sources:
- Download the full nightly snapshot of the FFmpeg sources and unpack it
- wget http://ffmpeg.mplayerhq.hu/ffmpeg-checkout-snapshot.tar.bz2
- bzip2 -d ffmpeg-checkout-snapshot.tar.bz2
- tar -xf ffmpeg-checkout-snapshot.tar
- I had gcc and make already installed, but before the configure and make script worked, I also had to install:
- apt-get install libc6-dev
- apt-get install kernel-headers-current
- Call ./configure. I went with the default options for now - with one exception. In order to let make know that the headers for CBS already contain a definition of socketlen_t, I had to add that to the cflags for gcc. More options are available with ‘./configure –help’
- ./configure –extra-cflags=-DHAVE_SOCKETLEN_T
- When first gcc was invoked by make, it failed to locate linux/limits.h, although it was installed with the kernel-headers-current package. I had to set a symbolic link from /usr/local/include to the place where the files were installed.
- rm -rf /usr/local/include
- ln -s /usr/src/linux/include /usr/local/include
- After these preparational steps, invocation of make worked fine.
- Call ‘make install’ as a last step, and you should be done. An ‘which ffmpeg’ results in ‘/usr/local/bin/ffmpeg’.