allenfrostline / pyncmdump Goto Github PK
View Code? Open in Web Editor NEWPython3 version of ncmdump, which converts ".ncm" files into ".flac" and ".mp3" etc.
License: MIT License
Python3 version of ncmdump, which converts ".ncm" files into ".flac" and ".mp3" etc.
License: MIT License
❯ python3 ncmdump.py test.ncm ─╯
INFO [2023-03-16 02:55:51]
INFO [2023-03-16 02:55:51] _ _ ___ __ __ ___ _ _ __ __ ___
INFO [2023-03-16 02:55:51] _ __ _ _| \| |/ __| \/ | \| | | | \/ | _ \
INFO [2023-03-16 02:55:51] | '_ \ || | .` | (__| |\/| | |) | |_| | |\/| | _/
INFO [2023-03-16 02:55:51] | .__/\_, |_|\_|\___|_| |_|___/ \___/|_| |_|_|
INFO [2023-03-16 02:55:51] |_| |__/
INFO [2023-03-16 02:55:51] pyNCMDUMP
INFO [2023-03-16 02:55:51] https://github.com/allenfrostline/pyNCMDUMP
INFO [2023-03-16 02:55:51]
INFO [2023-03-16 02:55:51] Running pyNCMDUMP on single-worker mode
INFO [2023-03-16 02:55:51] Converting "test.ncm"
Traceback (most recent call last):
File "/Users/xingfanxia/projects/pyNCMDUMP/ncmdump.py", line 181, in <module>
dump(*args.paths, n_workers=args.workers)
File "/Users/xingfanxia/projects/pyNCMDUMP/ncmdump.py", line 158, in dump
for fp in tqdm(all_filepaths, leave=False): dump_single_file(fp)
File "/Users/xingfanxia/projects/pyNCMDUMP/ncmdump.py", line 71, in dump_single_file
cryptor = AES.new(core_key, AES.MODE_ECB)
File "/opt/homebrew/lib/python3.10/site-packages/Crypto/Cipher/AES.py", line 95, in new
return AESCipher(key, *args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/Crypto/Cipher/AES.py", line 59, in __init__
blockalgo.BlockAlgo.__init__(self, _AES, key, *args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/Crypto/Cipher/blockalgo.py", line 141, in __init__
self._cipher = factory.new(key, *args, **kwargs)
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
Maybe a non compatible version of pycrypto
The problem came with the new version, when I passed in a folder where pyNCMDUMP had already been executed as in the previous version, it threw an AssertionError, at ncmdump.py L60.
assert binascii.b2a_hex(header) == b'4354454e4644414d'
This line of code is very well understood and is used to confirm that the input file is as expected. It does not have any problems.
In previous versions, pyNCMDUMP would filter *.ncm
file as input. Now, pyNCMDUMP does not do this.
As the title suggests, this occurs when I specify the use of two processes in a dual CPU core environment. When using the default configuration, it works properly.
This may require further testing to show if the problem only occurs in dual CPU core environments. In particular, it will need to be investigated whether the problem can occur in environments where the number of CPU cores is greater than or equal to the number of processes in addition to dual CPU core environments.
I only have one server with dual CPU core, so I was unable to perform these tests.
Give the resulting file a different suffix to the result first.
This may require further testing to show if the problem only occurs in dual CPU core environments. In particular, it will need to be investigated whether the problem can occur in environments where the number of CPU cores is greater than or equal to the number of processes in addition to dual CPU core environments.
I only have one server with dual CPU core, so I was unable to perform these tests.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.