(Go: >> BACK << -|- >> HOME <<)

Skip to content

SharpJaad is an AAC decoder and MP4 demultiplexer library written completely in C#. It uses no native libraries, is platform-independent and portable. It can read MP4 container from a stream and decode AAC-LC (Low Complexity) and HE-AAC (High Efficiency/AAC+). Ported into C# (netstandard2.0) from: sourceforge.net/projects/jaadec

License

Notifications You must be signed in to change notification settings

jimm98y/SharpJaad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SharpJaad

JAAD is an AAC decoder and MP4 demultiplexer library written completely in Java. It uses no native libraries, is platform-independent and portable. It can read MP4 container from almost every input-stream (files, network sockets etc.) and decode AAC-LC (Low Complexity) and HE-AAC (High Efficiency/AAC+).

SharpJaad is a netstandard2.0 port of the original Java code base with a few small fixes. It has no third-party dependencies and it's portable as it does not use any platform-specific APIs.

SharpJaad.AAC

SharpJaad.AAC is just the AAC decoder without any MP4 code. It's well suited for applications in RTP where the MP4 container is not needed.

Example

To decode stereo AAC Low Complexity (AAC-LC) with 44.1kHz, start with creating the configuration:

var decoderConfig = new DecoderConfig();
decoderConfig.SetProfile(Profile.AAC_LC);
decoderConfig.SetSampleFrequency(SampleFrequency.SAMPLE_FREQUENCY_44100);
decoderConfig.SetChannelConfiguration((ChannelConfiguration)2);

Create the decoder:

var aacDecoder = new Decoder(decoderConfig);

Create an output buffer for the result:

SampleBuffer buffer = new SampleBuffer();
buffer.SetBigEndian(false);

Decode the AAC frame:

byte[] aacFrame = { ... } // AAC frame to decode
aacDecoder.DecodeFrame(aacFrame, buffer);

Convert it to PCM:

short[] pcm = new short[buffer.Data.Length / sizeof(short)];
Buffer.BlockCopy(buffer.Data, 0, pcm, 0, buffer.Data.Length);

SharpJaadMain

A sample application that can extract AAC audio from a (MP4) file and transcode it into a WAV file.

Credits

This is a port of the https://sourceforge.net/projects/jaadec/ into C#.

About

SharpJaad is an AAC decoder and MP4 demultiplexer library written completely in C#. It uses no native libraries, is platform-independent and portable. It can read MP4 container from a stream and decode AAC-LC (Low Complexity) and HE-AAC (High Efficiency/AAC+). Ported into C# (netstandard2.0) from: sourceforge.net/projects/jaadec

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages