VideoHelp Forum
+ Reply to Thread
Results 1 to 14 of 14
Thread
  1. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    I have an .aac file that I would like to decode to a wav file.

    This is what MediInfo shows:

    Audio
    ID: 2
    Format: AAC
    Format/Info: Advanced Audio Codec
    Format profile: HE-AAC / LC
    Codec ID: A_AAC
    Duration: 44mn 50s
    Channel(s): 2 channels
    Channel positions: Front: L R
    Sampling rate: 88.2 KHz / 44.1 KHz
    Compression mode: Lossy
    Default: Yes
    Forced: No

    I noticed the 2 different sampling rates and it's HE-AAC.
    How can I decode this to a wav file?
    Quote Quote  
  2. Member bat999's Avatar
    Join Date
    Feb 2008
    Location
    United Kingdom
    Search Comp PM
    ...
    Last edited by bat999; 24th Jul 2016 at 11:37.
    Quote Quote  
  3. I noticed the 2 different sampling rates and it's HE-AAC.
    the two different sampling rates are a feature of HE-AAC
    1st one is the sample rate the decoder should output
    2nd one it the sample rate the content is saved at
    btw. where does the 88.2 KHz come from? Seems rather uncommon.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  4. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by Selur View Post
    ............
    btw. where does the 88.2 KHz come from? Seems rather uncommon.
    From a DVD-Audio disc, or from a stereo (2.0) DTS-CD --- I presume.
    Quote Quote  
  5. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    foobar2000 should be able to decode it and output a .WAV file. Simple and powerful GUI.
    Quote Quote  
  6. @ElHeggunte: You are right, totally forgot about DVD-Audio discs.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  7. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    The audio file is one I downloaded, can't say where...

    the two different sampling rates are a feature of HE-AAC
    1st one is the sample rate the decoder should output
    2nd one it the sample rate the content is saved at
    Shouldn't it be the other way around?
    The 1st one (88.2 KHz) being what's saved
    The 2nd one (44.1 KHz) being what's played back

    Anyway, when decoding with FFmpeg like this...
    Code:
    ffmpeg -i filename.aac filename.wav
    Will it preserve the higher audio quality?
    Quote Quote  
  8. Shouldn't it be the other way around?
    No, when you encode 88.2kHz content with a he-aac encoder it only saves information @44.1kHz + some data for reconstruction and the job ob the decoder is to reconstruct the original 88.2kHz sample rate.
    -> that's one of the main reasons why he-aac can produce decent output on such low bitrates. (you might want to read up on what he-aac is)

    Will it preserve the higher audio quality?
    You are using HE-AAC. It's not meant for high quality encodings, it's not lossless in any way.
    But yes, ffmpeg should produce 88.2kHz output. (assuming ffmpeg supports 88.2kHz output)
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  9. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    OK, I misunderstood.

    When using this:
    Code:
    ffmpeg -i filename.aac filename.wav
    This is what MediaInfo now shows

    Format: PCM
    Format settings, Endianness: Little
    Codec ID: 1
    Duration: 44mn 50s
    Bit rate mode: Constant
    Bit rate: 1 411.2 Kbps
    Channel(s): 2 channels
    Sampling rate: 44.1 KHz
    Bit depth: 16 bits
    Stream size: 453 MiB (100%)

    I know it's lossy, but I only want to get the best possible quality (all things considered)

    When I try to use this:
    Code:
    eac3to input.aac output.wav
    I get the following error:
    Code:
    AAC, 2.0 channels, 44.1kHz
    Decoding with DirectShow (Nero Audio Decoder 2)...
    Getting "Nero Audio Decoder 2" instance failed.
    Aborted at file position 262144.
    How can I get eac3to to work with the Nero decoder?
    Quote Quote  
  10. This is what MediaInfo now shows
    Code:
    Format: PCM
    Format settings, Endianness: Little
    Codec ID: 1
    Duration: 44mn 50s
    Bit rate mode: Constant
    Bit rate: 1 411.2 Kbps
    Channel(s): 2 channels
    Sampling rate: 44.1 KHz
    Bit depth: 16 bits
    Stream size: 453 MiB (100%)
    seems like ffmpeg assumes that for wav the output is 44.1kHz@16bit by default if one doesn't specify sample rate etc.
    (you could still tell ffmpeg that you want 88.2kHz output,.. https://www.ffmpeg.org/ffmpeg-all.html#Audio-Options)
    How can I get eac3to to work with the Nero decoder?
    No clue, don't use eac3to, but some other user probably can help you with that.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  11. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Other options: NeroAacDec, qaac.
    Quote Quote  
  12. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    aacDECdrop? It says it's FAAD2-based AAC/MP4 drag'n'drop frontend.
    Thoughts?
    Quote Quote  
  13. Originally Posted by Selur View Post
    Shouldn't it be the other way around?
    No, when you encode 88.2kHz content with a he-aac encoder it only saves information @44.1kHz + some data for reconstruction and the job ob the decoder is to reconstruct the original 88.2kHz sample rate.
    -> that's one of the main reasons why he-aac can produce decent output on such low bitrates.
    I don't think it's quite like that. The audio is sampled at the original rate (88.2k in this case) but the high frequencies are removed. HE-AAC uses spectral band replication which "fakes" the high frequency stuff on playback by creating some sort of guide track to do it, at half the original rate. That'd be the 44.1k part here.
    It's supposed to be backwards compatible so a player supporting only LC-AAC can still decode it, ignoring the SBR part, so it'll sound a bit dull as the high frequencies aren't included.

    Anyway..... any AAC decoder should be able to decode it properly. To make sure I'm not full of crap I made a similar HE-AAC stream and converted it.

    ID : 1
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : HE-AAC / LC
    Codec ID : 40
    Duration : 4mn 49s
    Bit rate mode : Variable
    Bit rate : 64.4 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 88.2 KHz / 44.1 KHz
    Frame rate : 43.066 fps (1024 spf)

    I tried to duplicate the problem but no matter what I did I ended up with a 88.2kHz wave file. I converted with ffmpeg and foobar2000 and I also extracted the raw AAC and converted that too, thinking maybe that's the problem, but it was still fine.

    A couple of suggestions...... Add -report to the ffmpeg command line and see if the log file it produces sheds any light on the subject. Like this:

    ffmpeg -report -i test.aac test.wav

    And maybe try putting the raw aac into a container before converting it in case it's not being identified correctly. You can open it with MKVToolNixGUI, select the AAC stream, and under the audio and subtitles tab, change the AAC SBR dropdown box to "yes", then save that as an MKA. Try converting the MKA to a wave file to see if that makes a difference. And check the MKA with MediaInfo to see if it's still reporting the same sample rates.

    PS I wouldn't hold my breath trying to get the Nero decoder to decode it. I haven't tried decoding but the Nero encoder won't encode 88.2kHz audio as HE-AAC, only LC-AAC.
    Last edited by hello_hello; 23rd Jul 2016 at 09:19.
    Quote Quote  
  14. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    When using this:
    Code:
    ffmpeg -report -i "H:\__Audio\S00E00_-_Home.aac" "H:\__Audio\S00E00_-_Home.wav"
    This is what MediaInfo now shows:

    Format: PCM
    Format settings, Endianness: Little
    Codec ID: 1
    Duration: 44mn 50s
    Bit rate mode: Constant
    Bit rate: 1 411.2 Kbps
    Channel(s): 2 channels
    Sampling rate: 44.1 KHz
    Bit depth: 16 bits
    Stream size: 453 MiB (100%)

    When muxed into .mka container using this:
    Code:
    ffmpeg -report -i "H:\__Audio\S00E00_-_Home.mka" "H:\__Audio\S00E00_-_Home.wav"
    This is what MediaInfo now shows:

    Format: PCM
    Format settings, Endianness: Little
    Format settings, Sign: Signed
    Codec ID: 00001000-0000-0100-8000-00AA00389B71
    Duration: 44mn 50s
    Bit rate mode: Constant
    Bit rate: 2 822 Kbps
    Channel(s): 2 channels
    Channel positions: Front: L R
    Sampling rate: 88.2 KHz
    Bit depth: 16 bits
    Stream size: 905 MiB (100%)

    Also, when I play the original file with Kodi connected to my receiver with HDMI, the receiver shows 88.2 kHz. Kodi's OSD also shows 88200 Hz. So, I'm assuming that the decoder in Kodi is decoding the full HE-AAC audio.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!