找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 20240|回复: 42

openwrt 挂声卡做网络收音机,播音乐 过程

  [复制链接]
发表于 2019-1-13 16:00 | 显示全部楼层 |阅读模式
本帖最后由 aximpda 于 2019-1-14 20:29 编辑

参考帖  http://bbs.qzxx.com/thread-13547-1-2.html

机器最好有32M FLASH,16M机器 装软件包提示空间不够,装USB没有试,USB声卡TB上不少,选带LED指示的好点,价格很低,但挺好用
1.先在机器上刷上openwrt     lede ,机器做一些基本设置
2.用WINSCP,再装一些软件包  
opkg update  
opkg install  kmod-usb-hid
opkg install  kmod-usb-audio
opkg install  ffmpeg
opkg install  mpd-full
opkg install  alsa-utils
3.如果只是用声卡播网络stream 电台和m3u ,m3u8后缀的电台,就只装上面的包,关联包件opkg 会自动装
USB口挂上声卡后,用
ls /dev 可以在列表中看到audio,dsp,mixer 3项表示声卡挂上被识别

4.如果还想放自己的MP3,flac,就再装一些支持USB挂载,存储的包就是这些
opkg update 后
opkg install
opkg install kmod-usb-storage
opkg install kmod-fs-ext4      #U盘用了EXT4 格式,不用的就 opkg install ntfs-3g
opkg install mount-utils
opkg install block-mount
opkg install luci-app-samba   #为电脑向USB上音乐方便

5.先建一个套目录mkdir -p /radio/.mpd
里面放一些电台播放LIST表 但因为中文的原因,如果是批量建一个单,电台名看不到,如果用电台名做文件名,里面就放一个对应的电台地址,这样播放起来好用
如:建一个中国之声:voice of china.m3u
文件里面就一条 http://ngcdn001.cnr.cn/live/zgzs/index.m3u8

6.修改/etc下的mpd.conf

在最后加上
music_directory         "/mnt/sda1/music" #歌曲目录 ,如果只是听电台,这个填下面一项相同内容就可以了
playlist_directory      "/radio/.mpd/" #播放列表存放目录
db_file                 "/radio/.mpd/mpd.db" #歌曲列表
log_file                "/tmp/mpd.log"
pid_file                "/tmp/mpd.pid"
state_file              "/radio/.mpd/mpd.state" #播放列表
user                    "root"
group                   "users"
bind_to_address         "any"
port                    "6600"
audio_output {
     type         "alsa"        
     name         "office-NewifiD2"        
     device         "hw:0,0"
     format         "96000:24:2"   #如果出现播放不出声改为"44100:16:2"
     mixer_control        "PCM"
}
filesystem_charset              "UTF-8"
id3v1_encoding                  "GBK"


#OSS Mixer
mixer_type "software" #手机可以健或屏控音


------------------------------------------------------------------------------------------------
里面的一些参数自己可以根据自己机器改动,原conf里也有不少参考设置

MPD已经启动
这些一样有效/etc/init.d/mpd stop(enable)(restart)
7. 手机装MPDroid 小众app,M.A.LP.  MPD control也可以,但没有这个好使


链接:https://pan.baidu.com/s/1hIcnakn69H2mRHEWan6Y3A
提取码:ty0o
#MPDROID
链接:https://pan.baidu.com/s/1dp3ibQMLojY8SkWpgEmJCA
提取码:hzka
M.A.L.P
复制这段内容后打开百度网盘手机App,操作更方便哦
复制这段内容后打开百度网盘手机App,操作更方便哦


8.对app 设置:主要是地址,端口,路由器登陆密码

慢慢编辑,发帖太麻烦

9.手机端一些截图




对stream电台,不用编加文件,直接在手机端编写,保存在手机里,但电台太少

这个不错
































本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

评分

参与人数 2恩山币 +2 收起 理由
potomac + 1 不要怂、就是干
无剑 + 1 强大的恩山!(以下重复1万次)

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2019-1-13 20:23 | 显示全部楼层
中国之声,http://ngcdn001.cnr.cn/live/zgzs/index.m3u8
经济之声,http://ngcdn002.cnr.cn/live/jjzs/index.m3u8
音乐之声,http://ngcdn003.cnr.cn/live/yyzs/index.m3u8
经典音乐广播,http://ngcdn004.cnr.cn/live/dszs/index.m3u8
神州之声,http://ngcdn006.cnr.cn/live/szzs/index.m3u8
中华之声,http://ngcdn005.cnr.cn/live/zhzs/index.m3u8
华夏之声,http://ngcdn007.cnr.cn/live/hxzs/index.m3u8
香港之声,http://ngcdn008.cnr.cn/live/xgzs/index.m3u8
民族之声,http://ngcdn009.cnr.cn/live/mzzs/index.m3u8
文艺之声,http://ngcdn010.cnr.cn/live/wyzs/index.m3u8
藏语广播,http://ngcdn012.cnr.cn/live/zygb/index.m3u8
维语广播,http://ngcdn013.cnr.cn/live/wygb/index.m3u8
娱乐广播,http://ngcdn014.cnr.cn/live/ylgb/index.m3u8
中国交通广播,http://ngcdn016.cnr.cn/live/gsgljtgb/index.m3u8
中国乡村之声,http://ngcdn017.cnr.cn/live/xczs/index.m3u8
古典音乐频道,http://ngcdn022.cnr.cn/live/gdyy/index.m3u8
长篇联播频道,http://ngcdn024.cnr.cn/live/cplb/index.m3u8
哈语广播频道,http://ngcdn025.cnr.cn/live/hygb/index.m3u8
国际流行音乐广播,http://satellitepull.cnr.cn/live/wxgjlxyy/playlist.m3u8
怀集音乐之声,http://cnlive.cnr.cn/hls/hjyyzs.m3u8
第一财经,http://satellitepull.cnr.cn/live/wx32dycjgb/playlist.m3u8
河北音乐广播,http://cnlive.cnr.cn/hls/hbyygb.m3u8
经典FM,http://r.yibo.so/live/55801ddeb3ee794c623ff452.m3u8
江苏音乐广播,http://cnlive.cnr.cn/hls/jsyinyueegb.m3u8
CNR音乐之声,http://sk.cri.cn/887.m3u8
CRI 轻松调频广播,http://sk.cri.cn/915.m3u8
HitFM88.7 http://satellitepull.cnr.cn/live/wxhitfm/playlist.m3u8
环球资讯,http://satellitepull.cnr.cn/live/wxhqzxzjdq/playlist.m3u8
CRI 英语漫听广播,http://sk.cri.cn/am1008.m3u8
CRI南海之声,http://satellitepull.cnr.cn/live/wxnhzs/playlist.m3u8
北京交通广播,http://audiolive.rbc.cn:1935/live/fm1039/96K/tzwj_video.m3u8
北京文艺广播,http://123.56.16.201:1935/live/fm876/96K/tzwj_video.m3u8
北京城市广播,http://audiolive.rbc.cn:1935/live/fm1073/96K/tzwj_video.m3u8
北京古典音乐广播,http://audiolive.rbc.cn:1935/live/fm986/96K/tzwj_video.m3u8
北京音乐广播,http://123.56.16.201:1935/live/fm974/96K/tzwj_video.m3u8
北京动听调频Metro Radio,http://audiolive.rbc.cn:1935/live/fm945/96K/tzwj_video.m3u8
北京新闻广播,http://123.56.16.201:1935/live/fm1006/96K/tzwj_video.m3u8
北京体育广播,http://audiolive.rbc.cn:1935/live/fm1025/96K/tzwj_video.m3u8
北京怀旧金曲广播,http://123.56.16.201:1935/live/fm1075/96K/tzwj_video.m3u8
北京长书广播,http://audiolive.rbc.cn:1935/live/fm1043/96K/tzwj_video.m3u8
北京欢乐时光广播,http://123.56.16.201:1935/live/fm1065/96K/tzwj_video.m3u8
北京故事广播,http://123.56.16.201:1935/live/am603/96K/tzwj_video.m3u8
北京外语广播,http://audiolive.rbc.cn:1935/live/am774/96K/tzwj_video.m3u8
北京戏曲综艺广播,http://123.56.16.201:1935/live/fm1051/96K/tzwj_video.m3u8
北京青年广播,http://audiolive.rbc.cn:1935/live/am927/96K/tzwj_video.m3u8
北京教学广播,http://123.56.16.201:1935/live/fm994/96K/tzwj_video.m3u8
天津新闻广播,http://satellitepull.cnr.cn/live/wxtjxwgb/playlist.m3u8
广东新闻广播,http://satellitepull.cnr.cn/live/wxgdxwgb/playlist.m3u8
广东股市广播,http://satellitepull.cnr.cn/live/wxgdgsgb/playlist.m3u8
广东珠江经济广播台,http://satellitepull.cnr.cn/live/wxgdzjjjt/playlist.m3u8
怀集音乐之声,http://qgzb.cnr.cn/live/hjyyzs/playlist.m3u8
广东音乐之声,http://satellitepull.cnr.cn/live/wxgdyyzs/playlist.m3u8
羊城交通广播,http://satellitepull.cnr.cn/live/wxgdycjtt/playlist.m3u8
广东文体广播,http://satellitepull.cnr.cn/live/wxgdwtgb/playlist.m3u8
南方生活广播,http://satellitepull.cnr.cn/live/wxgdnfshgb/playlist.m3u8
上海第一财经广播,http://satellitepull.cnr.cn/live/wx32dycjgb/playlist.m3u8
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-1-14 12:48 | 显示全部楼层
感谢分享,学习,对广播感谢兴趣
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-17 22:57 | 显示全部楼层
感谢楼主分享,可否加个Q请教一下,我想集成在我固件上,谢谢
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-3-18 12:13 | 显示全部楼层
本帖最后由 aximpda 于 2019-3-18 20:24 编辑

集成在固件:
在make menuconfig
1 .> Kernel modules>sound support > kmod-sound-core ,kmod-usb-audio,kmod-sound-soc-core 选上标*,如果是MTK 的把kmod-sound-mt7620 也标*最好,7620,7621好像特别适合上多媒体,CPU站用很低.
2.  > Multimedia>ffmpeg 标*
3.  >sound>alsa-utiles,madplay,mpd-full 标*就可以了
当然如果你要用U盘放MP3 ,flac什么的U盘的支持也要在
>base system>block-moumt,blockd 选上
>Kernel modules>filesystems 把kmod-fs-ext4,kmod-fscache,kmod-fs-ntfs选上,kmod-fs-vfat就不必了,太少用FAT32了
>kernel modules>usb support> kmod-usb-hid,kmod-usb-ohci,kmod-usb-storage,kmod-usb-storeage-extras,标*


luci>applicition>luci-app-samba
我是NEWIFID1,D2,wndr3800,wzr-hpg300nh2,xcloud 都集成了主要是朋友和家里老人听广播      
集成后mpd.config还是要编一下,其实就是粘一下.                                
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-18 20:17 | 显示全部楼层
好东西啊~一直想玩这个,这样家里闲置路由就能发挥作用了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-19 10:00 | 显示全部楼层
技术活,小白玩不来。

点评

这也是技术?花点时间都能干.教程很多,还很细节+图  详情 回复 发表于 2019-3-19 11:37
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-3-19 11:37 | 显示全部楼层
pandopod 发表于 2019-3-19 10:00
技术活,小白玩不来。

这也是技术?花点时间都能干.教程很多,还很细节+图
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-19 12:04 | 显示全部楼层
aximpda 发表于 2019-3-19 11:37
这也是技术?花点时间都能干.教程很多,还很细节+图

应该要有点相关的知识基楚吧?语言编程类的。一窍不通只能望而却步了。刷个固件也只能默认怎样就怎样,没动手能力。

点评

就是300个英语单词而已,install,menu,feed的一点点外延(望文生义也行)  详情 回复 发表于 2019-3-19 16:12
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-3-19 16:12 | 显示全部楼层
本帖最后由 aximpda 于 2019-3-19 16:13 编辑
pandopod 发表于 2019-3-19 12:04
应该要有点相关的知识基楚吧?语言编程类的。一窍不通只能望而却步了。刷个固件也只能默认怎样就怎样,没 ...

就是300个英语单词而已,install,menu,feed的一点点外延(望文生义也行),和电子专业没有一毛钱关系哦!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-19 18:11 | 显示全部楼层
要原生OPENWRT吧,X86可以吗?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-19 19:16 来自手机 | 显示全部楼层
在哪弄的广播地址?

点评

摆渡上搜的,日期 近些吧.  详情 回复 发表于 2019-3-19 20:17
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-3-19 20:17 | 显示全部楼层
725216 发表于 2019-3-19 19:16
在哪弄的广播地址?

摆渡上搜的,日期 近些吧.
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-19 21:07 | 显示全部楼层
好东西,先MAKE
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-19 22:04 来自手机 | 显示全部楼层
向牛人学习!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-24 03:54

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

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