top of page
Search
paitasontimosi

He Aac V2 Sample File: A Guide to Encoding and Decoding with FFmpeg



For some particular video's audio, I am getting half channel count and half sample rate with android mediaExtractor and mediaFormats (Ex: Channel count is 2 and sample rate is 44100 but I am getting channel count 1 and sample rate 22050). For other videos, it is working fine. One thing I noticed is that for "aac profile = 29" it causing the problem.


In HE AAC, SBR(Spectral Band Replication) is used, so the actual sample rate will be doubled.In, HE AAC v2, both SBR(Spectral Band Replication) and PS(Parametric Stereo) are used, so the actual sample rate and channel count will be doubled.




He Aac V2 Sample File




Another Solution : For this, you have to decode the audio file using mediaCodec, in onOutputFormatChanged(codec: MediaCodec, format: MediaFormat) callback, you will have accurate channelCount and sampleRate in the format .


I've done some Googling around but it's tricky to find specific information on the v2 codec (as opposed to just HE-AAC v1, which does not allow Parametric Stereo), and I'm wondering if there are any valid third-party software decoders available which would allow me to use HE-AAC v2 files in full stereo on iOS.


MPEG-4 HE-AAC v2 is the combination of Advanced Audio Coding (AAC), Spectral Band Replication (SBR) and Parametric Stereo (PS), standardized as the High-Efficiency v2 profile in MPEG-4 (HE AAC v2). SBR is a unique bandwidth extension technique which enables audio codecs to deliver the same quality at a significant bit rate reduction. PS is a coding tool that is able to capture a stereo signal as a monaural downmixed signal plus a limited number of parameters requiring low-overhead.


The MPEG-4 HE-AAC v2 decoder is the combination of Advanced Audio Coding (AAC), Spectral Band Replication (SBR) and Parametric Stereo (PS), standardized as the High-Efficiency v2 profile in MPEG-4 (HE-AAC v2). The MPEG-4 HE-AAC v2 is backward compatible with AAC-LC.


You may find that some of your videos the outputs are a few milliseconds longer than the inputs with black frames added at the end. The reason for this is a longer audio duration due to the fact that any time you encode aac, extra audio priming samples are added to the beginning of the audio stream. (See this Apple document for more details.) For HLS outputs, we adjust the audio duration to account for the samples.


The AAC audio codec has several profiles. By default, Zencoder will pick the right profile based on the bitrate and number of channels used: stereo content under 40kbps will use HE-AAC v2 if max-aac-profile is set to "he-aac-v2"; stereo content under 84kbps will use HE-AAC if max-aac-profile is set to "he-aac"; and AAC-LC will be used for higher bitrate content, or if max-aac-profile is set to "aac-lc". "he-aac" is the default value, which means that by default, 0-84kbps will use HE-AAC and 85kbps and up will use AAC-LC.


AAC-LC ("Low Complexity") is the most common AAC profile, and virtually every AAC decoder supports AAC-LC. AAC-LC allows mono and stereo, with sample rates from 8khz-96khz, and high bitrates (>300kbps). Use AAC-LC when encoding stereo content at 80kbps and above or mono content above 40kbps, or when you want to support devices that only play AAC-LC, like the Roku or old iPods.


HE-AAC ("High Efficiency") is a widely supported AAC profile that sounds better than AAC-LC at low bitrates by implementing Spectral Band Replication (SBR). HE-AAC supports mono and stereo content at sample rates of 16khz-48khz and bitrates ranging from 16kbps-128kbps. Most web and mobile decoders support HE-AAC, including Flash, HTML5 (wherever AAC is supported), iPhone, iPad, Android, etc. Use HE-AAC for stereo content below 80, or low bitrate mono content.


The default bandwidth (or low-pass filter cutoff) for each bitrate mode will be the minimum of the appropriate value in the tables below or half the sample rate. This can be overridden, but the maximum value is 20000 Hz. [13]


The HE-AAC and HE-AACv2 profiles encode audio using AAC-LC at one half the sample rate, relying on Spectral Band Replication (SBR) to attempt reconstruction of the missing higher frequencies. The end result is an apparent full bandwidth transmission (as if no low-pass filter was applied), even though the actual AAC-LC encoded audio is only storing frequencies up to 1/4 the original sample rate.


As of FDK version 3.4.12, not all combinations of audio object types, bitrate modes, channel layouts, and sample rates can be used together, due to a limited table of pre-computed values used by the encoder.


Using a FLAC example with 24-bit/96kHz 5.1 channel audio, and embedded album art to demonstrate workarounds for some quirks/bugs. The sample used is from the Diatonis Free Surround Sound Music page. The track used is titled "Rock".


AAC (Advanced Audio Coding) and MP3 (MPEG-1 Audio Layer 3) are lossy formats for audio files. MP3, an audio-specific format, is now the de facto standard of digital audio compression for the transfer and playback of music on digital audio players. Designed to be the successor of the MP3 format, AAC generally achieves better sound quality than MP3 at similar bit rates. This difference in quality is more obvious at lower bitrates.


In Compressor, many of the built-in settings in the Settings pane, including the YouTube & Facebook, ProRes, and Proxy settings, use the QuickTime Movie format. This format encodes video files for many uses, including a proxy workflow in Final Cut Pro. See Create optimized and proxy files in Final Cut Pro.


Include metadata from the source file that cannot be displayed as a job annotation: Available when Use Job Annotations is selected. Includes the metadata from the Job Annotations listed in the Job inspector and passes the existing metadata from the source file to the transcode.


Enable video pass-through: Select this checkbox to copy the source video unmodified to the destination file. When this checkbox is selected, all the other settings in the video properties area are disabled.


Top First: The video is interlaced and displayed as two separate interleaved fields. The field containing the top line (even lines) is sampled at an earlier instant in time than the field containing the bottom line (odd lines). This field order is commonly used for high-definition video and standard-definition PAL video.


Bottom First: The video is interlaced and displayed as two separate interleaved fields. The field containing the bottom line (odd lines) is sampled at an earlier instant in time than the field containing the top line (even lines). This field order is commonly used for standard-definition NTSC video.


Custom: Setting data rate to Custom enables a value field that limits your video signal to a set number of kilobits per second (kbps). Higher rates allow higher-quality video but generate larger files that are slower to download or transmit.


Keyframe interval: Enter a value in the text field to set the key frame interval (number of frames) at which you want keyframes created in your output file. Alternatively, you can select Automatic to have Compressor choose the keyframe interval rate (the displayed value is 0 with Automatic on; the actual value is determined during the encoding process).


Frame Reordering: Select this checkbox to potentially provide a better-quality output file by allowing Compressor to reorder video frames during transcoding. This option is only available when Codec is set to H.264 or HEVC.


Cropping: This pop-up menu sets the dimension of the output image. The custom option allows you to enter your own image dimensions in the fields; other options use predetermined sizes. The Letterbox Area of Source option detects image edges and automatically enters crop values to match them. This is useful if you want to crop out the letterbox area (the black bars above and below a widescreen image) of a source media file.


Enable audio pass-through: Select this checkbox to copy the source audio unmodified to the destination file. When this checkbox is selected, all the other settings in the Audio Properties area are disabled.


Sample rate: Use this pop-up menu to set the number of times per second that music waveforms (samples) are captured digitally. The higher the sample rate, the higher the audio quality and the larger the file size.


AAC is a popular audio coding technique recommended by MPEG committee. The codec handles audio signals sampled in the range of 8 kHz to 96 kHz. It operates on a frame of 1024 samples. The bit-rates supported are in the range of 8 kbps to 576 kbps per channel.


Many different audio file formats exist for storing recorded audio data ona computer system. This post compares multiple file types and givessuggestions on which formats and bitrates one should use, especially when producingpodcasts or other online audio.


When distributing a podcast or other audio over the internet, you want to have the smallest possible filesize, the best possiblequality and everyone should be able to play it (on all operating systems, on mobile phones, portable audio players, car audio players etc.). Because of the much smaller filesize, lossy formats are the only real option. Additionally one may archive the produced podcast in a lossless compressed audio file. 2ff7e9595c


0 views0 comments

Recent Posts

See All

留言


bottom of page