To build this modified version of mplayer/mencoder:

1) Unpack the SVN snapshot to a temporary directory:
    $ mkdir build
    $ (cd build && tar -jxvf ../mplayer_r22906.tar.bz2)
    
2) Copy the new files into the tree
    $ cp new_files/libmpdemux/* build/libmpdemux
   AMR-NB, updated archives may be obtained from:
   http://www.3gpp.org/ftp/Specs/archive/26_series/26.104/
    $ unzip -jd /tmp new_files/26104-???.zip "26104-???_ANSI_C_source_code.zip"
    $ unzip -jd build/libavcodec/amr_float /tmp/26104-???_ANSI_C_source_code.zip
   AMR-WB, updated archives may be obtained from:
   http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/
    $ unzip -jd /tmp new_files/26204-???.zip "26204-???_ANSI-C_source_code.zip"
    $ unzip -jd build/libavcodec/amrwb_float /tmp/26204-???_ANSI-C_source_code.zip
    
3) Apply patches:
    NOTE: These patches are based on the sources included in the archive above.
    NOTE: They will NOT work properly with sources obtained elsewhere.
    There are two methods of applying the needed patches. Choose one.
    
    Method 1: Apply patches individually
    $ cd build
    $ patch -p0 < ../avi_forceidx_fallback.diff
    $ patch -p0 < ../add_ogg_mux_demux.diff
    $ patch -p0 < ../configure-static.diff
    $ patch -p0 < ../mencoder_01_identify.diff
    $ patch -p0 < ../mencoder_02_audio_only_hack.diff
    $ patch -p0 < ../mov_01_edl_kf_search.diff
    $ patch -p0 < ../mov_02_mean_framerate.diff
    $ patch -p0 < ../vd_incompatible_vo_warn_msg_level.diff
    $ patch -p0 < ../ve_raw_stride_support.diff
    $ patch -p0 < ../version.diff
    $ patch -p0 < ../vf_scale_disable_palettefmt_support.diff
    $ patch -p0 < ../vf_vo_stride_support.diff
    $ patch -p0 < ../vo_fonts_warn_msg_level.diff
    $ patch -p0 < ../vp6\[01\]_use_vfw.diff
    $ patch -p0 < ../wmv_remove_yv12.diff

    Method 2: Use the shell, Luke.
    $ cd build
    $ for f in ../*.diff; do patch -p0 < $f; done
    
4) Configure: (TODO: Add in the proper prefix path)
    $ ./configure \
      --enable-static \
      --enable-runtime-cpudetection \
      --enable-largefiles \
      --disable-tremor-internal \
      --prefix=/opt/on2/flixengine/mencoder
    Patch the generated config.mak to allow for selective static linking to
    reduce target dependencies while still allow use of the binary codecs.
    NOTE: this step is only necessary if using the ' --enable-static' option.
    $ ../postconfig-static.sh
    
5) Build and install:
    $ make
    $ sudo make install

