找回密码
 FreeOZ用户注册
12
返回列表 发新帖回复
楼主: 江南柴进
打印 上一主题 下一主题

DIY了一个简单的无线硬盘播放机

[复制链接]
31#
发表于 30-4-2009 14:57:04 | 只看该作者
这个转到俺们版吧,俺给你加精

评分

参与人数 1威望 +20 收起 理由
mohan29 + 20 谢谢分享!请版主帮我转吧?我总不能一文两 ...

查看全部评分

回复  

使用道具 举报

32#
 楼主| 发表于 30-4-2009 20:17:06 | 只看该作者
墨尔本怎么就没有同好可以交流交流呢?转到那边如有的话,也是好事情啊。
回复  

使用道具 举报

33#
 楼主| 发表于 1-7-2009 21:45:36 | 只看该作者
应为现在还用这个播放机做视频文件服务器,然后用wii实现无线播放。硬盘空间不够用了,周末去买个1.5T的硬盘,再买一个IDE转SATA的卡,换上它。

新硬盘,要重新安装,是不是顺便试试OpenWrt kamikaze8.09.1版,编译一下linux2.6核心,如果成功,就能让我的USB 3G上网速度快起来,这又可以多一个无线3G路由器的功能。

咳咳...是不是追求功能太多了?NAS、音频播放、视频流提供、ftp服务、web服务、无线HUB、3G路由器、USB充电...,还可以实现全天候电驴下载,因为带宽不够,懒得弄了。

顺便问一下版主,能不能将这个帖子移到电脑版去,似乎发这里发错了。

[ 本帖最后由 mohan29 于 1-7-2009 21:51 编辑 ]
回复  

使用道具 举报

34#
发表于 1-7-2009 23:08:04 | 只看该作者
从mel回来,发现你那个古乐团的四季很不错。
回复  

使用道具 举报

35#
 楼主| 发表于 17-11-2009 21:24:31 | 只看该作者
这两天有点闲,把MPD播放器重新编译了一遍,终于可以摆脱OSS,直接用ALSA输出了。还省掉了两个模块的加载,节约一点内存,在/etc/module.d/70-alsa文件注释掉:

#snd-mixer-oss
#snd-pcm-oss

装了kmod-alsa,就不需要kmod-usb-audio模块了,他是为oss准备的。

而且,MPD_0.15.5还支持居多文件格式,APE就是其中一个,以后不用搞格式转换了,呵呵。可惜不支持cue文件播放,还是要分割音轨。

Supported decoders:

[mad] mp3 mp2
[vorbis] ogg oga
[oggflac] ogg oga
[flac] flac
[audiofile] wav au aiff aif
[faad] aac
[mpcdec] mpc
[wavpack] wv
[ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav wma wmv wsaud wsvga wv wve

原来播放FLAC音轨开始的时候,不是很流畅,查了一下,还是linux 下OSS声音驱动的问题, 所以打算不再用ALSA模拟OSS,而直接用ALSA输出。

但是,Openwrt上MPD一直不是很顺畅,播放效果不好,编译也问题多多。因此采用Optware方案。

该方案比较复杂,因为Optwera支持的MPD是不带ALSA输出plugin的,必须自己编译alsa-lib。还有一个bug,也让编译不顺。不过最终还是搞定了,
具体方法如下,因为是发MPD论坛的,所以用英语,很蹩脚,凑合看吧:

To start, get Optware installed:

svn co http://svn.nslu2-linux.org/svnroot/optware/trunk optware

cd ./optware

Create compile target, my platform is wl-700ge, which is openwrt-brcm24:

make openwrt-brcm24-target

cd openwrt-brcm24

make directories

make ipkg-utils

make toolchain

Now compiling environment is ready.

Packages can be compiled now, but there could be a few problems, autoconf version is one, so we can download automake1.9:

sudo apt-get install automake1.9

and gettext

sudo apt-get install gettext

According to Optware compiling best practice, libtool from Ubuntu 9.04 and later can be problematic, so a vertion os libtool from Ubuntu 8.04 or 8.10 is needed, the deb package of which can be downloaded from ubuntu archive sites.

Also, there has been a bug with libavcodec/imgresample.c, a patch can to applied here:

***********************************************************
Index: libavcodec/imgresample.c
===================================================================
--- libavcodec/imgresample.c        (revision 16975)
+++ libavcodec/imgresample.c        (working copy)
@@ -517,10 +517,10 @@

static const AVClass context_class = { "imgresample", context_to_name, NULL };

-struct SwsContext *sws_getContext(int srcW, int srcH, int srcFormat,
-                                  int dstW, int dstH, int dstFormat,
+struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat,
+                                  int dstW, int dstH, enum PixelFormat dstFormat,
                                   int flags, SwsFilter *srcFilter,
-                                  SwsFilter *dstFilter, double *param)
+                                  SwsFilter *dstFilter, const double *param)
{
     struct SwsContext *ctx;

@@ -575,9 +575,10 @@
  * asumed to remain valid.
  */
struct SwsContext *sws_getCachedContext(struct SwsContext *ctx,
-                        int srcW, int srcH, int srcFormat,
-                        int dstW, int dstH, int dstFormat, int flags,
-                        SwsFilter *srcFilter, SwsFilter *dstFilter, double *param)
+                                        int srcW, int srcH, enum PixelFormat srcFormat,
+                                        int dstW, int dstH, enum PixelFormat dstFormat,
+                                        int flags, SwsFilter *srcFilter,
+                                        SwsFilter *dstFilter, const double *param)
{
     if (ctx != NULL) {
         if ((ctx->resampling_ctx->iwidth != srcW) ||
*************************************************************************

Before mpd is compiled, compile alsa-lib first,

make alsa-lib

In case alsa-lib-1.0.8.tar.bz2 is not downloadible from site specified by the alsa-lib.mk file, get it from the Internet

After alsa-lib is compiled, all files and directories need to be copied to ./builds/mpc/alsa/ to make sure header files are accessible by Optware compiler.

And libasound.so file under ./alsa-lib/src/.libs/ has to be copied to ./staging/opt/lib/, otherwise alsa output plugin will not work.


Now, fire make mpd, it should be OK.

Then create ipk package by issuing:

make mpd-ipk

mpd_0.15.5-1_mipsel.ipk can be found under ./builds/


Have fun!

[ 本帖最后由 mohan29 于 22-11-2009 05:20 编辑 ]

评分

参与人数 2威望 +80 收起 理由
ubuntuhk + 50 你太有才了!
cello + 30 你太有才了!

查看全部评分

回复  

使用道具 举报

36#
发表于 19-11-2009 11:34:59 | 只看该作者
牛人,不光会拆车,还会高科技
回复  

使用道具 举报

37#
发表于 29-11-2009 22:07:19 | 只看该作者
先收藏
回复  

使用道具 举报

38#
发表于 8-2-2010 16:58:58 | 只看该作者
DIY达人
回复  

使用道具 举报

39#
发表于 30-3-2010 13:02:35 | 只看该作者
mark一下,有点感冒了
回复  

使用道具 举报

40#
发表于 30-3-2010 13:56:15 | 只看该作者
弓虽 人!
回复  

使用道具 举报

41#
发表于 22-5-2010 18:17:10 | 只看该作者
这个俺喜欢,等俺空下来了得好好花点时间研究一下
回复  

使用道具 举报

您需要登录后才可以回帖 登录 | FreeOZ用户注册

本版积分规则

小黑屋|手机版|Archiver|FreeOZ论坛

GMT+10, 29-4-2024 06:12 , Processed in 0.055616 second(s), 29 queries , Gzip On, Redis On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表