将我家云 打造成 网络音乐播放器
我家云介绍CPU: RK3328
内存: 1G
emmc: 8G
网口:千兆
USB接口: USB2.0x1 USB3.0x1
HDMI接口: 1个(主板上有一个,但是被外壳遮住,不能用)
SATA接口: 一个(是由USB3.0改成SATA的)
我家云是矿难产物,目前闲鱼不·含硬盘的价格是: 100元左右。
将我家云 打造成 网络音乐播放器,主要在我家云内安装Armbian,再在Armbian系统上安装DietPi系统,
DietPi系统内可以自动安装很多软件,有关网络音乐播放器的就有以下几种:
1.Squeezelite: audio player for lms & squeezebox(用于LMS和Squeezebox的音频播放器)
Squeezelite 是一款音频软件,可让您将 DietPi 设备转变为支持 Logitech 媒体服务器和其他支持软件的音频播放播放器
2.GMediaRender: Resource efficient UPnP/DLNA renderer(资源高效的UPnP/DLNA渲染器)
GMediaRender是DLNA 音频呈现器/端点。允许您从其他设备(例如 BubbleUPnP)流式传输和播放音乐
3.NAA:HQPlayer 的高质量网络音频播放终端。允许您从 HQPlayer 源(例如:Windows)流式传输音乐并直接从您的 DietPi 设备输出。
4.Roon Bridge:将您的DietPi变成支持 Roon 的音频播放器。通过在另一台设备上使用 Roon 主应用程序,您可以将音乐目录直接流式传输到DietPi上运行的 Roon Bridge。
5.Roon Server:将您的设备变成支持 Roon 的音频播放器和核心服务器。Roon 查看您的音乐并查找照片、简介、评论、歌词和音乐会日期,并在艺术家、作曲家、表演者、指挥和制作人之间建立联系。您得到的是 一本关于您的音乐的可搜索、可浏览的杂志。
6.Shairport Sync:是一个 AirPlay 音频播放器,可以播放从 iTunes、iOS 设备和第三方 AirPlay 源(如 forked-daapd 和 Airfoil)流式传输的音频。由 Shairport Sync 供电的设备播放的音频与源保持同 步,因此与播放相同源的类似设备保持同步。这允许在多个设备上同步多房间音频。
我家云刷机用软件:
链接:https://pan.baidu.com/s/18sOX1sjuNqgAt4bl8Yx0NQ
提取码:cqzz
一.安装armbian
1.1.安装 Rockusb驱动
运行DriverInstall.exe
点击“驱动安装”按钮。
1.2.运行AndroidTool.exe
进入瑞星微开发工具”切换到“下载镜像”页面,点击2#栏的最右一个方框,选择
Armbian_23.02.0_rockchip_l1pro_bullseye_5.15.81_server_2022.12.06.img
1.3.使我家云进入Rockusb模式、刷机
1.3.1.保持我家云处于断电状态,拔掉所有线。
1.3.2.用USB双公头线,一头插入我家云的USB2.0接口,一头插入电脑。
1.3.3.用回形针插进Reset孔,并按压住不松开。
1.3.4.插入电源线。
1.3.5.等待几秒钟,直到“瑞星微开发工具”框的下方出现“发现一个LOADER设备”后才松开回形针。
1.3.6.“瑞星微开发工具”切换到“高级功能”点击“进入Maskrom”按钮,“瑞星微开发工具”提示“发现一个MASKROM设备”。
1.3.6.“瑞星微开发工具”切换到“下载镜像”,点击“执行”按钮,开始刷机,直到右边框里提示:下载完成。
刷机完成,拔掉电源线、USB线。
插上网线、电源线。
2.初始设置
用PuTTY登录我家云地址
出现:login as: 输入root
出现:root@192.168.x.xxx's password: 输入1234
出现:
Welcome to ARMBIAN!
Documentation: https://docs.armbian.com | Community: https://forum.armbian.com
IP address: 192.168.2.33
Create root password:
输入root新密码:
再次输入新密码:
显示:
Choose default system command shell:
1) bash
2) zsh
选择:1
显示:
Shell: BASH
Creating a new user account. Press <Ctrl-C> to abort
Please provide a username (eg. your first name):
输入新用户名称:
Create user (cqzhangjunhua) password:
输入新用户密码:
再次输入密码:
显示:
Please provide your real name: Cqzhangjunhua
按回车
显示:
Dear Cqzhangjunhua, your account cqzhangjunhua has been created and is sudo enabled.
Please use this account for your daily work from now on.
Detected timezone: Asia/Shanghai
Set user language based on your location?
选择:y
显示:
Generating locales: zh_CN.UTF-8
root@armbian:~#
至此armbian系统安装完成。
二.安装DietPi
nano /etc/apt/sources.list
deb https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ bullseye-security main contrib non-free
nano编辑软件保存方法:ctl+o, enter, ctl+x
nano /etc/hosts
在最后增加以下内容:
172.67.170.219 dietpi.com
104.21.28.141 dietpi.com
172.67.212.135 www.rutracker.org
172.65.229.194 www.deepl.com
199.232.174.132 deb.debian.org
199.232.142.132 deb.debian.org
146.75.114.132 deb.debian.org
151.101.78.132 deb.debian.org
151.101.110.132 deb.debian.org
185.199.111.133 raw.githubusercontent.com
185.199.110.133 raw.githubusercontent.com
185.199.108.133 raw.githubusercontent.com
182.43.124.6 raw.githubusercontent.com
185.199.109.133 raw.githubusercontent.com
185.199.108.133 user-images.githubusercontent.com
185.199.108.133 avatars2.githubusercontent.com
185.199.108.133 avatars1.githubusercontent.com
151.101.110.132 httpredir.debian.org
151.101.194.132 security.debian.org
204.68.111.105 downloads.sourceforge.net
116.211.120.228 bbs.hifidiy.net
205.166.94.4 ralph.irving.sdf.org
103.235.46.40 baidu.com
185.199.111.133 objects.githubusercontent.com
185.199.108.133 objects.githubusercontent.com
185.199.110.133 objects.githubusercontent.com
185.199.109.133 objects.githubusercontent.com
140.82.114.4 github.com
20.205.243.166 github.com
192.30.255.112 github.com
192.30.255.113 github.com
212.13.197.231 www.chiark.greenend.org.uk
151.101.78.132 httpredir.debian.org
151.101.110.132 httpredir.debian.org
62.210.16.61 www.lesbonscomptes.com
212.13.197.231 www.chiark.greenend.org.uk
185.125.190.36 ports.ubuntu.com
185.125.190.39 ports.ubuntu.com
保存退出。
1.在浏览器中打开网页:
https://github.com/MichaIng/DietPi/blob/master/.build/images/dietpi-installer
2.将网页中的内容复制到Notepad++,保存为dietpi-installer.sh
3.nano /home/dietpi-installer.sh
Notepad++中的dietpi-installer.sh的内容,全部复制到/home/dietpi-installer.sh
输入ctl+o, enter, ctl+x,保存退出。
4.
chmod +x /home/dietpi-installer.sh
cd /home
./dietpi-installer.sh
提示一:
Please select the Git branch the installer should use:
master : Stable release branch (recommended)
beta : Public beta testing branch
dev : Unstable development branch
选择:master : Stable release branch (recommended)
按Ok
提示二:
Please enter your name. This will be used to identify the image creator within credits banner.
You can add your contact information as well for end users.
NB: An entry is required.
输入:用户名(cqzhangjunhua),按Ok。
提示三:
Please enter the name or URL of the pre-image you installed on this system, prior to running this script. This will
be used to identify the pre-image credits.
EG: Debian, Raspberry Pi OS Lite, Armbian or "forum.odroid.com/viewtopic.php?t=123456" etc.
NB: An entry is required.
输入:Debian, 按Ok。
提示四:
Please select the current device this is being installed on:
- NB: Select "Generic device" if not listed.
- "Core devices": Fully supported by DietPi, offering full GPU acceleration + Kodi support.
- "Limited support devices": No GPU acceleration guaranteed.
在ARM的下拉列表中选:rockchip 3328,按Ok。
提示五:
Please select an option:
0 : I do not require WiFi functionality, skip related package install.
1 : I require WiFi functionality, install related packages.
选择:0 : I do not require WiFi functionality, skip related package install。按Ok。
提示六:
Please select a Debian version to install on this system.
Currently installed: buster (ID: 5)
6 : Bullseye (current stable release, recommended)
7 : Bookworm (testing, if you want to live on bleeding edge)
选择:6 : Bullseye (current stable release, recommended)。按Ok。
出错提示:
┌────────────────────────┤ DietPi-PREP├──────────────────────────┐
│- Command: rm /etc/apt/sources.list.d/* │
│- Exit code: 1 │
│- DietPi version: v8.7.1 (MichaIng/master) | HW_MODEL: 28 | HW_ARCH: 3 | DISTRO: 6 │
│- Error log: │
│ rm: cannot remove '/etc/apt/sources.list.d/*': No such file or directory │
│ │
│ Retry : Re-run the last command that failed │
│ DietPi-Config: Edit network, APT/NTP mirror settings etc │
│ Open subshell: Open a subshell to investigate or solve the issue │
│ Send report : Uploads bugreport containing system info to DietPi │
│ ●─ Devs only─────────────────● │
│ Change command : Adjust and rerun the command │
│ │
│ │
│ <Ok> <Exit> │
│ │
└───────────────────────────────────────────────────────────┘
解决方法:
1.如果/etc/apt目录下的sources.list.d目录存在(用WinSCP查看):
将/etc/apt目录下的sources.list文档用WinSCP复制到/etc/apt/sources.list.d目录下
在上面出错提示框里选择 "Change command : Adjust and rerun the command"
在弹出的提示框里修改:rm /etc/apt/sources.list.d/* 为以下
rm /etc/apt/sources.list.d/sources.list
2.如果/etc/apt目录下的sources.list.d目录不存在(用WinSCP查看):
首先在/etc/apt目录下建立sources.list.d目录
mkdir /etc/apt/sources.list.d
然后在按照上面的步骤就可以。
当出现以下提示,表示安装完成。
/lib/modules:
total 4.0K
drwxr-xr-x 3 root root 4.0K Jul 30 06:51 5.15.58-flippy-75+o
DietPi-PREP | Completed, disk can now be saved to .img for later use, or, reboot system to start first run of DietPi.
DietPi-PREP | To create an .img file, you can "poweroff" and run the following command from the host/external DietPi system:
- bash -c "$(curl -sSfL https://raw.githubusercontent.com/MichaIng/DietPi/master/.build/images/dietpi-imager)"
root@armbian:/home#
5.首次运行dietpi
nano /etc/apt/sources.list
deb https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ bullseye-security main contrib non-free
nano编辑软件保存方法:ctl+o, enter, ctl+x
nano /etc/hosts
在文件后面加入以下内容
172.67.170.219 dietpi.com
104.21.28.141 dietpi.com
172.67.212.135 www.rutracker.org
172.65.229.194 www.deepl.com
19.232.174.132 deb.debian.org
199.232.142.132 deb.debian.org
146.75.114.132 deb.debian.org
151.101.78.132 deb.debian.org
151.101.110.132 deb.debian.org
185.199.111.133 raw.githubusercontent.com
185.199.110.133 raw.githubusercontent.com
185.199.108.133 raw.githubusercontent.com
182.43.124.6 raw.githubusercontent.com
185.199.109.133 raw.githubusercontent.com
185.199.108.133 user-images.githubusercontent.com
185.199.108.133 avatars2.githubusercontent.com
185.199.108.133 avatars1.githubusercontent.com
151.101.110.132 httpredir.debian.org
151.101.194.132 security.debian.org
204.68.111.105 downloads.sourceforge.net
116.211.120.228 bbs.hifidiy.net
205.166.94.4 ralph.irving.sdf.org
103.235.46.40 baidu.com
185.199.111.133 objects.githubusercontent.com
185.199.108.133 objects.githubusercontent.com
185.199.110.133 objects.githubusercontent.com
185.199.109.133 objects.githubusercontent.com
140.82.114.4 github.com
20.205.243.166 github.com
192.30.255.112 github.com
192.30.255.113 github.com
212.13.197.231 www.chiark.greenend.org.uk
151.101.78.132 httpredir.debian.org
151.101.110.132 httpredir.debian.org
62.210.16.61 www.lesbonscomptes.com
212.13.197.231 www.chiark.greenend.org.uk
185.125.190.36 ports.ubuntu.com
185.125.190.39 ports.ubuntu.com
保存退出。
reboot
重新启动
打开电脑的浏览器,输入路由器地址,进入路由器设置,查看局域网内的设备及地址,当看到设备名:DietPi,则记下地址。
打开PuTTY软件,并在地址栏输入DietPi的地址,点击打开
注意:
第一次登录DietPi,用户名:root登录密码:dietpi
提示:
DietPi-Set_software
Do you want to adjust the default global software password for
DietPi-Software installations? We especially recommend to change the default
password "dietpi". This does not affect any existing software passwords.
NB: This password will be saved and encrypted within
"/var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin" to be useable by DietPi
scripts for e.g. web application and database logins. We highly recommend to
apply individual passwords for each software title after first login.
选择: <Cancel>
提示:
DietPi-Set_software
Change login password for "root" and "dietpi" users?
DietPi has two accounts by default "root" and "dietpi". On first boot, both
share the global password "dietpi", respectively the one set in
"dietpi.txt".
It is highly recommended to change this password, ideally, it should be
different than the global software password.
Would you like to change the login passwords for "root" and "dietpi"?
选择:Ok
输入以root身份登录的密码:67773240 选择:Ok
再次:输入以root身份登录的密码:67773240 选择:Ok
对之后的提示,可以选择:No
显示:
DietPi-Software
Help! : Links to online guides, docs and information
DietPi-Config : Feature-rich configuration tool for your device
●─ Select Software ─────────────────────────────●
Search Software : Find software to install via search box
Browse Software : Select software from the full list
SSH Server :
Log System :
User Data Location :
●─ Install or Remove Software ──────────────────●
Uninstall : Select installed software for removal
Install : Go >> Start installation for selected software
选择:DietPi-Config: Feature-rich configuration tool for your device按Ok
显示:
DietPi-Config
Hardware : Generic Amlogic S905 (aarch64)
1: Display Options
2: Audio Options
3: Performance Options
4: Advanced Options
5: Language/Regional Options
6: Security Options
7: Network Options: Adapters
8: Network Options: Misc
9: AutoStart Options
10 : Tools
选择:3: Performance Options 按Ok
显示:
DietPi-Config
Hardware : Generic Amlogic S905 (aarch64) │
│ CPU Temp: 38'c : 100'f │
│ RAM: 1954 MiB | Used: 180 MiB | Free: 1774 MiB
CPU Governor :
CPU Frequency Limits : Max = | Min =
选择:CPU Governor : 按Ok
显示三个选择项:
schedutil : Scales CPU frequency between 1000 MHz and 1908 MHz
ondemand : Scales CPU frequency between 1000 MHz and 1908 MHz
performance : Forces CPU frequency to 1908 MHz
选择:performance : Forces CPU frequency to 1908 MHz 按Ok
显示:
CPU Governor :
CPU Frequency Limits : Max = | Min =
选择:CPU Frequency Limits : Max = | Min = 按Ok
显示:
Limit the maximum frequency that your processor can reach.
选择:1908 MHz按Ok
显示:
Limit the minimum frequency that your processor can reach.
选择:1800 MHz按Ok
然后选择 <Back>
显示:
DietPi-Config
Hardware : Generic Amlogic S905 (aarch64)
1: Display Options
2: Audio Options
3: Performance Options
4: Advanced Options
5: Language/Regional Options
6: Security Options
7: Network Options: Adapters
8: Network Options: Misc
9: AutoStart Options
10 : Tools
选择:5: Language/Regional Options 按Ok
显示:
DietPi-Config
Please select an option:
Locale :
Timezone :
Keyboard :
选择:Timezone : 按Ok
显示省略,选择:Asia 按Ok
显示省略,选择:Shanghai 按Ok
显示省略,选择:Back
显示省略,选择:Exit
显示省略,选择:Ok
显示省略,选择:Browse Software: Select software from the full list按Ok
显示省略,
光标放到:[ ] 36 Squeezelite: audio player for lms & squeezebox,按 空格键,在方框中加上*
光标放到:[ ] 163GMediaRender: Resource efficient UPnP/DLNA renderer
光标放到:[ ] 96 Samba Server: Feature-rich SMB/CIFS server,按 空格键,在方框中加上*
还可以选:[ ] 35 Logitech Media Server: aka. LMS, fka. SlimServer, SqueezeCenter, SqueezeboxServer, SliMP3
还可以选:[ ] 124NAA daemon: signalyst network audio adaptor (naa)
还可以选:[ ] 128MPD: music player daemon
还可以选:[ ] 86 Roon Extension Manager: manage extensions from within Roon
在Media Systems下面共有29个软件,可以根据自己需要选择安装。
选好要安装的软件后,按Ok
显示省略,选择:Install: Go >> Start installation for selected software按Ok
显示省略,按Ok
开始安装所选软件
显示:
Show : Show me the upload file content
1 : Opt IN and upload data
0 : Opt OUT and purge uploaded data
选择:0按Ok
显示:
─────────────────────────────────────────────────────
DietPi v8.11.2 : 19:06 - Fri 12/09/22
─────────────────────────────────────────────────────
- Device model : Generic Rockchip RK3328 (aarch64)
- CPU temp : 58 °C / 136 °F : Running warm, but safe
- LAN IP : 192.168.2.232 (eth0)
- MOTD : Check out the DietPi v8.11 release notes:
https://dietpi.com/docs/releases/v8_11/
─────────────────────────────────────────────────────
DietPi Team : https://github.com/MichaIng/DietPi#the-dietpi-project-team
Image by : cqzhangjunhua (pre-image: Debian)
Patreon Legends : Camry2731, Chris Gelatt
Website : https://dietpi.com/ | https://twitter.com/DietPi_
Contribute : https://dietpi.com/contribute.html
Web Hosting by: https://myvirtualserver.com
dietpi-launcher : All the DietPi programs in one place
dietpi-config : Feature rich configuration tool for your device
dietpi-software : Select optimised software for installation
htop : Resource monitor
cpu : Shows CPU information and stats
至此,DietPi安装完成
三.设置GMediaRender
1.将USB解码器插入cm311-1a-yst的另一个USB口
2.输入dietpi-config命令,选择音频设备
dietpi-config
选择:2: Audio Options
选择:Sound card :
选择:hw:1,0: H20 USB Audio
选择: <Back> ,退出 <Back>
在安卓手机上安装Bubbleupnp,Bubbleupnp会自动搜索upnp播放器,在播放器中选择DietPi,就可以将手机内的音乐
推送到cm311-1a-yst所接的USB解码器中播放,而且好像是源码播放,在解码器里会显示“PCM44k"或“PCM 192k”。
在播放44k音乐时,CPU的负担,一般在2.0~2.6%左右,最大不超过5%
在播放192k音乐时,CPU的负担,一般在5.9~7.2%左右,最大不超过9%
四.设置squeezelite
建立squeezelite.service文档
输入以下命令:
find / -name squeezelite.service
显示:
/usr/lib/systemd/system/squeezelite.service
/sys/fs/cgroup/system.slice/squeezelite.service
输入以下命令:
nano /lib/systemd/system/squeezelite.service
对文件中的以下内容:
User=squeezelite
EnvironmentFile=/etc/default/squeezelite
ExecStart=/usr/bin/squeezelite $ARGS
将以上修改成:
User=squeezelite
EnvironmentFile=/etc/default/squeezelite
#ExecStart=/usr/bin/squeezelite $ARGS
ExecStart=taskset -c 3 /usr/bin/squeezelite -o hw:1,0 -D dop -p 99 -b 4096:6892
保存退出。
重启系统,设置完成。
在手机上或者电脑上输入DAPHILE的地址,在player页面的右下角选择DietPi-Squeezelite,就可以将DAPHILE选中的音乐
推送到cm311-1a-yst所接的USB解码器中播放。
在播放44k音乐时, CPU的负担,一般在0.7%左右,最大不超过2%
在播放192k音乐时, CPU的负担,一般在1.3~2.6%左右,最大不超过3%
在播放DSD64音乐时,CPU的负担,一般在0.7~1.3%左右,最大不超过2%
在播放DSD128音乐时,CPU的负担,一般在0.7~2%左右,最大不超过3%
注意:当用Squeezelite播放后,再用GMediaRender播放,必须将以下的加#注释掉,保存退出后重启系统。
User=squeezelite
EnvironmentFile=/etc/default/squeezelite
#ExecStart=/usr/bin/squeezelite $ARGS
#ExecStart=taskset -c 3 /usr/bin/squeezelite -o hw:1,0 -D dop -p 99 -b 4096:6892
中国好文,发贴留念 谢谢分享 详细好文,如果图文并茂可以加入教科书了 sinoi 发表于 2022-12-14 22:48
详细好文,如果图文并茂可以加入教科书了
谢谢,你们的欣赏,就是我继续折腾的动力。
详细好文,如果图文并茂可以加入教科书了 谢谢楼主分享的经验,:)
对我来说,用docker安装一个 Navidrome 就足够满足要求了:lol 谢谢楼主的分享,可以装到贝壳云上吗? caoxd01 发表于 2023-3-21 12:58
谢谢楼主的分享,可以装到贝壳云上吗?
应该可以,你试一下。
页:
[1]
2