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:

  1. Download the full nightly snapshot of the FFmpeg sources and unpack it
    1. wget http://ffmpeg.mplayerhq.hu/ffmpeg-checkout-snapshot.tar.bz2
    2. bzip2 -d ffmpeg-checkout-snapshot.tar.bz2
    3. tar -xf ffmpeg-checkout-snapshot.tar
  2. I had gcc and make already installed, but before the configure and make script worked, I also had to install:
    1. apt-get install libc6-dev
    2. apt-get install kernel-headers-current
  3. 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’
    1. ./configure –extra-cflags=-DHAVE_SOCKETLEN_T
  4. 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.
    1. rm -rf /usr/local/include
    2. ln -s /usr/src/linux/include /usr/local/include
  5. After these preparational steps, invocation of make worked fine.
  6. Call ‘make install’ as a last step, and you should be done. An ‘which ffmpeg’ results in ‘/usr/local/bin/ffmpeg’.

Tags: , ,

Leave a Reply