Author Topic: Extracting AAC from Matroska H264  (Read 1175 times)

Offline mizore

  • Member
  • Posts: 760
  • Joō Heika to Cuteness Gods, Desu~
Extracting AAC from Matroska H264
« on: December 31, 2009, 11:07:40 AM »
K, so I've tried a number of programs (including mkvextract), and every single one extracts the AAC at half the khz that it was originally encoded.  Frustrating to say the least. 

Original encode at 48khz=24khz extract
44khz encode=22khz extract

I've Googled until I can't see straight, and I've seen this same problem posted on other forums (ie. videohelp) with no solution.

I would just try converting to wave and reencoding, but the AAC's I want are 6 channel.  Converting to a 2 channel audio track is what I'd like to avoid.

Someone can please halpz?   :-\

Offline hilander72

  • Member
  • Posts: 190
  • meow!
Re: Extracting AAC from Matroska H264
« Reply #1 on: December 31, 2009, 12:38:45 PM »
Additional info on what your trying to do would be helpful... Mediainfo is your friend. ;)

Offline mizore

  • Member
  • Posts: 760
  • Joō Heika to Cuteness Gods, Desu~
Re: Extracting AAC from Matroska H264
« Reply #2 on: December 31, 2009, 12:40:48 PM »
I use Mediainfo.

...and I don't know how to further clarify that I am trying to extract an AAC from a Matroska .mkv encode?

Offline hilander72

  • Member
  • Posts: 190
  • meow!
Re: Extracting AAC from Matroska H264
« Reply #3 on: December 31, 2009, 12:49:33 PM »
By additional I meant... You're trying to extract an AAC 6ch audio, and wish to be able play it on xxx, etc..., and would prefer the file be of xxx format, etc...

Offline mizore

  • Member
  • Posts: 760
  • Joō Heika to Cuteness Gods, Desu~
Re: Extracting AAC from Matroska H264
« Reply #4 on: December 31, 2009, 01:00:08 PM »
Oh, well it doesn't matter.  I will be reencoding into a Matroska container using the AAC.  Or, I can always convert to AC3... regardless, that isn't the problem. ;D  I know how to proceed after I have the audio. The only issue is proper AAC extraction.  Nothing I have tried extracts the AAC into the original format.  Every program I've tried cuts the sampling frequency in half.

Nyquist-Shannon is tormenting me.

Offline Sakura90

  • Member
  • Posts: 523
  • Got panties? ♥
Re: Extracting AAC from Matroska H264
« Reply #5 on: December 31, 2009, 03:40:10 PM »
Oh, well it doesn't matter.  I will be reencoding into a Matroska container using the AAC.  Or, I can always convert to AC3... regardless, that isn't the problem. ;D  I know how to proceed after I have the audio. The only issue is proper AAC extraction.  Nothing I have tried extracts the AAC into the original format.  Every program I've tried cuts the sampling frequency in half.

Nyquist-Shannon is tormenting me.
Your mkvextract must be on weed or something... here's what my mkvextract just did (MKVExtractGUI v1.6.4.1):




Both have the same sampling frequency ;D
« Last Edit: December 31, 2009, 03:41:50 PM by Sakura90 »
Quote from: Youko@TF
What does "[sic]" mean? I don't think anyone got sick in the article so why is it in there? Should I start writing and post "[dump]" when I leave to go take a shit then return?

Offline mizore

  • Member
  • Posts: 760
  • Joō Heika to Cuteness Gods, Desu~
Re: Extracting AAC from Matroska H264
« Reply #6 on: December 31, 2009, 09:25:10 PM »
Yeah, that's the funny part.  I can extract 2 channel with no problems.  Input resulting AAC into muxing program (mkvmerge, avanti, etc.) and everything works perfectly.

However, try it with 6 channel AAC.  I am betting you get the same problem I do.

Offline Sakura90

  • Member
  • Posts: 523
  • Got panties? ♥
Re: Extracting AAC from Matroska H264
« Reply #7 on: December 31, 2009, 10:00:40 PM »
Yeah, that's the funny part.  I can extract 2 channel with no problems.  Input resulting AAC into muxing program (mkvmerge, avanti, etc.) and everything works perfectly.

However, try it with 6 channel AAC.  I am betting you get the same problem I do.
Betting? What did I win? ;D

Again, your mkvextract must be having some serious weed. Here, both streams have 6 channels @ 48 KHz (in the MKV and extracted):




I don't know why you have that problem :(
Quote from: Youko@TF
What does "[sic]" mean? I don't think anyone got sick in the article so why is it in there? Should I start writing and post "[dump]" when I leave to go take a shit then return?

Offline mizore

  • Member
  • Posts: 760
  • Joō Heika to Cuteness Gods, Desu~
Re: Extracting AAC from Matroska H264
« Reply #8 on: December 31, 2009, 10:27:27 PM »
File input into Avanti:

Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format version                   : Version 4
Format profile                   : LC
Format settings, SBR             : Yes
Format settings, PS              : No
Muxing mode                      : ADTS
Bit rate mode                    : Variable
Channel(s)                       : 6 channels
Sampling rate                    : 44.1 KHz
Stream size                      : 60.9 MiB (100%)

Avanti error:

Resampling with input channels greater than 2 unsupported.

Can not resample 6 channels @ 22050 Hz to 6 channels @ 44100 Hz


 >:(


I'm not resampling if the input file is 44.1khz and target specification is 44.1khz...?!
« Last Edit: December 31, 2009, 11:19:05 PM by mizore »

Offline blud7

  • Member
  • Posts: 6
Re: Extracting AAC from Matroska H264
« Reply #9 on: January 03, 2010, 04:13:49 PM »
I dunno but it seems your problem is Avanti, probably not being able to recognize as well as process the extracted audio stream.

Offline SomeoneElse

  • Member
  • Posts: 258
  • Neko-Mimi Suki!
Re: Extracting AAC from Matroska H264
« Reply #10 on: January 05, 2010, 09:47:24 AM »
um... if you are going from a mkv to encoding in a seperate mkv, why are you going through the midpoint of extraction and conversion?  

in MKVmergeGUI just drag the files into the input and select the streams you want to keep in the new file... conversely I often use MediaCoder to downgrade Ridiculous BD audio rips into more reasonable files... I reduced the over 600 kbps AAC from one movie I DL'd to 256 kbps (well over average for downloaded content) and reduced the overall movie size from 1.4 gigs to 480 mb... BD rips do have their drawbacks...
« Last Edit: January 05, 2010, 09:49:28 AM by SomeoneElse »

Offline johndmes

  • Member
  • Posts: 66
Re: Extracting AAC from Matroska H264
« Reply #11 on: January 12, 2010, 02:45:08 AM »
File input into Avanti:

Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format version                   : Version 4
Format profile                   : LC
Format settings, SBR             : Yes
Format settings, PS              : No
Muxing mode                      : ADTS
Bit rate mode                    : Variable
Channel(s)                       : 6 channels
Sampling rate                    : 44.1 KHz
Stream size                      : 60.9 MiB (100%)

Avanti error:

Resampling with input channels greater than 2 unsupported.

Can not resample 6 channels @ 22050 Hz to 6 channels @ 44100 Hz


 >:(


I'm not resampling if the input file is 44.1khz and target specification is 44.1khz...?!

Forgive me for interjecting, but as a ex-computer technician I think your problem is a incorrect error message.

From the description, it sounds mike the actual error is "Avanti can't interpet 6-channel audio, PERIOD".

Have you tried another remuxer/re-encoder than Avanti -= one that is documented as supporting 6-channel AAC?

Tha'td be the next step I'd take, assuming that the audio was indeed extracted properly.