Python nmf to wav converter. Nmf file structure was obtained by Nice Audio Player decompilation. Using struct module the script finds raw audio data and push it through the pipe to ffmpeg.
python nmf_converter.py path_to_nmf_file
Python script to convert nmf to wav
License: MIT License
Hi,
I'm grateful for this code! The error specifies that unpack needs a buffer of 2 bytes and happens in the get_compression_type function on the second iteration. Kindly assist me with this error.
Thank you.
when I used it to read the audio with g729a, it raised "struct.error: unpack requires a bytes object of length 1". Does it support the g729A code?
Hi, I'm not a python expert so I am struggling to work out why this isn't working for me. I am running this out of the box and getting the below error - should I be doing something different? I'm on Windows 10, and python 2.7.
λ python nmf_converter.py "C:\path\to\my\file.nmf"
Traceback (most recent call last):
File "nmf_converter.py", line 121, in <module>
convert_to_wav(path_to_file)
File "nmf_converter.py", line 109, in convert_to_wav
stdin=subprocess.PIPE
File "C:\Python27\lib\subprocess.py", line 390, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 640, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
Hi,
First let me thank you for this project. It already helped me a lot!
Today I found an audio that couldn't be converted by this great code.
The Nice Player can play it, but the conveter couldn't convert.
The condition if headers["packet_type"] == 4 and headers["packet_subtype"] == 0: is never true.
Instead of the combination of (packet_type == 4 and packet_subtype == 0), the file shows only (packet_type == 4 and packet_subtype == 3).
The audio file is attached.
Can you give a light on this issue?
Thanks!
In the file, it reads:
data_value = struct.unpack(fmt, data[0:data_size])
if data_value == 0:
but, data_value should be a tuple after unpack, it will never equal to 0.
Is it possible to output 1 file instead of splitting them into multiple files for different streams?
Hi,
I'm using your great script to extract each stream of an .nmf
file to sum them myself afterward and obtain a mono .wav
file (and hear it like I would in the Nice Audio Player).
The problem is: can't figure out how to get each stream's timestamps (in particular each stream's starting time). I saw that we have a start_time
and end_time
value when reading the header with the get_packet_header()
function, but each of them appears to be the same for each stream.
Is there something i'm missing about those start_time
and end_time
values ?
Thanks !
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.