买了张128G内存卡把音乐搬到了盒子上
参考官方教程:https://www.navidrome.org/docs/usage/jukebox/
apt update
apt upgrade
# 安装ffmpeg
apt install ffmpeg
# 新建目录
mkdir /opt/navidrome
# 进入新建目录
cd /opt/navidrome
# 下载navidrome,我的是armv7
wget https://mirror.ghproxy.com/https://github.com/navidrome/navidrome/releases/download/v0.52.0/navidrome_0.52.0_linux_armv7.tar.gz
# 解压
tar -xvf navidrome_0.52.0_linux_armv7.tar.gz
# 配置文件夹权限
chown -R 755 /opt/navidrome
#新建配置文件
vi navidrome.toml
navidrome.toml配置文件内容,MusicFolder是音乐文件目录,根据自己的填写
LogLevel = 'DEBUG'
ScanSchedule = '@every 24h'
TranscodingCacheSize = '150MiB'
Port = 81
MusicFolder = '/mnt/mmcblk1p1/music'
DataFolder = '/opt/navidrome/data/'
CacheFolder = '/opt/navidrome/data/'
DefaultLanguage = 'zh-Hans'
DefaultTheme = 'Dark'
EnableSharing = 'true'
Jukebox.Enabled = 'true'
Jukebox.Devices = [
# "symbolic name " "device"
[ "alsa", "alsa/default:CARD=HISIAIAO" ],
[ "jack", "jack" ],
[ "alsa1", "alsa/dmix:CARD=HISIAIAO,DEV=0" ],
[ "alsa2", "alsa/plughw:CARD=HISIAIAO,DEV=0" ]
]
Jukebox.Default = "alsa1"
Scanner.GroupAlbumReleases = 'true'
UILoginBackgroundUrl = 'https://api.dujin.org/bing/1920.php'
# 后台运行
vi /etc/systemd/system/navidrome.service
粘贴以下内容
[Unit]
# 服务名称,可自定义
Description = navidrome server
After = network.target syslog.target
Wants = network.target
[Service]
Type = simple
# 启动navidrome的命令
ExecStart = /opt/navidrome/navidrome --configfile "/opt/navidrome/navidrome.toml"
[Install]
WantedBy = multi-user.target
# 载入服务
systemctl daemon-reload
# 启动、停止、重启命令
systemctl start navidrome.service
systemctl stop navidrome.service
systemctl restart navidrome.service
进入web管理,创建用户
http://盒子ip:81
# 安装mpv
apt install mpv
# 查看音频设备
mpv --audio-device=help
我的会显示以下音频设备
root@hi3798mv100:~# mpv --audio-device=help
xcb_connection_has_error() returned true
List of detected audio devices:
'auto' (Autoselect device)
'alsa' (Default (alsa))
'alsa/default:CARD=HISIAIAO' (HISI-AIAO, /Default Audio Device)
'alsa/sysdefault:CARD=HISIAIAO' (HISI-AIAO, /Default Audio Device)
'alsa/dmix:CARD=HISIAIAO,DEV=0' (HISI-AIAO, /Direct sample mixing device)
'alsa/plughw:CARD=HISIAIAO,DEV=0' (HISI-AIAO, /Hardware device with all software conversions)
'jack' (Default (jack))
'sdl' (Default (sdl))
'sndio' (Default (sndio))
root@hi3798mv100:~#
安卓手机用APP连接Navidrome投送播放
APP下载:
https://github.com/daneren2005/Subsonic/releases/download/5.5.3/DSub.5.5.3-google-release.apk