Log in

View Full Version : aac 5.1 conversion to anything(pulling hair out)


dog-god
2nd August 2005, 01:22
i have mkv anime epsiode that has 5.1 aac audio
i been reading and experminting for the last 3 days but i cannot for the life of me find a way to convert this to 5.1 ac3 preferrable or mp3 downmix at worst

ive used mplayer - accdop - dbpoweramp - besweet - virtualdubmod - graphedit etc
if anybody has done this successfully ive appreciate some help
ive read the post concerning this on this forum but the sampling rate ,speed ,lenght vary using different methods
also there sems to be an issue with how the channels are mapped differently from ac3 5.1

if any want to play with the aac file(extracted from the mkv with MKVextractGUI_154) size 38mb link below


http://rapidshare.de/files/3564535/Track2.rar.html

grab file here

E-Male
2nd August 2005, 02:03
ac3filter should do the job

magicclue
2nd August 2005, 18:51
yep.
and there's a guide too.

See sticky in audio forum!!!

SeeMoreDigital
2nd August 2005, 19:35
With the correct settings Foobar2000 can trancode 6Ch AAC-LC or HE streams (with .MP4 or .AAC file extentions) to say, 2Ch WAV, Vorbis, MP3, etc :)


Cheers

magicclue
2nd August 2005, 19:53
With the correct settings Foobar2000 can trancode 6Ch AAC-LC or HE streams (with .MP4 or .AAC file extentions) to say, 2Ch WAV, Vorbis, MP3, etc :)
Cheers
[Sorry but it cannot.
Foobar2000 does not decode AAC 5.1 correctly you'll end up with 8 channel wav! See Hydrogenaudio for more info on this...]


Use this guide: http://forum.doom9.org/showthread.php?p=666226#post666226

SeeMoreDigital
2nd August 2005, 22:22
[Sorry but it cannot.
Foobar2000 does not decode AAC 5.1 correctly you'll end up with 8 channel wav! See Hydrogenaudio for more info on this...]

Use this guide or guide below that: http://forum.doom9.org/showthread.php?p=666226#post666226You're right... I've just tried it and got an 8Ch WAV file, even after fiddling about with the DSP settings.... bummer!

However... all is not lost as I managed to use QuickTime Pro 7 to convert a RAW 6Ch AAC stream to an 2Ch WAV stream @ 44.1 KHz, which worked fine. I also tried converting to an 2Ch WAV stream @ 48.0 KHz, which did not work so well...


Cheers

neo75903
2nd August 2005, 22:36
tried videolan? should do the job ...

eb
3rd August 2005, 05:31
@dog-god,

I converted your sample to AC35.1 384kb/sec it is ca.70MB.
How to send it to you?
AS Doom9 wrote in news, and because the same reason I have no time to write more detailed answer.
Quality of this sample as ac3 is really nice.

eb

Edited: sorry it is AC3 2.0 44100

Again. Sample could be Ac3 5.1 484kb/s, 48000kbs samplerate, ca. 80MB

Rockaria
5th August 2005, 02:07
tried videolan? should do the job ...
I tried in a hope, but the best I got in the 'audio device' option was '2 front + 2 rear'. :confused:
The decoder in the vlc does not seem to be reading the format(HE+ AAC 5.1ch) correctly too.

magicclue
5th August 2005, 09:09
see post #5 Guide.
What else do you want?

Rockaria
5th August 2005, 09:55
see post #5 Guide.
What else do you want?Hmm, I think it's for me. ;)
Firstly, I wanted to leave a feedback to neo75903's message.
Also I like and enjoy the foobar2K dts/ac3->aac he+ in a step.

I have no doubt your guide must be very helpful to many and I appreciate that.
But among the many possible ways, I think I will choose the graphedit ffdshow audio(with possibly channel remappings) ac3 encoding-> file writer one.
What I wanted is the foobar aac decoder plugin updated soon. :cool:

tebasuna51
5th August 2005, 10:26
I know ac3filter/ffdshow can do the job.

But, what is the problem with Foobar?. I try with this Track2.aac and make a correct 6 channel wav (L,R,C,LFE,SL,SR - 44.1 KHz - 24m 20.21s). Whit DSP activated for a dpl downmix make a correct stereo wav.

I use Foobar2000 v0.8.3 (last stable). Maybe the problem aac 5.1 -> 8 channel wav is for v0.9 beta?

When I use aacDECdrop to decode this track2.aac it make a 6 channel wav (C,L,R,SL,SR,LFE - 22.05 KHz - 24m 20.21s). Incorrect channel order and downsampling to half frecuency.

When I use Faad (V2.1 beta) it inform about Track2.aac:
ADTS, 1460.256 sec, 215 kbps, 44100 Hz
And make a correct 6 channel wav (WAVE_FORMAT_EXTENSIBLE - L,R,C,LFE,SL,SR - 44.1 KHz - 24m 20.21s). Here the problem is: old soft (SoftEncode, ...) can't open WAVE_FORMAT_EXTENSIBLE.

Rockaria
5th August 2005, 10:41
I tested the foobar2k(the same v0.8.3) after reading this thread days ago. I made a 5.1ch he+aac(from a dts) and a 2.0 ch he+aac(from a mp3).
I opened the first one with the foobar2k and tried the 5.1ch he+aac encoding resulting in a turn off to the desktop. The second one transcoded without any problems.

As for the 'WAVE_FORMAT_EXTENSIBLE' format with the softEncode, the raw format read will do the trick if you don't care about the static noise in the beginning.
Or you can possibly read it as raw format with the first some blocks cut-off(manually).

magicclue
5th August 2005, 12:23
...But, what is the problem with Foobar?. I try with this Track2.aac and make a correct 6 channel wav (L,R,C,LFE,SL,SR - 44.1 KHz - 24m 20.21s). Whit DSP activated for a dpl downmix make a correct stereo wav...

I use Foobar2000 v0.8.3 (last stable). Maybe the problem aac 5.1 -> 8 channel wav is for v0.9 beta?
...
When I use aacDECdrop to decode this track2.aac it make a 6 channel wav (C,L,R,SL,SR,LFE - 22.05 KHz - 24m 20.21s). Incorrect channel order and downsampling to half frecuency...


Ahh.. guess what:

You downmixed and lost all discrete channel infos.
But the question was AAC 5.1 -> AC3 5.1
So there's no downmix.

If you decode AAC 5.1 with Foobar2000 0.8.3 to multichannel WAV you'll end up with a 8ch WAV. That's the problem.
Might work if you downmix to Dolby Pro Logic. But then you'll only need 2 channels.

For aacDecDrop and channel mapping see my guides posted above.
Or my ffdshow/graphedit guide (also above)

Rockaria
5th August 2005, 13:22
Yeah, I found now you also included the graphedit with ffdshow audio/ac3filter method.
Having many DSP plugins, the ffdshow audio dsfilter seems to be a better option.

The 2ch (downmix) AAC decoding+encoding surely works in the foobar2k. Also I've noticed the HE+AAC 5.1ch play in the foobar is not stable(somewhat echoing : maybe the 8ch effect).

The foo_faac.dll(192,000 byte) is dated 5/16/2004.
(I could find nothing like foo_faad.dll)

Rockaria
5th August 2005, 15:28
I did some more test on the foobar2k AAC(Mp4) decoding(is said included in the standard input).
The channel order is messed up unlike other decoder(ac3filter or ffdshow audio plays correctly).
But I was not sure whether it decodes to 8ch or not, the mixer spcturum showed 6ch bars moving.
The transcoding failed as I said before.(I suspect 8ch)

When I used the nero decoder(added ';aac;mp4' to the decoder extention), the channel order messed up differntly, but finished the encoding(I suspect 6ch).
I guess the nero decoder output can be used for transcoding if we can arrange the channel order anyhow.

tebasuna51
5th August 2005, 19:48
You downmixed and lost all discrete channel infos.
But the question was AAC 5.1 -> AC3 5.1
So there's no downmix.

If you decode AAC 5.1 with Foobar2000 0.8.3 to multichannel WAV you'll end up with a 8ch WAV. That's the problem.
One more time.
"I try with this Track2.aac and make a correct 6 channel wav (L,R,C,LFE,SL,SR - 44.1 KHz - 24m 20.21s). "
End point.

I make, also, a 6 channel wav with Faad and other with GraphEdit-ffdshow. This two 6 channel wav are identical 100% (same decoder).

When compare wav6_foobar with wav6_ffdshow aren't identical but with inaudible differences. The most notables are:
a 50 ms. 22.05 KHz -27 dB
a 50 ms. 22.05 KHz -76 dB
the rest are under -90 dB

Then my question is: When fail the foo_aac_decoder?
All my samples in aac 5.1 are well decoded with Foobar.

I opened the first one with the foobar2k and tried the 5.1ch he+aac encoding resulting in a turn off to the desktop.
I'm interested in Foobar aac decoder.

As for the 'WAVE_FORMAT_EXTENSIBLE' format with the softEncode, the raw format read will do the trick if you don't care about the static noise in the beginning.
Or you can possibly read it as raw format with the first some blocks cut-off(manually).
If you change, with WinHex, the field wav header AudioFormat 0xFFFE ('WAVE_FORMAT_EXTENSIBLE', at Offset 0x20) with the SubType (Offset 0x44) 0x001 (Integer PCM) or 0x003 (Float 32bit) the resulting wav file can be opened for SoftEncode without raw or noise (the header misunderstand) problems.

Rockaria
5th August 2005, 21:42
I'm interested in Foobar aac decoder..
I admire your cutting & editing ability.
What is wrong with my method aac-encoding -> aac-decoding+aac-encoding to check the foobar aac-decoding for the transcoding?

Here the problem is: old soft (SoftEncode, ...) can't open WAVE_FORMAT_EXTENSIBLE.
I also admire your fresh memory. I just told you a clear method(in my memory).
Then what was your problem exactly?

Then my question is: When fail the foo_aac_decoder?
Again, foobar aac decoder has no problem in decoding(playing) except the channel mess-up. When the decoder is used with the transcoding together(to any format), it errored out showing the debug screen, I suspect it is because of the extra two channels, as is said.

dog-god
5th August 2005, 22:19
i havent gone away - been reading what my betters have been posting here with interest
magicclue that graphedit tutorial is nice but there is one prob
it dosent ouput 48k sample rate only what has been input
gspot reports 44000Hz CBR 448 kb/s total (5 chnls)
and dvd mastero refuses to take the file as the sample rate is wrong

one last this is about the channel mapping - when i do it all the voice is coming from my left front speaker ?
when i leave changing the channel mapping - it seems move like what i should have

when someone encodes to acc is it possibel to leave the channel mapping the same as ac3, could that have been done here

Rockaria
5th August 2005, 23:24
OK, my first contribution to dog-god, the original poster.
The ffdshow audio ds filter has many DSPs to use for the ac3 encoding.
Among them, the resample option can be used to make the 48K ac3 output.
I set the 'resample' in the 'Audio Settings' is cheked set as 'resample to 48000' 'when the source is lower than 48000'.

magicclue
6th August 2005, 00:20
"ffdshow" dosent ouput 48k sample rate only what has been input
gspot reports 44000Hz CBR 448 kb/s total (5 chnls)
one last this is about the channel mapping - when i do it all the voice is coming from my left front speaker ?
when i leave changing the channel mapping - it seems move like what i should have


as Rockaria said, FFDSHOW outputs what you tell it to output. Just activate the SSRC resampler.
For the channel mapping-> First you told you have 5.1 (<-that are 6 channels!) Now you say, you've got 5 channels.
So one must have been omitted.
Well I'm not sure which one. You have to find out and correct the channel mapping.
Mine is correct for 5.1 channels.

PS: and channel order for aac, ac3 is different else you would not have to remap.

dog-god
6th August 2005, 03:03
forgive my lack of knowledge - i though video encoding was hard till i came across this audio
gspot says 5 channel audio for dvds i know that have 5.1
media info says the file is 5.1
found the sampler so the 48k is sorted

think i may be going a little deaf in my left ear
but to me dialog channel is the left front still
just to test visually - i opened the ac3 file in media player classic and had ac3 filter set to decode to speakers - looking at the bars for each of the channels u can see all dialog audio is set in front left speaker rather than center

if u get a chance to have a look id appreciate it,

ps.what is the filter to play this acc file,
the reason i ask is that when i play if in media player classic using the coreacc filter and then into ac3 filter ,ac3 filter shows only 2 channel input

and with that - its 3 am - im off to bed

Rockaria
6th August 2005, 05:07
ps.what is the filter to play this acc file,
the reason i ask is that when i play if in media player classic using the coreacc filter and then into ac3 filter ,ac3 filter shows only 2 channel input
you are probably having the core aac decoder filter 'down mix to stereo' option checked(default). I downloaded & played the track2.aac. everything sounded normal. so I now change the 'probably' to 'certainly'.
The best(in my opinion) filter to 'decode-resample-ac3_encode' in a WYHWYG manner is ffdshow audio dsfilter which you can find easily in many codec packs or web site downloads.

found the sampler so the 48k is sorted if it is the external program, you will have to prepare a 6ch wav to resample.
The ffdshow audio dsfilter mentioned above includes the resample DSP routine inside. just enable it by checking & setting the options as I said before. the rest is described in the magicclue's guide.

dog-god
6th August 2005, 13:07
"core aac decoder filter 'down mix to stereo' option checked(default)"
magicclue u were right there - unticked that and got 5.1 input

i have the 48k resample sorted in fddshow
magicclue thanks again


however channel mapping is wrong

im assuming mp4 is the same channel mapping as aac
i downloaded a 6 channel mp4 speaker test
when i do the channel remap in fddshow filter the output ac3 channels are wrong -
when i do everything else bar remapping they are in the right order

i tested the order both by listening and if i play in media player classic with ac3 filter as a preferred filter - when file is playing go to -play - filters - ac3 filter
look at the visual levels while listening and u will see what i mean

test files are here plus the mp4 - around 4 mbs in size

note u will have to test on a 5.1 audio system


http://rapidshare.de/files/3707852/test_remapping.rar.html

tebasuna51
6th August 2005, 13:38
@magicclue
I report two differences with your method aac -> ac3 with ffdshow:

1) In GraphEdit I can't connect directly any aac file with ffdshow audio decoder. With Connect Intelligent disabled send me a error, enabled insert a aac_parser: AAC_parser from http://www.rarewares.org/aac.html or nero_aac_parser.

2) I don't need to remap any channel. With channelmapping disabled I make a correct ac3.

@Rockaria
Sorry if I offended you in my previous post. Because my bad english I can wrote short phrases that can be misunderstand. Is not in my mind offend anybody.

My problem is only recommend the best method to transcode aac -> ac3.
GraphEdit-ffdshow is a good choice but if there are problems (different directshow filters activated, alpha versions ...), my second choice is decode the aac with Foobar to a 6 channel wav, and I want know when fail it (I never see a 8 channel wav generated decoding aac).

@dog-god
I downloaded your Track2.aac and I ensure you is a correct aac 5.1 44.1 KHz and I don't have any problem to decode to a wav6chan (Foobar, AacDECdrop, Faad, ffdshow) or to transcode directly to ac3 (ffdshow, resampling to 48 KHz, without remaping channels).

Your method:
"just to test visually - i opened the ac3 file in media player classic and had ac3 filter set to decode to speakers - looking at the bars for each of the channels u can see all dialog audio is set in front left speaker rather than center"
is good, just remember that the visual bars are activated before the sound of the speaker.

Good luck.

Rockaria
6th August 2005, 13:40
it's great magicclue to hear that you sorted out everything for the need.
but it's somewhat odd the channel is messed up with the ffdshow audio dsfilter. it sounded correct to me before, will check it sooner or later.

No problem tebasuna51, it looks like an example which can happen in global remote communication. ;)

dog-god
6th August 2005, 17:14
well since we all seem to be agreed that the fddshow and graphedit is a fast way to transcode to ac3
this channel mapping is where the prob is occuring
going by the test sounds - u dont need to remap the channels -
so there is something else going on
either fddshow is remapping as its decoding or encoding
or ?

like i said earlier this is my first venture into audio that i had to find out stuff rather than have an app do it automatically


o

dog-god
6th August 2005, 20:57
On a final note as testing is everything
i have a standalone divx player with optical out that is connected to a sony dav home cinema system
i burn the test files not remapped -remapped and a 6 channel ac3 test tone track i downloaded
2 files -not remapped and the 1 i downloaded played perfectly
the one i remapped as discussed earlier had the speakers in the wrong order

my thanks to all who gave their time in the quest for 5.1 aac to 5.1 ac3

SeeMoreDigital
6th August 2005, 21:43
You guys might find it a lot easier to "map" the results of your "AC3-to-AAC-to-AC3 tests" if you use the "6 Channel (5.1 Surround Sound) Files" that can be found here: -

http://www.seemoredigital.net/51_Test_Encodes/51_AV_Setup_Test_Files.html


Cheers

magicclue
7th August 2005, 10:58
you're right.
No channel remapping needed for your examples- sorry.

SeeMoreDigital
7th August 2005, 12:21
you're right.
No channel remapping needed for your examples- sorry.What I mean is...

Because my samples "announce" the speaker being used in the correct order, you could say, use my 6Ch AAC file as a source, when attempting to convert 6Ch AAC to 6Ch AC3.

For instance, a couple of days ago I wanted to create some multi-channel Vorbis streams to test with my Pioneer DV-575A player.

So using my 6Ch AC3 "speaker mapping" test file as a source, I was able to determine that HeadAC3he (v0.24 a13) could generate correctly mapped Vorbis encodes but Foobar 2000 (v0.8.3) could not :eek:


Cheers

robertcollier4
16th November 2012, 17:18
Use the following command with eac3to:
eac3to.exe E:\Sourcefile.ac3 E:\Outfile.wav -down2 -mixlfe

http://forum.doom9.org/showthread.php?p=1600934#post1600934

robertcollier4
16th November 2012, 17:20
http://beginwithsoftware.com/videoguides/avi-ac3-extract-mp3-convert.html