Compile mplayer for arm with xvid and x264

 

Installing Xvid

Xvid is a free software MPEG-4 ASP compliant video codec, which features two pass encoding and full MPEG-4 ASP support, making it a lot more efficient than the well-known DivX codec. It yields very good video quality and good performance due to CPU optimizations for most modern processors.

It began as a forked development of the OpenDivX codec. This happened when ProjectMayo changed OpenDivX to closed source DivX4, and the non-ProjectMayo people working on OpenDivX got angry, then started Xvid. So both projects have the same origin.

Note that Xvid is not necessary to decode Xvid-encoded video. libavcodec is used by default as it offers better speed.

Like most open source software, it is available in two flavors: official releases and the CVS version. The CVS version is usually stable enough to use, as most of the time it features fixes for bugs that exist in releases. Here is what to do to make Xvid CVS work with MEncoder (you need at least autoconf 2.50, automake and libtool):

  1. cvs -z3 -d:pserver:[email protected]:/xvid login

  2. cvs -z3 -d:pserver:[email protected]:/xvid co xvidcore

  3. cd xvidcore/build/generic

  4. ./bootstrap.sh

  5. CC=arm-none-linux-gnueabi-gcc ./configure --build=i686-pc-linux-gnu --host=arm-none-linux-gnueabi --prefix=/opt/mx27-lib/
  6. make && make install
Installing x264

x264 is a library for creating H.264 video streams. It is not 100% complete, but currently it has at least some kind of support for most of the H.264 features which impact quality. There are also many advanced features in the H.264 specification which have nothing to do with video quality per se; many of these are not yet implemented in x264.

Encoder features

  • CAVLC/CABAC

  • Multi-references

  • Intra: all macroblock types (16x16, 8x8, and 4x4 with all predictions)

  • Inter P: all partitions (from 16x16 down to 4x4)

  • Inter B: partitions from 16x16 down to 8x8 (including SKIP/DIRECT)

  • Ratecontrol: constant quantizer, constant bitrate, single or multipass ABR, optional VBV

  • Scene cut detection

  • Adaptive B-frame placement

  • B-frames as references / arbitrary frame order

  • 8x8 and 4x4 adaptive spatial transform

  • Lossless mode

  • Custom quantization matrices

  • Parallel encoding of multiple slices

  • Interlacing


  1. svn co svn://svn.videolan.org/x264/trunk x264

  2. cd x264

  3. CC=arm-none-linux-gnueabi-gcc ./configure --enable-shared --host=arm-none-linux-gnueabi --enable-pthread --prefix=/opt/mx27-lib
  4. make && make install

Installing mplayer

  1. svn co svn://svn.mplayerhq.hu/mplayer/trunk mplayer

  2. cd mplayer

  3. ./configure --host-cc=gcc /
    --enable-static /
    --enable-cross-compile /
    --host-cc=gcc /
    --cc=arm-none-linux-gnueabi-gcc /
    --as=arm-none-linux-gnueabi-as /
    --ar=arm-none-linux-gnueabi-ar /
    --ranlib=arm-none-linux-gnueabi-ranlib /
    --target=arm-armv5te-linux /
    --enable-armv5te /
    --prefix=/opt/mx27-lib/ /
    --codecsdir=/opt/mx27-lib/ /
    --enable-fbdev /
    --disable-mencoder /
    --disable-dvdnav /
    --disable-dvdread-internal /
    --disable-libdvdcss-internal /
    --disable-cddb /
    --disable-inet6 /
    --disable-ftp /
    --disable-live /
    --disable-unrarexec /
    --disable-live /
    --enable-v4l2 /
    --enable-x264 /
    --enable-xvid /
    --extra-libs="-lx264 -lxvidcore" /
    --with-extraincdir=/opt/mx27-lib/include:/opt/freescale/ltib/rootfs/usr/include /
    --with-extralibdir=/opt/mx27-lib/lib:/opt/freescale/ltib/rootfs/usr/lib
  4. make && make install

你可能感兴趣的:(SVN,video,cvs,features,encoding,h.264)