Giter Site home page Giter Site logo

gaad's Introduction

GoDoc Build Status Go Report Card

GAAD (Go Advanced Audio Decoder)

Package currently provides AAC parsing capabilities. This package performs a full parse of AAC-LC and HE-AACv1 bitstreams. Bitstreams with Parametric Stereo (HE-AACv2) are not yet supported, but AAC bitstream data and SBR data will be extracted. The AAC decode from the parsed data to LPCM (.wav) is not yet implemented. Please help us expand and test this library!

AACParser

This package currently supports AAC audio data contained in an ADTS header. All available data is returned in the adts struct and can be accessed as nested objects as presented in the AAC specification. All parameter names should be verbatim from the AAC specification, if you find an issue with this please file a bug or submit a pull request.

AAC Types

Type Description CODEC
AACLC AAC mp4a.40.2
HEAAC AAC + SBR mp4a.40.5
HEAACv2 AAC + SBR + PS mp4a.40.29

where:

  • SBR = Spectral band replication
  • PS = Parametric Stereo

Usage

var []byte buf
buf = <ADTS+AAC data>

// Parsing the buffer
adts, err := gaad.ParseADTS(buf)

// Looping through top level elements and accessing sub-elements
var sbr bool
if adts.Fill_elements != nil {
	for _, e := range adts.Fill_elements {
		if e.Extension_payload != nil &&
			e.Extension_payload.Extension_type == gaad.EXT_SBR_DATA {
			sbr = true
		}
	}
}

VBR vs CBR

VBR (Variable bitrate) and CBR (Constant bitrate) is derived from the bitstream_type attribute in the adif_header section. It is VBR if bitstream_type is true, and CBR otherwise.

References

ISO/IEC STANDARD 14496-3

Title         : Coding of audio-visual objects โ€” Part 3: Audio
File          : ISO_14496-3-4th-Edition.pdf
Edition       : Fourth edition (2009-09-01)
Relevant Sections
    - Page 64   : 1.6.5 Signaling of SBR
    - Page 120  : 1.A.2 AAC Interchange formats
    - Page 489  : 4.4.2 GA bitstream payloads

Related Books

Related Links

gaad's People

Contributors

blakeorth avatar cveazey avatar

Watchers

Adam Hunt avatar

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.