Build instructions for Libav

The OVITO package includes a binary version of the Libav library licensed under the GNU Lesser General Public License (LGPLv2.1). In accordance with the requirements of this license, this page provides instructions on how to rebuild a compatible version of the library from source code.

Windows

OVITO for Windows includes binaries that have been built from the unmodified sources of Libav 11.12. The following commands have been used to generate them:

# Compiler: Microsoft Visual C++ 2019 (command line tools) + MSYS2 environment
# Zlib version: 1.2.11
./configure \
   --toolchain=msvc \
   --disable-programs \
   --disable-static \
   --enable-shared \
   --prefix=../../libav \
   --extra-cflags=-I$PWD/../zlib/include  \
   --extra-ldflags=-L$PWD/../zlib/lib \
   --enable-zlib \
   --disable-doc \
   --disable-network \
   --disable-filters \
   --disable-debug
make install

Linux

OVITO for Linux includes shared libraries that have been built from the unmodified sources of Libav 11.12. The following commands have been used to generate them:

# Build platform: CentOS 6.9
# Compiler: GCC 7.1 (CentOS devtoolset-7)
./configure \
  --enable-pic \
  --enable-shared \
  --disable-static \
  --disable-doc \
  --disable-network \
  --disable-programs \
  --disable-debug \
  --disable-filters \
  --prefix=$HOME/progs/libav
make install

macOS

OVITO for macOS includes shared libraries that have been built from the unmodified sources of Libav 11.12. The following commands have been used to generate them:

export MACOSX_DEPLOYMENT_TARGET=10.12
./configure \
  --disable-network \
  --disable-programs \
  --disable-debug \
  --disable-doc \
  --disable-filters \
  --disable-static \
  --enable-shared \
  --prefix=$HOME/progs/libav
make install