Skip to content
AVbin is a C library that provides a thin, cross-platform wrapper around Libav’s video- and audio-decoding functionality, providing long-term binary compatibility for applications and languages that need it. See also: Pyglet, a python media framework that makes extensive use of AVbin.
C Shell NSIS Makefile
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
avbin.pmdoc Trying a different PackageMaker setting to see if it installs with th… Oct 23, 2012
example Fixed the copyright notices, license notices, and contributor list to… Jun 21, 2013
include Fixed AVbinInfo.version to be exactly the same type of integer as oth… Jul 1, 2013
libav @ 720a1de Updating the libav submodule to the latest upstream master branch com… Jun 21, 2013
src Fixed AVbinInfo.version to be exactly the same type of integer as oth… Jul 1, 2013
.gitignore Ignore build files, we never commit them. Oct 1, 2013
.gitmodules Added libav submodule from the AVbin fork of libav so we can maintain… Jun 22, 2012
CHANGELOG Updated the CHANGELOG with progress so far. Created an UPGRADING file… Jun 21, 2013
COPYING.LESSER Initial import. Aug 5, 2007
Doxyfile Modified the Doxyfile using Doxygen's OS X frontend. Updated the READ… Aug 23, 2012
Makefile Issue #24: Added avbin_get_info() function. Aug 7, 2012
PRERELEASE Bumped to alpha5 in preparation for another prerelease. Jun 10, 2013
README.md Added the 'new maintainer' note in hopes of locating a new champion. Jan 14, 2017
UPGRADING Updated the CHANGELOG with progress so far. Created an UPGRADING file… Jun 21, 2013
VERSION Bumped version to 11-alpha1. Disabled the frame_rate feature due to u… Oct 22, 2012
avbin.nsi Updated the windows installer config so that it correctly installs th… Aug 28, 2012
build.sh Increased the parallel option for make from -j4 to -j9, since my new … Jul 1, 2013
common.configure Increased the parallel option for make from -j4 to -j9, since my new … Jul 1, 2013
dist.sh Found another spot in the linux installer to add prerelease info to t… Nov 26, 2012
linux-x86-32.Makefile Statically linking libbz2 on 64-bit linux isn't working (wasn't compi… Nov 26, 2012
linux-x86-32.configure Issue #25: For Linux 32-bit files, reduced the configure and Makefile… Aug 9, 2012
linux-x86-64.Makefile Statically linking libbz2 on 64-bit linux isn't working (wasn't compi… Nov 26, 2012
linux-x86-64.configure Issue #25: For Linux 64-bit files, reduced the configure and Makefile… Aug 8, 2012
linux.install.sh Found another spot in the linux installer to add prerelease info to t… Nov 26, 2012
macosx-x86-32.Makefile Issue #25: For OS X files, made the configure and Makefile options an… Aug 9, 2012
macosx-x86-32.configure Issue #25: For OS X files, made the configure and Makefile options an… Aug 9, 2012
macosx-x86-64.Makefile Issue #25: For OS X files, made the configure and Makefile options an… Aug 9, 2012
macosx-x86-64.configure Issue #25: For OS X files, made the configure and Makefile options an… Aug 9, 2012
macosx.install.sh Update macosx.install.sh Oct 2, 2012
runtest.sh Making it so that you can choose which media file to test with runtes… Oct 1, 2013
win32.Makefile Issue #25: For Windows (32- and 64-bit) files, reduced configure and … Aug 8, 2012
win32.configure Issue #25: For Windows (32- and 64-bit) files, reduced configure and … Aug 8, 2012
win64.Makefile Issue #25: For Windows (32- and 64-bit) files, reduced configure and … Aug 8, 2012
win64.configure Issue #25: For Windows (32- and 64-bit) files, reduced configure and … Aug 8, 2012

README.md

AVbin

Home: http://avbin.github.com

Maintainer: Nathan Stocks nathan.stocks@gmail.com

NOTE: Pyglet needs a new maintainer. If there are any volunteers, please contact Nathan Stocks.

End-User Installation

End-users should use the installers provided in the binary release. That is one of the benefits of a binary distribution, after all...

Developing

AVbin is a C library following standard conventions.

Clone the git repository:

git clone https://github.com/AVbin/AVbin.git avbin

See the header file include/avbin.h and the online API documentation at http://avbin.github.com/AVbin/Docs.html

Building

If you are interested in testing, contributing code, or otherwise helping out, we encourage you to join the Pyglet mailing list (AVbin was originally created for the Pyglet project). See http://pyglet.org/contribute.html

AVbin is designed to be used with a particular version of Libav. This version of Libav is included as a git submodule of the AVbin project under the libav directory. Note that this version of Libav may contain AVbin-specific patches, though we try to get all patches accepted upstream.

Use the included build.sh script to compile AVbin. This takes care of configuring Libav correctly, compiling it, then linking it with the AVbin sources. The final AVbin libraries are placed in the dist directory.

To build on your platform, use the included build.sh script. See build.sh --help for usage information.

If you are planning on distributing the self-built binary to anyone other than yourself, please create a PRERELEASE file in the root of the project directory containing a version modifier such as -my-version. get_avbin_info()->version_string would then return 10-my-version for a custom build of AVbin 10, while get_avbin_info()->version will still return the integer 10.

Building for OS X

On OS X Lion (10.7) and Mountain Lion (10.8)

  • Install Xcode (from Apple's App Store)
  • Open Xcode, and go to Preferences > Downloads > Components and install the Command Line Tools package.
  • Install yasm (You can install HomeBrew from http://brew.sh and then run brew install yasm to install yasm)
  • Obtain and install Auxiliary Tools for Xcode (from developer.apple.com > Mac Dev Center > Developer Downloads)
  • Run ./build.sh [desired options and target]

On OS X Mavericks (10.9)

  • Install Xcode from the App Store
  • Run xcode-select --install in your terminal and click Install on the dialog that pops up.
  • Install yasm (You can install HomeBrew from http://brew.sh and then run brew install yasm to install yasm)
  • Run ./build.sh [desired options and target]

Building for Linux

Tested on a default install of Ubuntu 12.04 LTS (both 32- and 64-bit installs).

  • Install yasm: sudo apt-get install yasm
  • Install libbz2-dev: sudo apt-get install libbz2-dev
  • (If you want to make the binary installer) Install makeself: sudo apt-get install makeself
  • Run ./build.sh [desired options and targets]

Building for Win64 or Win32 (crosscompiling on Linux)

Tested on Ubuntu 12.04 LTS 64-bit.

  • Install MinGW-64: sudo apt-get install mingw-64
  • (If you want to make the binary installer) Install nsis: sudo apt-get install nsis nsis-doc
  • Cross-compile zlib and install it:
    wget http://zlib.net/zlib-1.2.7.tar.gz
    tar zxvf zlib-1.2.7.tar.gz
    cd zlib-1.2.7

    # For win32...
    make PREFIX=i686-w64-mingw32- -f win32/Makefile.gcc
    sudo make PREFIX=i686-w64-mingw32- \
      LIBRARY_PATH=/usr/i686-w64-mingw32/lib \
      INCLUDE_PATH=/usr/i686-w64-mingw32/include/ \
      BINARY_PATH=/dev/null \
      -f win32/Makefile.gcc install
    make -f win32/Makefile.gcc clean

    # For win64...
    make PREFIX=x86_64-w64-mingw32- -f win32/Makefile.gcc
    sudo make PREFIX=x86_64-w64-mingw32- \
      LIBRARY_PATH=/usr/x86_64-w64-mingw32/lib \
      INCLUDE_PATH=/usr/x86_64-w64-mingw32/include/ \
      BINARY_PATH=/dev/null \
      -f win32/Makefile.gcc install
  • Cross-compile bzlib and install it
    wget http://bzip.org/1.0.6/bzip2-1.0.6.tar.gz
    tar zxvf bzip2-1.0.6.tar.gz
    cd bzip2-1.0.6/

    # For win32...
    make CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar \
      RANLIB=i686-w64-mingw32-ranlib PREFIX=/usr/i686-w64-mingw32 libbz2.a
    sudo cp libbz2.a /usr/i686-w64-mingw32/lib/
    sudo cp bzlib.h /usr/i686-w64-mingw32/include/
    make clean

    # For win64...
    make CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar \
      RANLIB=x86_64-w64-mingw32-ranlib PREFIX=/usr/x86_64-w64-mingw32 libbz2.a
    sudo cp libbz2.a /usr/x86_64-w64-mingw32/lib/
    sudo cp bzlib.h /usr/x86_64-w64-mingw32/include/
  • (For creating dist zipfile) Install 7-Zip: sudo apt-get install p7zip-full

  • Run ./build.sh [desired options and targets]

Caveats

AVbin is currently known to function on the following platforms

  • Linux x86 (32- and 64-bit)

  • Mac OS X 10.6 - 10.8 (32- and 64-bit)

  • Windows XP (32-bit)

  • Windows 7 (64-bit)

Creating a Distribution

  • Using the same value for platform as the build you just did, run:

    ./dist.sh [platform]

Creating Documentation

Installation and Usage

Run the binary installer, or place the resulting avbin.so, avbin.dylib or avbin.dll from the dist directory into the appropriate system directory.

The AVbin dynamic library exports all of Libav's functions from libavcodec, libavutil, libavformat, and libswscale. It also exports some higher-level functions which have a fixed ABI (they will not change in incompatible ways in future releases), documented in include/avbin.h.

License

Due to the linkage between AVbin and Libav, AVbin must be licensed under the LGPL or GPL. Currently all GPL features of the Libav configuration are disabled, and AVbin is licensed under the LGPL.

You should see the accompanying COPYING.LESSER file for details. In summary, you must note the usage of AVbin within the documentation of your application. If you make changes to either library, you must either contribute said changes upstream or include the sources of these changes within your distributed application.

Contributions

Who | Role

Nathan Stocks | Project maintainer Alex Holkner | Original author, original maintainer Micah Richert | Contributed original macosx-x86-64 and win64 build scripts Anatoly Techtonik | C++ integration Jernej Virag | C code additions and updates, build script updates Jeremy Lujan | OS X install script patches. Tim Sheerman-Chase | avbin_seek_file() patches and Visual Studio 2010 compatibility

You can’t perform that action at this time.