2009年2月16日 星期一

mipsel linux mplayer

Download MPlayer-1.0rc2

偶只想要decoder,所以拿掉encoder

./configure --enable-cross-compile --target=mips-linux --cc=mipsel-linux-uclibc-gcc --host-cc=gcc --disable-mencoder

make

然後錯誤出現囉

修改libavutil/internal.h
加入以下function


#if !HAVE_LLRINT
static av_always_inline long long llrint(double x)
{
return rint(x);
}
#endif /* HAVE_LLRINT */

#if !HAVE_LRINT
static av_always_inline long int lrint(double x)
{
return rint(x);
}
#endif /* HAVE_LRINT */

#if !HAVE_ROUND
static av_always_inline double round(double x)
{
return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
}
#endif /* HAVE_ROUND */

#if !HAVE_ROUNDF
static av_always_inline float roundf(float x)
{
return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
}
#endif /* HAVE_ROUNDF */

#if !HAVE_TRUNCF
static av_always_inline float truncf(float x)
{
return (x > 0) ? floor(x) : ceil(x);
}
#endif /* HAVE_TRUNCF */


降樣子就OK囉

mipsel-linux-uclibc-strip mplayer

將mplayer丟到target上執行

video out to framebuffer & no sound
./mplayer -vo fbdev -nosound 0001.AVI

允許丟棄frame
./mplayer -vo fbdev -nosound -framedrop ./鐵鉆山老二-43.29.mpeg

rescale to 320x240 frame rate 5, -ni是在處理不正確的avi format
./mplayer -vf scale=320:240 -fps 5 -zoom -vo fbdev -nosound -ni ./luna.avi

./mplayer -vo fbdev -nosound ./32.70_0002.wmv

連WMV都可以play,真是讚啊

Internet radio
./mplayer -playlist ../tunein-station-4.pls


# ./mplayer -vo fbdev -nosound -framedrop 五分山20080921-小黑-Skorpion001.mpeg
MPlayer 1.0rc2-3.4.6 (C) 2000-2007 MPlayer Team
CPU: SGI MIPS

Playing 五分山20080921-小黑-Skorpion001.mpeg.
MPEG-PS file format detected.
VIDEO:  MPEG1  352x240  (aspect 12)  29.970 fps  1152.0 kbps (144.0 kbyte/s)
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 352 x 240 (preferred colorspace: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================
Audio: no sound
Starting playback...
VDec: vo config request - 352 x 240 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.30:1 - prescaling to correct movie aspect.
[swscaler @ 0xaa7440]No accelerated colorspace conversion found
[swscaler @ 0xaa7440]SwScaler: using unscaled yuv420p -> bgr565 special converter
VO: [fbdev] 352x240 => 352x270 BGR 16-bit
V:  10.5 296/296 105% 74%  0.0% 0 0                                                                    

如果使用libmad
執行時加上 -ac mad

Reference

http://amoi.it168.com/blog.php?tid=321580

http://www.oppo.com/index.php?q=oppoblog/view/11752

http://people.bath.ac.uk/enpsgp/floating_point.html

http://cha.homeip.net/blog/archives/2008/03/mplayerffmpeg.html

http://blog.chinaunix.net/u1/34961/showart_494026.html


1 則留言:

  1. 感謝!參考您的文章,解決了我的問題。
    推!

    回覆刪除