On2 Flix Engine for Linux Installation

Topics

Preparing the System

Perform the following to prepare the system for installation:

  1. Read the System Overview document provided with this release.

  2. Verify Linux prerequisites.

    1. Operating System: x86 GNU/Linux with GNU C Library (glibc) version 2.3.2 or higher. To determine the version of glibc installed on your system, execute the following:

      $ /lib/ld-linux.so.2 /lib/libc.so.6

      This command should produce output similar to the following (note, your output may differ, however the version number should be equal or greater).

      GNU C Library stable release version 2.3.2, by Roland McGrath et al.
      Copyright (C) 2003 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions.
      There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
      PARTICULAR PURPOSE.
      Compiled by GNU CC version 3.3.3.
      Compiled on a Linux 2.4.26 system on 2004-05-24.
      Available extensions:
      
            GNU libio by Per Bothner
            crypt add-on version 2.1 by Michael Glad and others
            linuxthreads-0.10 by Xavier Leroy
            BIND-8.2.3-T5B
            libthread_db work sponsored by Alpha Processor Inc
            NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
                 
      Report bugs using the `glibcbug' script to <bugs@gnu.org>.
    2. Verify portmap is running.

      $ rpcinfo -p

      should produce output similar to the following:

      program vers proto   port
      100000     2   tcp    111  portmapper
      100000     2   udp    111  portmapper

      with perhaps additional ports and processes listed. If portmap is not running you may be able to start it by running it as root:

      # portmap

      or

      # rpc.portmap

      Your distribution may provide a start script for portmap. It will be installed in a location similar to:

      /etc/init.d/portmap

      or

      /etc/rc.d/rc.portmap

      You should add this to your system startup scripts so that if the machine reboots, flixd will be able to run. Additional information on portmap can be found in its man page. You can view this by typing:

      $ man portmap

      Note, it is possible for a distribution not to come preinstalled with portmap. Should any of the above commands fail, this is likely the case. You will have to install portmap before proceeding with the installation. Consult your distribution’s documentation for the appropriate package. As an example, on a Debian-based distribution you would run, as root:

      # apt-get install portmap
    3. Install additional codecs for decoding. On2 Technologies flixd uses MEncoder (http://www.mplayerhq.hu/).

      To fully function, it requires a codec pack be installed in /usr/local/lib/codecs. A suitable archive can be obtained at http://www.mplayerhq.hu/design7/dload.html#binary_codecs, with the ‘all’ codec pack providing the fullest input file support.

  3. Determine the languages that you want On2 Flix Engine for Linux to support. These language bindings are optional. You may install support for any combination of the languages below.

    The language bindings must be compiled before being installed. To ensure compatibility, this process must be done on the target machine and may require you to download support packages for your language of choice if they are not already installed. The details and prerequisites for each language can be found in the following sections. Installing any of the language bindings requires that you have gcc, the libc development files and make installed on your target machine. See your Linux distribution documentation for more information.

Java

Flix Engine supports Java version 1.3 or greater. Verify that you have a proper Java development environment installed by entering the following:

$ java -version && javac -version

should produce output similar to the following:

java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
javac 1.5.0_06
javac: no source files

If the command fails you will need to obtain a current version of the Java Development Kit (JDK) from http://java.sun.com or your distribution if it provides a separate installer.

After installing the JDK, you may have to set your JAVA_HOME environment variable to its install location. In a Bash shell you would run the following:

$ export JAVA_HOME=</path/to/jdk>

where </path/to/jdk> is similar to:

/usr/local/jdk1.5.0_06

You may also need to add $JAVA_HOME/bin to your path so you can run Java:

$ export PATH=$JAVA_HOME/bin:$PATH

Once the development environment is installed, you are ready to build the JNI bindings. The bindings consist of a jar file containing the class files, flixengine2.jar, and a shared object containing the JNI bindings themselves named libflixengine2_jni.so. These are installed in $JAVA_HOME/lib/ext and $JAVA_HOME/lib/<arch> (where arch is typically i386), respectively. Additional Javadoc documentation for the classes will be installed by default in /usr/local/src/flixmodules/flixjava/doc.

The above directories should be in Java’s default class path so you should only have to add the following to your Java code:

import com.on2.flix.*;

If this fails you can add -classpath .:flixengine2.jar to your javac command line.

Perl

Flix Engine supports Perl version 5.6.0 or greater. Note that earlier versions may work, but have not been tested nor will they be supported. You can verify that you have Perl installed by entering the following:

$ perl --version

you should see output similar to:

This is perl, v5.8.7 built for i486-linux

Copyright 1987-2005, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or the GNU General Public License, which may be found in the Perl 5
source kit.

Complete documentation for Perl, including FAQ lists, should be found
on this system using `man perl' or `perldoc perl'. If you have access to
the Internet, point your browser at http://www.perl.org/, the Perl Home
Page.

The flixengine2 Perl module does require the MakeMaker Perl module to build. This file is usually installed, but you can verify that it is by typing the following:

$ perl -e 'use ExtUtils::MakeMaker'

If the command succeeds there will be no output. Should the command fail you can download the appropriate Perl module from CPAN (http://cpan.org/).

Once the development environment is installed, you are ready to install the flixengine2 Perl module. The Perl module, named flixengine2.pm, will be installed into Perl’s system dependent module directory, similar to the following:

/usr/lib/perl5/site_perl/5.8.7/i486-linux/On2/

and

/usr/lib/perl5/site_perl/5.8.7/i486-linux/auto/On2

The flixengine2 module will be usable in your code by adding the following:

use On2::flixengine2;

PHP

Flix Engine supports PHP version 4 or higher. Verify that you have a proper PHP development environment installed. Being able to execute PHP scripts on your web server or command line is not necessarily indicative of this. Typically the development package comes with a utility called php-config.

$ php-config --version

should produce output similar to the following:

4.4.1

If this command fails, the PHP extension for Flix Engine will not be able to be built and installed.

You will need to download the PHP development package for your distribution. The development package may be named starting with something similar to php<version>-dev or php<version>-devel. Consult your distribution’s documentation for further details.

For example, to install the PHP4 development packages on a Debian-based distribution you would run, as root:

# apt-get install php4-dev

Once the development environment is installed, you are ready to build and install the PHP extension. This consists of a shared object file named flixengine2.so and a PHP wrapper called flixengine2.php. They are installed to php-config --extension-dir and php-config -extension-dir/.., respectively.

Since the latter takes care of loading the shared object, all you should have to add to your code is the following:

include('flixengine2.php')

After building and installing the PHP extension, the above include may still fail. This means that PHP cannot locate the wrapper or shared object file. This error is usually caused because either or both of the files are not in PHP’s search path(s).

This error can be fixed by modifying one or two variables in your php.ini file. The first, include_path, should contain the path to flixengine2.php. The second, extension_dir, should contain the path to flixengine2.so, as described above. Your distribution may have separate php.ini files for each use of PHP: command line, CGI, Apache, etc. If this is the case, a php.ini will be contained in a subdirectory named similar to the examples given.

Further information about the php.ini file can be found at: http://www.php.net/manual/en/ini.core.php.

Python

Flix Engine supports Python 2.2 or greater. You can verify Python is installed by entering the following:

$ python -V

should produce output similar to the following:

Python 2.4.1

Verify that you have a proper Python development environment installed.


$ echo "#include <Python.h>" >foo.c && python -c "from distutils.core import *;
      setup(ext_modules=[Extension('foo',['foo.c'])])" build --build-base foo-build;
      rm -r foo.c foo-build

If this command succeeds you should see output similar to the following:

running build
running build_ext
building 'foo' extension
creating foo-build
creating foo-build/temp.linux-i686-2.4
gcc -pthread -fno-strict-aliasing -DNDEBUG -O3 -march=i486 -mtune=i686 -
fPIC -I/usr/include/python2.4 -c foo.c -o foo-build/temp.linux-i686-2.4/foo.o
creating foo-build/lib.linux-i686-2.4
gcc -pthread -shared foo-build/temp.linux-i686-2.4/foo.o -o foo-build/lib.linux-
i686-2.4/foo.so

If the command fails, you’ll need to install the Python development package for your distribution. The development package is usually named starting with something similar to python<version>dev or python<version>-devel. Consult your distribution’s documentation for further details.

For example, to install the Python 2.4 development package on a Debian-based distribution you would run the following:

# apt-get install python2.4-dev

Once the development environment is installed, you are ready to install the flixengine2 Python extension. The extension, named flixengine2.py, will be installed in Python’s system dependent extension directory, similar to the following:

/usr/lib/python2.4/site-packages/

The flixengine2 extension will be usable in your code by adding the following:

import flixengine2

Installation Instructions

To install On2 Flix Engine for Linux:

1. Accept the EULA

Execute the installer script provided. The exact filename may differ from the one shown here:

# ./flix-engine-installer-linux-8.0.6.0.bin

The On2 Flix Engine End User License Agreement (EULA) displays. Press the Space Bar to advance from one page to the next. Be sure to read and understand the license before proceeding. When complete, the following prompt displays:

Do you accept these conditions (yes/no)?

The answer must be typed as the full text of the appropriate word. Answer “no” to terminate the installation process. Answer “yes” to proceed.

2. Verify Prerequisites

The next screen examines the system for prerequisite software needed by the On2 Flix Engine or its installation process. When successful, the following displays:

On2 Technologies Flix Engine archive unpacker (version 8.0.6.0).
    created on: Thu Oct 19 15:34:44 EDT 2006

root privileges detected

Looking for required programs for installation:
    awk. bash. cat. cp. cut. dd. file. grep. head.
    install. ln. ls. md5sum. rm. rmdir. sed. sort. tail.
    tar. touch. tr. uname. uniq. wc. which.
Please make sure you have at least 30MB of space in /root.

*** This installer supports non interactive installations.***
Type ./flix-engine-installer-linux-8.0.6.0.bin --help for more information

Press enter to continue or ctrl-c to quit.

Failure to find any of the required installation programs results in a fatal error that terminates the installation. The required package will be available in your Linux distribution, but will not be installed. Check your distribution’s documentation for details.

For more information about md5sum see http://www.gnu.org/software/textutils/textutils.html or check your Linux distribution’s documentation.

Press Enter to advance to the next step.

3. Uninstall the Previous Version

The next screen gives you the chance to uninstall a previous version of On2’s Flix Engine before installing the new one. If you have previously run an installer and have not already uninstalled the engine by running flix-engine-uninstall.sh it is strongly recommended that you answer y to the following questions as shown.

*** It is STRONGLY recommended that you uninstall any previous versions      ***
*** of Flix Engine Linux before attempting to install this one.              ***
*** The uninstaller is named flix-engine-uninstall.sh and will be located in ***
*** the same directory as the flixd binary.Setup can attempt to locate and   ***
*** execute this script.                                                     ***

Have you ever run a Flix Engine Linux installer on this machine before (y/n)? y
Would you like setup to search common install locations for copies of 
flix-engine-uninstall.sh (y/n)? [y]:

This response will perform a search of /usr and /opt for copies of the uninstaller script. If one is found the following will be displayed:

Searching for flix-engine-uninstall.sh in /usr and /opt...
     Found /usr/local/sbin/flix-engine-uninstall.sh
     Would you like to execute this script (y/n)? [y]:

Press Enter or type y to run the uninstaller and remove the previous version from your system.

If you chose to install the previous version in a non-standard location, this search may find nothing, in which case the following will be displayed:

Searching for flix-engine-uninstall.sh in /usr and /opt...
    No copies of flix-engine-uninstall.sh were found.
    Would you like setup to perform a more complete search for
    flix-engine-uninstall.sh (y/n)? [y]:

If you are certain that you have a version of On2’s Flix Engine already installed, it is recommended that you answer y to the above question to search the entire system (with the exception of: /proc, /var and /dev). This process may take a few minutes to complete. If a copy of the uninstaller is found during this search, you will be propmted to execute it. Once complete the following will display:

Press Enter to proceed to the main installation menu or ctrl-c to quit.

Press Enter to proceed to the next section.

4. Verify Language Support

The archive is unpacked and optional packages are located. These packages include development environments for the various languages supported by the On2 Flix Engine. If one of these packages is not found, installation can proceed, but that language will not be supported by this installation. If you want to use that language with the On2 Flix Engine, the development package for that language must be installed from your Linux distribution. For example:

checking prerequisites for Java language bindings ... 
WARNING: Java not installed or can't be found:
WARNING: disabling the install of the Java language bindings.
WARNING: The Java language bindings are REQUIRED to run the Java samples.
WARNING: The Java samples will NOT function properly until Java language
WARNING: bindings are installed.
Note:
Some Linux distributions provide separate packages for the runtime and development environments for each language. Therefore, even if you can execute a script or run a program, the On2 Flix Engine may require extra software be installed in order to build the Flix extensions. Since extending languages on a very low level (as Flix does) is not a common user operation, the development environment for your language of choice may not be installed by default. See Chapter 1: Preparing the System for more information.

5. Register On2 Flix Engine

To register, the machine must be connected to the Internet.

After the prerequisites have been verified, a registration screen similar to the following will be displayed:

Flix Engine Registration
------------------------
Username:
Serial number:

Complete the prompts using the registration information provided to you by On2. Upon successful registration, the following confirmation is displayed:

Successfully retrieved flix engine license.

If you wish to install without registering, you may re-execute the installer script using the --offline option.

Note that while you may install without registering, the engine will be unusable until a license is properly applied. If the --offline option is used, the installer will display instructions for applying license information at a later time.

6. Configure the Installation

A menu displays the default installation options. These options can be adjusted to suit the tastes of the system administrator or for better conformance with your Linux distribution’s practices. For example:

Flix Engine Installation and Configuration Options
--------------------------------------------------
1) Flix binary files   : /usr/local/sbin
2) Flix library files  : /usr/local/lib
3) Flix header files   : /usr/local/include/flixengine2
4) Support libraries   : /usr/local/lib
5) On2 mencoder binary : /usr/local/libexec/on2/flixengine
6) Documentation and Samples --->
7) Language Binding Configuration --->
8) Flixd Options (Advanced) --->
-------------------------------------------------
p)refix s)ave r)eset q)uit
Choose an option:

The following settings from this menu are tunable:

In addition to changing the settings, the following options are available:

Flix Engine Samples and Documentation
-------------------------------------
0) Previous Menu --->
1) Flixd man page                   : /usr/local/man
2) Flix Engine documentation        : /usr/local/share/doc/on2/flixengine
3) C,Java,Perl,PHP,Python samples   : /usr/local/share/on2/flixsamples
-------------------------------------
Choose an option:

The following settings are tunable on this menu:

In addition to changing the settings, the following options are available:

Flix Engine Language Bindings Configuration
-------------------------------------------
0) Previous Menu --->
1) Language Binding Sources              : /usr/local/src/flixmodules
2) Install Java Binding Sources          : y
3) Install Perl Binding Sources          : y
4) Install PHP Binding Sources           : y
5) Install Python Binding Sources        : y
6) Compile and Install Language Bindings : y 
-------------------------------------------
Choose an option:

The following settings are tunable on this menu:

In addition to changing the settings, the following options are available:

Flixd (Encoding Daemon) Options
-------------------------------
0) Previous Menu --->
1) Log file or syslog               : syslog
2) Log level                        : 2
3) PID file                         : /var/run/flixd.pid
4) TCP listen port                  : any
5) Bind interface                   : any
6) Max concurrent encoding sessions : -1
-------------------------------
Choose an option:

The following settings are tunable on this menu:

In addition to changing the settings, the following options are available:

After making any necessary changes, enter s at the Main menu to continue the installation. Review the installation summary:

Current installer settings:
-------------------------------------------------------------------------
Flix Binaries            : /usr/local/sbin
Flix Libraries           : /usr/local/lib
Flix Headers             : /usr/local/include/flixengine2
Mencoder Binary          : /usr/local/libexec/on2/flixengine
Support Libraries        : /usr/local/lib
flixd options            : log=syslog,loglevel=2,pid=/var/run/flixd.pid,
                           port=any,iface=any,maxsn=-1
Language Binding Sources : /usr/local/src/flixmodules
Language Bindings        : Perl PHP Python Java
Compile/Install Bindings : y
Samples                  : /usr/local/share/on2/flixsamples
Documentation            : /usr/local/share/doc/on2/flixengine
-------------------------------------------------------------------------

Enter “y” at the following prompt:

Do you wish to use these settings and continue (y/n)?

7. Install Files

For a system that has not previously installed the On2 Flix Engine, the installation process is completely automated. On systems with previous installations, the installer may prompt to delete or overwrite files. In general, choose to delete or overwrite files unless there is a specific reason to retain a file.

8. Configure the System

The installer creates service startup and shutdown scripts. The On2 Flix Engine can be started automatically at boot time. The specific question will vary between Linux distributions:

Add /etc/rc.d/rc.flixengine to system startup file /etc/rc.d/rc.local (y/n)? [y]:

or

Add links for system startup and shutdown (y/n)? [y]:

If any libraries are installed in paths not supported by your distribution, they must be added to the ld.so.conf file. The installer will prompt you to do so, if necessary:

WARNING: /opt/flix/lib not found in ld.so.conf.
Would you like to add /opt/flix/lib to /etc/ld.so.conf (y/n)? [y]:

9. Build Optional Modules

The selected modules are compiled and installed in the following order: Perl, PHP, Python, Java. For each module, the path to the module files is first displayed, and installation is paused before compiling:

Perl module files are installed in:
  /usr/local/flixmodules/flixperl.

Ready to compile Perl module.
Press Enter to continue or type skip to skip this step:

If an error occurs, the following message will be printed:

WARNING! There was an error compiling the Perl module.
You can try to recompile by running
sh /usr/local/flixmodules/compile-flix-perl-module.sh

If an error occurs, please review the steps in Chapter 1: Preparing the System.

10. Installation Complete

If successful, the On2 Flix Engine starts and the following displays:

Would you like to start the Flix Engine encoding daemon now (y/n)? [y]:
Executing '/etc/init.d/flixengine start'
Started Flix Engine.
Flix Engine encoding daemon started.
To stop the daemon: /etc/init.d/flixengine stop

                      *** INSTALLATION SUMMARY ***
-----------------------------------------------------------------------
Flix Binaries : /usr/local/sbin
Flix Libraries : /usr/local/lib
Flix Headers : /usr/local/include/flixengine2
MEncoder Binary : /usr/local/libexec/on2/flixengine
Support Libraries : /usr/local/lib
flixd options : log=syslog,loglevel=2,pid=/var/run/flixd.pid,
                port=any,iface=any,maxsn=-1
Language Binding Sources : /usr/local/src/flixmodules
Language Bindings : Perl PHP Python Java
Compile/Install Bindings : y
Samples : /usr/local/share/on2/flixsamples
Documentation : /usr/local/share/doc/on2/flixengine
-----------------------------------------------------------------------
Thank you for using On2 Technologies Flix Engine.
Press Enter to continue...

Flix Engine API and sample documentation can be found in
/usr/local/share/doc/on2/flixengine.
Further details on flixd can be found in its man page. If
/usr/local/man is in your MANPATH 'man flixd' will bring it up.

Please check the FAQ
(http://support.on2.com/on2-flix-faq/enginefaq-linux/)
for the latest support updates.

For any further questions please email flixsupport@on2.com. Make sure to
include the word(s) 'flixd' or 'flix engine linux' in the subject field.
If your query is related to an install failure make sure you attach the
install log and include any relevant system information in the message.

A log of this installation can be found here:
  /root/incoming/flix-engine-installer-linux-8.0.6.0.bin.log

Additional Resources

For additional information on the On2 Flix Engine for Linux, refer to the comprehensive API documentation. The path to this documentation is specified during the install process and defaults to /usr/local/share/doc/on2/flixengine. The API documentation is available in both HTML and PDF format.

Be sure to check http://support.on2.com/ for the latest helpful support information or contact flixsupport@on2.com for any support questions. Please include the words “flixd” or “flix engine linux” in the subject of all emails related to this product.

On2 Technologies, Inc.
21 Corporate Drive, Suite 103
Clifton Park, NY 12065

Version: 041008FELI