Frequently Asked Questions

General

PHP

Encoding

Answers

Where are the samples installed?

Samples are installed by default to /usr/local/share/on2/flixsamples. If you chose a different path at install time it will be located in the install summary section of the installer log, flix-engine-installer-linux-8.x.x.x.bin.log, which is created in the same directory that the installer is run from. Which samples are installed is dependent on the language bindings you chose to install. Further information about the examples and the differences when using the language bindings can be found within the API documentation.

Where is the API documentation installed?

Documentation is installed by default to /usr/local/share/doc/on2/flixengine; there are both HTML and PDF versions. If you chose a different path at install time it will be located in the install summary section of the installer log, flix-engine-installer-linux-8.x.x.x.bin.log, which is created in the same directory that the installer is run from.

Does the engine have support for multi-core/processor machines?

The VP6 Concurrency feature was added in v8.0.9.0. VP6 Concurrency allows the encode process to take advantage of multiple cores/processors, yielding a potentially significant gain in performance.

Flix Engine is not itself SMP-aware. Nevertheless, concurrent encodes on an SMP system with an SMP-aware kernel will realize a performance increase even when not using the VP6 Concurrency feature.

Does the Engine support 64-bit machines?

As of v8.0.7.1 we have added a 64-bit version of libflixengine2.so, the client-side RPC lib, to allow 64-bit language bindings to be built.

NOTE: Support has yet to be added to the installer. libflixengine2.so must be extracted and installed by hand. The best current procedure to install Flix ENgine Linux on a 64-bit system is:

  • Execute these instructions as a super-user (ie, root).
  • Make sure you have the 32-bit libc6 package installed on your system. This enables 32-bit programs on your 64-bit system.
  • Install any prerequisites you need, as specified in the Flix Engine documentation provided with the installer.
  • Start the Flix Engine installer, and proceed through the installer until the Registration page. At this point, the installer should have created and populated a temporary directory similar to this:

    $HOME/flix-engine-installer. (where  is a process id number)
  • Copy the 64-bit libraries to their destination:

    # cp -pP $HOME/flix-engine-installer./.flix-engine-installation-files/testing/lib64/* /usr/local/lib64
  • Add the lib directory, /usr/local/lib64, to your /etc/ld.so.conf file.
  • Run ldconfig with no arguments to add the path to the library path cache and set up links in the lib64 directory:

    # ldconfig
  • Now when you proceed with the Flix Engine install, change the install settings to install, but not build, any language bindings you will need (PHP, Perl, Python, Java).
  • When the install is complete, then you can cd to the flixmodules directory and run the scripts to build and install the bindings.

Building language bindings produces the error: ld: /usr/bin/ld: skipping incompatible /usr/local/lib/libflixengine2.so when searching for -lflixengine2

This is most likely from trying to build the bindings on a 64-bit machine. See the previous question, "Does the Engine support 64-bit machines?"

Do you have any hardware recommendations?

For the most part the bottleneck is the encode itself, so the faster the processor the better — though P4's are known to yield better results when encoding VP6 (Flash Video). When running concurrent encodes an SMP system will realize a performance increase as each encode session is run within its own thread and can be scheduled to an available processor as necessary.

When running the command line example, the following is output: Error calling Flix2_SetInputFile -> -1 error status-> sc:0 Flix2_Errno(flixerrno:-4, syserrno:10)

This output indicates that the Engine could not decode the input file. Make sure you have the correct codecs installed.

From the system overview document (contained in the installer archive):

"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."

I can't encode Real (.rm/.rmvb) input files.

If you have already installed the essential codec pack (as described above) and still cannot decode the file, you may require a supplemental archive. Please see: http://www.mplayerhq.hu/DOCS/HTML/en/codecs.html for further details.

/usr/local/lib/libflixengine2.so.0: cannot restore segment prot after reloc: Permission denied …

This can be caused if you are running SELinux. In particular, Fedora Core 2 and later offer this as an option in the installer. You will need to enable the use of shared libraries with text relocation in your SELinux policy. One way to do this is to run the following on the command line:

# setsebool allow_execmod=true

When building the language bindings (i.e. Java, Perl, PHP and/or Python) I get the following output: skipping incompatible /usr/local/lib/libflixengine2.so when searching for -lflixengine2

This is caused by trying to build the Engine on a 64-bit machine. Please see: "Does the Engine support 64-bit machines?", above.

I get this error when installing: Error: server response: host information does not match that supplied previously.

This error will occur in v8.0.6.0 and up. Our new installers enforce the license agreement by locking to the hardware, allowing installation on only one machine. If you need to migrate the Engine to another machine, we require a Letter of Transfer to be filled out and returned to us. Upon receipt, we will override the hardware lock, allowing you to switch machines.

What does my error code mean?

The function Flix2_errno has 2 parameters, flixerrno and syserrno.

Here is the flixerrno list:

  • ErrNone = 0
  • ErrSys = -1
  • ErrFileIO = -2
  • ErrFileOpen = -3
  • ErrFileDecode = -4
  • ErrFileDecodeA = -5
  • ErrFileDecodeV = -6
  • ErrEncodeA = -7
  • ErrEncodeV = -8

syserrno values are from the common dev file "errno.h".

Error calling Flix2_CreateEx -> -9

The cause for this error is usually that portmap or flixd isn't running. To verify portmap is running:

$ rpcinfo -p

… should produce output similar to the following:

program vers proto porta
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 may want to 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:

$ man portmap

To verify flixd is running:

ps -ef |grep flixd

To start flixd there's a start script that is distro-dependent, but will usually be one of:

/etc/init.d/flixengine start

or

/etc/rc.d/rc.flixengine start

Memory usage spikes, followed by flixd crashing

The most likely cause of this is a poorly interleaved file. A crash can be avoided by limiting your memory usage to 400-500MB with the FLIX_OGG_PHYMEM_PCTMAX environment variable.

When I try to encode to an H.264 FLV, I get the following error: Flix2_Errno: flixerrno:-1 syserrno:2

This error occurs because Flix Engine does not support H.264 in FLV. Flix Engine supports H.264 in MP4, MOV and, if they are part of your license, 3GP and 3G2 formats. Try using one of these formats instead of FLV, since Adobe has updated their Flash Player to play these formats with H.264 video and AAC audio. This means that most places where FLV files have been used are now also compatible these files. The simplest procedure to encode to a file that contains H.264 video is to add the H.264 video codec, the AAC audio codec, and the MP4 or MOV muxer.

When running the installer I see the following output:
WARNING: php-config not installed or can't be found:
WARNING: disabling the install of the PHP language bindings.
WARNING: The PHP language bindings are REQUIRED to run the PHP samples.
WARNING: The PHP samples will NOT function properly until PHP language
WARNING: bindings are installed.

Refer to the "Preparing the System" section in the install guide, which is contained in the installer archive.

When running the PHP samples I see the following error output: Warning: include(flixengine2.php): failed to open stream: No such file or directory in /usr/local/share/on2/flixsamples/php/cli_encode.php …

This means PHP is unable to locate the wrapper script which loads the PHP language bindings. From the 'Preparing the System' section in the install guide (contained in the installer archive):

"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."

I added the proper path to the 'include_path' variable as described in the previous question, but now I see the following:
Loading flix: flixengine2.php
Warning: dl(): Unable to load dynamic library '/usr/lib/php5/20051025/flixengine2.so' - /usr/lib/php5/20051025/flixengine2.so: cannot open shared object file: No such file or directory in /usr/lib/php5/flixengine2.php on line 19
Fatal error: Call to undefined function Flix2_Version() in /usr/local/share/on2/flixsamples/php/cli_encode.php on line 65

When the language bindings are built, php-config is consulted to determine the install location for flixengine2.so (php-config --extension-dir). This path is normally in PHP's search path when running PHP scripts. If you are seeing this error there are a few possible explanations:

  • You have multiple versions of PHP installed (for example, PHP4 and PHP5). When building the PHP language bindings, Flix uses the first php-config available in the user's PATH. This may not necessarily be the same version as the php command which is executed to run the script. The version that the language bindings were built against must match that of the target environment. You can check the version of PHP your target environment is executing the script under by adding phpinfo() to the script. If this is the case you will need to modify your PATH environment variable so the two match, and rebuild the PHP language bindings, the source for which is installed by default to: /usr/local/src/flixmodules/flixphp.

  • The PHP language bindings failed to build. Check the install log for the following output:

    Ready to compile PHP module. 
    ... 
    mkdir -p /usr/lib/php5/20051025 
    install -p flixengine2.so /usr/lib/php5/20051025 
    install -p flixengine2.php /usr/lib/php5/20051025/..

    If the 'install' commands are absent and there appear to be errors in the build, you will need to correct them and rebuild the PHP language bindings, the source for which is installed by default to: /usr/local/src/flixmodules/flixphp.

The PHP script fails with the following error: Warning: dl(): Unable to load dynamic library '/usr/lib/php5/20051025/flixengine2.so' - /usr/lib/php5/20051025/flixengine2.so: undefined symbol: _zval_copy_ctor in /usr/lib/php5/flixengine2.php on line 19

Symbols marked with zval and zend are internal to PHP itself. This usually indicates a version mismatch between the build environment and the target environment. For example, the above output is the result of attempting to use a flixengine2.so built against PHP4 in a PHP5 target environment. The version that the language bindings were built against must match that of the target environment. You can check the version of PHP your target environment is executing the script under by adding phpinfo() to the script.

Why is my output file larger than my input file?

This mostly depends on what the bitrate is on the input file. Flix Engine, in essence, ignores the input bitrate and treats all input frames as raw bitmap images. So if the bitrate of the output file is higher than that of your input file you will see an increase in size. (In general, the higher your output bitrate is, the closer you will get to the quality of your input file.) Please note that the Flix Engine currently does not have a way to get/display the input bitrate. This may be added in a future release.

How can I decrease my output file size?

Bitrate (video and audio) is the primary setting that determines output file size. However, one thing to note is that keyframes take significantly more bits to encode than non-keyframes, which can result in unnecessarily large files if the value is set too low. For most purposes, the default value is preferred.

Why is my actual output bitrate different than what I specified?

This is largely dependent on factors with your input file, but we offer some notes in our documentation on how to use advanced VP6 settings to achieve better results.

Why is my output file size larger in the full version of the Engine than the demo version?

This is because of the On2 watermark, which in essence removes a portion of the video and replaces it with a static image (which takes less bits to encode becuase it has no motion).

How can I improve the quality of my output?

  • First, make sure this isn't a playback issue. It might be that your player doesn't have enough memory/CPU available.
  • Use the VP6 codec (default) or the H.264 codec, instead of the H.263 codec.
  • Increase the bitrate.
  • Use the source FPS (default).
  • Use 2-Pass encoding (default).
  • Increase the keyframe interval (while still using MAX_KEYFRAMES).
  • Lower the size dimensions of the clip.
  • Use COMPRESSMODE_BEST (only necessary when encoding from a raw source).
  • Visit the site http://www.doom9.org for more information on video compressing.

Please note that we do not provide further advice on how to improve quality.

Is there any way to increase encoding speed?

  • Use an Intel CPU, as there are Intel specific optimizations.
  • Note: There will be a noticeable loss in quality when using the following codec settings:
    1. Set the compress mode (CXMODE) to COMPRESSMODE_GOOD (default, doesn't apply to H.263).
    2. Set the rate control mode (RC_MODE) to CBR_1PASSControl or VBR_1PASSControl.
    3. Use the H.263 codec.