Code Monkey home page Code Monkey logo

nmf_to_wav's Introduction

Description

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.

Usage:

python nmf_converter.py path_to_nmf_file

nmf_to_wav's People

Contributors

arrrghhh avatar quarckster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nmf_to_wav's Issues

Unpack requires a buffer of 2 bytes

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.

Does it support the g729a code?

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?

"The system cannot find the file specified" when running out of the box on Windows

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

Nice audio version 6.7

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?

nice_audio_6.7.zip

Thanks!

Get each stream's timestamps

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 !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.