Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 1.5 KB

README.md

File metadata and controls

49 lines (37 loc) · 1.5 KB

AAXClean.Codecs

Converts and filters aac audio from AAXClean.

Nuget

Include the AAXClean.Codecs NuGet package to your project.

Usage:

using AAXClean.Codecs

var audible_key = "aa0b0c0d0e0f1a1b1c1d1e1f2a2b2c2d";
var audible_iv = "ce2f3a3b3c3d3e3f4a4b4c4d4e4f5a5b";
aaxcFile.SetDecryptionKey(audible_key, audible_iv);

Convert to Mp3:

var conversionResult = aaxcFile.ConvertToMp3(File.Open(@"C:\Decrypted book.mp3", FileMode.OpenOrCreate, FileAccess.ReadWrite);

Note that the output stream must be Readable, Writable and Seekable for the mp3 Xing header to be written. See NAudio.Lame #24

Detect Silence

var silences = aaxcFile.DetectSilence(-30, TimeSpan.FromSeconds(0.25));

Conversion Usage:

var mp4File = new Mp4File(File.OpenRead(@"C:\Decrypted book.m4b"));
var conversionResult = mp4File.ConvertToMp3(File.OpenWrite(@"C:\Decrypted book.mp3"));

Multipart Conversion Example:

Note that the input stream needs to be seekable to call GetChapterInfo()

var chapters = aaxcFile.GetChapterInfo();
aaxcFile.ConvertToMultiMp4a(chapters, NewSplit);
            
private static void NewSplit(NewSplitCallback newSplitCallback)
{
	string dir = @"C:\book split\";

	string fileName = newSplitCallback.Chapter.Title.Replace(":", "") + ".m4b";

	newSplitCallback.OutputFile = File.OpenWrite(Path.Combine(dir, fileName));
}