2023-06-03 04:50:03 +08:00
|
|
|
|
# ncmdump
|
|
|
|
|
|
|
|
|
|
使用本程序可将下载的网易云音乐缓存文件(ncm)转换为 mp3 或 flac 格式
|
|
|
|
|
|
2021-10-07 00:33:57 +08:00
|
|
|
|
## 简介
|
2023-06-03 04:50:03 +08:00
|
|
|
|
|
2021-10-07 00:33:57 +08:00
|
|
|
|
该版本为最早的 C++ 版本,也是作者开发的市面上第一个支持 ncm 转换的程序
|
|
|
|
|
|
|
|
|
|
源码复刻自 anonymous5l/ncmdump,感谢前辈的付出!
|
|
|
|
|
做了 Windows 下的移植,修复了一些编译问题
|
|
|
|
|
|
2023-10-04 17:03:16 +08:00
|
|
|
|
## 传送门
|
2023-06-03 04:50:03 +08:00
|
|
|
|
|
2021-10-07 00:33:57 +08:00
|
|
|
|
2021年10月6日,原作者已经删库
|
|
|
|
|
|
2024-01-06 00:30:18 +08:00
|
|
|
|
## 使用
|
|
|
|
|
|
|
|
|
|
从 [Release](https://github.com/taurusxin/ncmdump/releases) 下载最新版本的对应系统的已编译好的二进制文件
|
|
|
|
|
|
|
|
|
|
使用 `-h` 或 `--help` 参数来打印帮助
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
ncmdump -h
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
命令行下输入一个或多个文件
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
ncmdump file1 file2...
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
你可以使用 `-d` 参数来指定一个文件夹,对文件夹下的所有文件批量处理
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
ncmdump -d folder
|
|
|
|
|
```
|
|
|
|
|
|
2023-06-03 04:50:03 +08:00
|
|
|
|
## 依赖库及不同平台编译方法
|
|
|
|
|
|
|
|
|
|
### 依赖库
|
|
|
|
|
|
2021-10-07 00:33:57 +08:00
|
|
|
|
* taglib
|
|
|
|
|
|
|
|
|
|
### Linux / macOS
|
2023-06-03 04:50:03 +08:00
|
|
|
|
|
2021-10-07 00:33:57 +08:00
|
|
|
|
```shell
|
|
|
|
|
# CentOS
|
|
|
|
|
yum install taglib-devel
|
|
|
|
|
make linux
|
|
|
|
|
|
|
|
|
|
# Ubuntu / Debian
|
|
|
|
|
apt install libtag1-dev
|
|
|
|
|
make linux
|
|
|
|
|
|
2023-10-04 17:03:16 +08:00
|
|
|
|
# macOS with Intel chip
|
2021-10-07 00:33:57 +08:00
|
|
|
|
brew install taglib
|
2023-10-04 17:03:16 +08:00
|
|
|
|
make macos-intel
|
|
|
|
|
|
|
|
|
|
# macOS with Apple Silicon (M1 / M2)
|
|
|
|
|
brew install taglib
|
|
|
|
|
make macos-arm64
|
2021-10-07 00:33:57 +08:00
|
|
|
|
```
|
|
|
|
|
|
2021-10-07 05:00:51 +08:00
|
|
|
|
注意:Linux / macOS 为动态库支持,Linux 下静态编译需要手动编译 taglib 静态库,macOS 原生库不支持静态链接
|
|
|
|
|
|
2021-10-07 00:33:57 +08:00
|
|
|
|
### Windows
|
2021-10-07 05:00:51 +08:00
|
|
|
|
|
2021-10-28 01:12:57 +08:00
|
|
|
|
#### MinGW
|
|
|
|
|
|
2023-06-03 04:50:03 +08:00
|
|
|
|
~~因为部分代码(例如常量引用等)在 msvc 下面编译不通过,本项目需要使用 MinGW 编译~~
|
|
|
|
|
已经修改部分代码使得支持 msvc 编译,详见下面的 Visual Studio 部分
|
2021-10-07 00:33:57 +08:00
|
|
|
|
|
2023-06-03 04:50:03 +08:00
|
|
|
|
下载 mingw-w64 的 Windows 版本,这里推荐从 [winlibs](https://winlibs.com/) 这个网站下载,编译器版本始终跟随上游保持最新
|
2021-10-07 00:33:57 +08:00
|
|
|
|
|
|
|
|
|
将 mingw64/bin 添加到系统环境变量
|
|
|
|
|
|
2021-10-07 05:00:51 +08:00
|
|
|
|
taglib 在 Windows 下已经编译好放在项目内,直接执行
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
mingw32-make win32
|
|
|
|
|
```
|
2021-10-07 00:33:57 +08:00
|
|
|
|
|
2021-10-07 05:24:08 +08:00
|
|
|
|
生成的二进制程序为静态链接版本,可脱离运行库运行在裸机上
|
|
|
|
|
|
2021-10-28 01:12:57 +08:00
|
|
|
|
#### msys2
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
pacman -Syu
|
|
|
|
|
git clone https://github.com/taurusxin/ncmdump && cd ncmdump
|
2021-10-28 01:15:50 +08:00
|
|
|
|
make win32
|
2021-10-28 01:12:57 +08:00
|
|
|
|
```
|
|
|
|
|
|
2023-06-03 04:50:03 +08:00
|
|
|
|
#### Visual Studio
|
|
|
|
|
|
2024-01-06 00:30:18 +08:00
|
|
|
|
注意**VS的源代码还未上传,请先使用 MinGW 编译**
|
2021-10-07 00:33:57 +08:00
|
|
|
|
|
2024-01-06 00:30:18 +08:00
|
|
|
|
使用 git 切换到 msvc 分支,使用 Visual Studio 打开 ncmdump.sln,编译即可
|