https://github.com/ww-rm/ncmdump-py
A simple package used to dump ncm files to mp3 or flac files.
https://github.com/ww-rm/ncmdump-py
ncm ncmdump neteasecloudmusic python
Last synced: 6 months ago
JSON representation
A simple package used to dump ncm files to mp3 or flac files.
- Host: GitHub
- URL: https://github.com/ww-rm/ncmdump-py
- Owner: ww-rm
- License: mit
- Created: 2023-11-03T06:54:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-10-23T16:36:20.000Z (9 months ago)
- Last Synced: 2025-10-26T06:28:15.738Z (9 months ago)
- Topics: ncm, ncmdump, neteasecloudmusic, python
- Language: Python
- Homepage: https://ww-rm.github.io/posts/2023/11/04/ncmdump/
- Size: 38.1 KB
- Stars: 46
- Watchers: 2
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ncmdump-py
A simple package used to dump ncm files to mp3 or flac files, it can:
- Decrypt and dump `.ncm` files.
- Auto add album and cover info into `.mp3` or `.flac` files.
- Auto try download cover image when there is no cover data in `.ncm` files.
## Install
```bat
pip install ncmdump-py
```
## Usage
### Command-line tool
```plain
python -m ncmdump [-h] [--in-folder IN_FOLDER] [--out-folder OUT_FOLDER] [--dump-metadata] [--dump-cover] [files ...]
```
```plain
usage: ncmdump [-h] [--in-folder IN_FOLDER] [--out-folder OUT_FOLDER] [--dump-metadata] [--dump-cover] [files ...]
Dump ncm files with progress bar and logging info, only process files with suffix '.ncm'
positional arguments:
files Files to dump, can follow multiple files.
optional arguments:
-h, --help show this help message and exit
--in-folder IN_FOLDER
Input folder of files to dump.
--out-folder OUT_FOLDER
Output folder of files dumped.
--dump-metadata Whether dump metadata.
--dump-cover Whether dump album cover.
```
### Import in your code
```python
from ncmdump import NeteaseCloudMusicFile
ncmfile = NeteaseCloudMusicFile("filename.ncm")
ncmfile.decrypt()
print(ncmfile.music_metadata) # show music metadata
ncmfile.dump_music("filename.mp3") # auto detect correct suffix
# Maybe you also need dump metadata or cover image
# ncmfile.dump_metadata("filename.json")
# ncmfile.dump_cover("filename.jpeg")
```
---
*If you think this project is helpful to you, :star: it and let more people see!*