doc: 添加音乐步骤
This commit is contained in:
commit
8a509ede92
196
README.md
Normal file
196
README.md
Normal file
@ -0,0 +1,196 @@
|
||||
# 添加音乐指南
|
||||
|
||||
## 音乐规范
|
||||
|
||||
请将音频文件命名按照以下规范命名
|
||||
|
||||
__歌手1、歌手2 - 歌曲名.mp3__
|
||||
|
||||
请确保音频文件格式为`.mp3`并且包含所有音频`元数据`
|
||||
|
||||
音频元数据应至少包含以下内容
|
||||
|
||||
- 标题
|
||||
- 艺术家
|
||||
- 专辑
|
||||
- 年份
|
||||
- 歌词
|
||||
- 封面
|
||||
- 音轨号
|
||||
|
||||
这里以`周杰伦 - 简单爱`为例
|
||||
|
||||
![歌曲元信息1](./imgs/music-meta-info-1.png)
|
||||
![歌曲元信息2](./imgs/music-meta-info-2.png)
|
||||
|
||||
__互联网上获取到的歌曲几乎99%的元信息是不全或有误的,一定要手动获取一遍!__
|
||||
具体获取方法可以参考[获取歌曲元信息](#获取歌曲元信息)
|
||||
|
||||
## 获取歌曲元信息
|
||||
|
||||
这里推荐使用docker版的music_tag来获取音乐的元信息
|
||||
|
||||
### docker换源(可选)
|
||||
|
||||
如果你不想挂🪜拉取docker,又是大陆网络,可以通过以下方式修改docker源后进行后续步骤
|
||||
|
||||
#### windows、macos
|
||||
|
||||
打开Docker Desktop点击右上角设置按钮
|
||||
|
||||
找到`Docker Engine`在其中添加
|
||||
|
||||
```json
|
||||
"registry-mirrors": [
|
||||
"https://docker.1panel.live"
|
||||
]
|
||||
```
|
||||
|
||||
整体内容看起来应该是
|
||||
|
||||
```json
|
||||
{
|
||||
"...": "...",
|
||||
"registry-mirrors": [
|
||||
"https://docker.1panel.live"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
#### Linux
|
||||
|
||||
```bash
|
||||
sudo cp /etc/docker/daemon.json /etc/docker/daemon.json.bak
|
||||
sudo vim /etc/docker/daemon.json
|
||||
```
|
||||
|
||||
向其中添加
|
||||
|
||||
```json
|
||||
"registry-mirrors": [
|
||||
"https://docker.1panel.live"
|
||||
]
|
||||
```
|
||||
|
||||
整体内容看起来应该是
|
||||
|
||||
```json
|
||||
{
|
||||
"...": "...",
|
||||
"registry-mirrors": [
|
||||
"https://docker.1panel.live"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
重启docker服务
|
||||
|
||||
```bash
|
||||
sudo systemctl restart docker
|
||||
```
|
||||
|
||||
### 启动music_tag
|
||||
|
||||
首先确定`项目目录`,并在其中创建`music`目录
|
||||
|
||||
#### 方式1:使用docker-compose
|
||||
|
||||
在`项目目录中`创建`docker-compose.yml`,内容如下
|
||||
|
||||
```yml
|
||||
services:
|
||||
music-tag:
|
||||
image: xhongc/music_tag_web:latest
|
||||
container_name: music-tag-web
|
||||
ports:
|
||||
- "8001:8001"
|
||||
volumes:
|
||||
- ./music:/app/media:rw
|
||||
command: /start
|
||||
restart: unless-stop
|
||||
```
|
||||
|
||||
在`项目目录`下执行如下命令
|
||||
|
||||
```bash
|
||||
sudo docker-compose up -d
|
||||
```
|
||||
|
||||
#### 方式2:直接使用docker
|
||||
|
||||
在`项目目录`下直接执行如下命令
|
||||
|
||||
```bash
|
||||
sudo docker run -itd --name music-tag-web -p 8001:8001 -v ./music:/app/media:rw xhongc/music_tag_web:latest /start
|
||||
```
|
||||
|
||||
#### 访问music_tag
|
||||
|
||||
使用浏览器访问
|
||||
|
||||
```
|
||||
http://localhost:8001
|
||||
```
|
||||
|
||||
默认的用户名密码都是`admin`
|
||||
|
||||
### 使用music_tag
|
||||
|
||||
在使用之前或使用时,将音乐放入`项目目录`的`music`目录中,音乐放入后,需要刷新页面
|
||||
|
||||
点击左侧选择音乐文件所在目录
|
||||
|
||||
![使用music_tag](./imgs/use-music-tag-1.png)
|
||||
|
||||
1. 点击左侧音乐文件
|
||||
2. 点击搜索按钮
|
||||
3. 点击箭头更新歌曲元信息
|
||||
4. 保存歌曲元信息
|
||||
|
||||
![使用music_tag](./imgs/use-music-tag-2.png)
|
||||
|
||||
如果在使用时出现无法获取到歌曲完整元信息的情况,可以切换信息源,推荐`QQ音乐`
|
||||
|
||||
![使用music_tag](./imgs/use-music-tag-3.png)
|
||||
|
||||
## 上传链接
|
||||
|
||||
请将符合[规范](#音乐规范)的音乐上传至以下链接
|
||||
|
||||
```bash
|
||||
https://bitnet.fun:5001/sharing/VMVVXevUE
|
||||
```
|
||||
|
||||
## 获取音乐文件
|
||||
|
||||
推荐以下两个网站
|
||||
|
||||
### 网站1
|
||||
|
||||
```
|
||||
https://www.gequbao.com/
|
||||
```
|
||||
|
||||
这个网站可以直接下载低品质(国内音乐平台的标准音质)音乐(建议)
|
||||
|
||||
__PS: 在线流媒体需要考虑服务器带宽和存储成本,建议使用标准的音质(128kbps)__
|
||||
|
||||
### 网站2
|
||||
|
||||
```
|
||||
https://tool.liumingye.cn/music/#/
|
||||
```
|
||||
|
||||
使用这个网站,需要按照以下步骤获取音乐文件
|
||||
|
||||
1. 搜索音乐
|
||||
2. 在搜索页面打开浏览器开发者工具
|
||||
3. 浏览器开发者工具切换到网络选项卡
|
||||
4. 过滤器中选择`media`或`媒体`
|
||||
5. 双击状态码为`2xx`的请求
|
||||
|
||||
![下载音乐](./imgs/music-download-1.png)
|
||||
|
||||
按照这个步骤,不出意外就能获取到你要的音乐文件了
|
||||
|
||||
__PS:别忘了按照上面的[命名规范](#音乐规范)给音乐重命名__
|
BIN
imgs/music-download-1.png
Normal file
BIN
imgs/music-download-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 69 KiB |
BIN
imgs/music-meta-info-1.png
Normal file
BIN
imgs/music-meta-info-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
BIN
imgs/music-meta-info-2.png
Normal file
BIN
imgs/music-meta-info-2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
BIN
imgs/use-music-tag-1.png
Normal file
BIN
imgs/use-music-tag-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 270 KiB |
BIN
imgs/use-music-tag-2.png
Normal file
BIN
imgs/use-music-tag-2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 374 KiB |
BIN
imgs/use-music-tag-3.png
Normal file
BIN
imgs/use-music-tag-3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 332 KiB |
Loading…
Reference in New Issue
Block a user