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:anonymous@cvs.xvid.org:/xvid login

  2. cvs -z3 -d:pserver:anonymous@cvs.xvid.org:/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
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值