Skip to content

Installation: ffmpeg

acozine edited this page Aug 13, 2013 · 35 revisions

You must install ffmpeg largely from source - the package installation will not work with bawstun/HydraDAM.

  1. Set up your library paths before compiling the libraries
export LD_LIBRARY_PATH=/usr/local/lib/
sudo echo $LD_LIBRARY_PATH | sudo tee /etc/ld.so.conf.d/custom-libs.conf
sudo ldconfig
  1. The creators of ffmpeg maintain relatively up-to-date compilation guides - we recommend using the appropriate guide for your OS listed below. The guides are designed to be run using normal user privileges except for the final install step in each section - i.e. log-in as regular user to complete the guides, but replace each reference to # make install with either sudo make install (if your user has sudo privilege) OR su -c 'make install' as an alternative.
    Ubuntu: https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
    CentOS: http://ffmpeg.org/trac/ffmpeg/wiki/CentosCompilationGuide Alternate CentOS Installation: http://cumulusclips.org/docs/install-ffmpeg-x264-on-centos/

  2. Be sure to install libtheora (under Additional Libraries) before configuring/installing ffmpeg.

  3. Be sure to install libfaac before configuring/installing ffmpeg. NOTES:

  4. The audio codec libraries, Fraunhofer FDK AAC/libfdk_aac and libfaac, are not currently compatible with the GPL. In order to incorporate them into your ffmpeg build, you need to enable the nonfree configure option. Use the following instead of the configure line included in the compiliation guides

./configure --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libfaac

See the details on the ffmpeg site for further information.

  1. If you get the following error when configuring ffmpeg
    ERROR: libx264 not found
    1. Try running cd ~/ffmpeg-source/x264 | sudo ldconfig
    2. Try re-running the x264 section with the following configure line ./configure --enable-static --prefix=/usr
    3. Try re-running the x264 section with the following configure line ./configure --enable-static --disable-opencl
  2. Be sure to add all the libraries to your path with sudo ldconfig when you're done
  3. Confirm ffmpeg by copying a video onto the system, then executing
    ffmpeg -itsoffset -4 -i videofile.name -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 test.jpg
    and you should get a usable jpg file called test.jpg as a result
Clone this wiki locally