- Home /
How would you convert ogg files to wav files properly using C# scripting?
This is not going to be a standalone audio converter, but more so a part of a large project, and the process will be a batch conversion. Simply changing the file extension does not properly convert, as that method's files do not work with other software. Also, I have tried NAudio and NVorbis and putting those dlls in with the other Unity plugins breaks everything. If I were to use any other library, it has to be an open/free license, nothing to purchase under any circumstance. Besides, I would much rather learn how to do this on my own without libraries. I have pulled off the batch conversion process, I just need to get the proper way of converting ogg files to wav files, so that those wave files can be used in other software without crashing.
Answer by DaveA · Dec 18, 2013 at 09:23 PM
To do it yourself you would start by finding the file format documents for both formats, then write a parser for OGG and a writer for WAV. But you should really take a look at FFMPEG which converts just about anything to anything. If it were me, I would shell-execute a compiled ffmpeg.exe with params to convert from/to. But you can get the source code for those and massage it into your project.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
A node in a childnode? 1 Answer
Converting from String to Enum 1 Answer
Distribute terrain in zones 3 Answers
Unity: C#: Eyes look at mouse: HELP!! 3 Answers