Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jimm98y/sharpjaad
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
https://github.com/jimm98y/sharpjaad
aac audio-processing codec decoder netstandard
Last synced: 22 days ago
JSON representation
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
- Host: GitHub
- URL: https://github.com/jimm98y/sharpjaad
- Owner: jimm98y
- License: mit
- Created: 2023-04-25T20:50:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-16T23:08:27.000Z (10 months ago)
- Last Synced: 2024-09-15T10:14:44.622Z (2 months ago)
- Topics: aac, audio-processing, codec, decoder, netstandard
- Language: C#
- Homepage:
- Size: 441 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```cs
var decoderConfig = new DecoderConfig();
decoderConfig.SetProfile(Profile.AAC_LC);
decoderConfig.SetSampleFrequency(SampleFrequency.SAMPLE_FREQUENCY_44100);
decoderConfig.SetChannelConfiguration((ChannelConfiguration)2);
```Create the decoder:
```cs
var aacDecoder = new Decoder(decoderConfig);
```Create an output buffer for the result:
```cs
SampleBuffer buffer = new SampleBuffer();
buffer.SetBigEndian(false);
```Decode the AAC frame:
```cs
byte[] aacFrame = { ... } // AAC frame to decode
aacDecoder.DecodeFrame(aacFrame, buffer);
```Convert it to PCM:
```cs
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#.