View Full Version : Realtime AC-3 encoder?
Haaan
24th February 2004, 18:31
Originally posted by KpeX
@Haaan
An idea for future versions: What about an option to resample (preferably using SSRC) to 48Khz for sound cards that only allow 48Khz output over S/PDIF. This could be useful especially since the Nero AAC encoder likes 44.1 khz or lower sampling rate for most input.
Where can I get information on SSRC api ? Is it not juste for 48Khz -> 44.1Khz
KpeX
24th February 2004, 18:41
Actually, SSRC can be used for almost any resampling source and destination. Regarding the API I don't have much information on the subject. Here (http://shibatch.sourceforge.net) is the homepage, DSPguru uses the SSRC dll in BeSweet, he might have more information on the subject. Also there is a Winamp plugin based on SSRC (http://members.lycos.co.uk/bhafool1/rarities/out_wave_ssrc.cab) with included source that may be helpful. Unfortunately I don't have enough programming knowledge to give you any more SSRC information.
Edit: VirtualVCR (http://virtualvcr.sourceforge.net) has a directshow audio resampler included. Although I don't know what resampler it uses, the source (http://cvs.sourceforge.net/viewcvs.py/virtualvcr/2.6.9/AudioResample/) may be useful for DirectShow interface.
E-Male
24th February 2004, 19:29
first of all: i'm not stupid, i know that reencoding doesn't make quality better (sorry, but i had to say that)
i just compared ac3 and ogg
i'll look into he-aac
how's the channel order of that format?
E-Male
24th February 2004, 21:43
ok, made a short test with aac
sounds good
i'll go into more detailed tests later
SeeMoreDigital
25th February 2004, 19:28
Originally posted by E-Male
....i'll look into he-aac
how's the channel order of that format? AAC audio sounds very good, when compared to AC3.
However, if you decide to use Nero's AAC encoder in 'HE' mode, the maximum 'HE' setting is 96kbps. Anything above 96kbps will be encoded in 'LC' mode.
If anybody knows any different, please let me know!
Cheers
bond
25th February 2004, 19:59
aac has the following channel order:
C, L, R, SL, SR, LFE
vorbis:
L, C, R, SL, SR, LFE
Originally posted by SeeMoreDigital
However, if you decide to use Nero's AAC encoder in 'HE' mode, the maximum 'HE' setting is 96kbps. Anything above 96kbps will be encoded in 'LC' modefor stereo these bitrates are correct, for multichannel it can go up of course
Haaan
25th February 2004, 20:07
Originally posted by bond
aac has the following channel order:
C, L, R, SL, SR, LFE
vorbis:
L, C, R, SL, SR, LFE
for stereo these bitrates are correct, for multichannel it can go up of course
Actually OggDS seems to remap the channel order (in output) to the channel order defined in WAVEFORMATEXTENSIBLE : FL, FR, C, LFE, SL, SR.
Maybe the AAC DirectShow decoder does the same (I haven't tested)
KpeX
25th February 2004, 20:18
In my tests the default channel order in Dolby Out DS maps the channels correctly for Vorbis and AAC.
Haaan
25th February 2004, 20:40
So it means that thoses filters respect the MS-defined standard. And my channel mapping option is useless as the mapping is always the same.
SeeMoreDigital
25th February 2004, 20:43
Originally posted by bond
....for stereo these bitrates are correct, for multichannel it can go up of course Hmm that's strange!
Because if I feed a 6Ch .WAV or 6Ch .AC3 stream into foobar2000 (or a 6Ch .WAV into dbpowerAMP). And select Nero HE above 96kbps, it reverts to LC.
Both MP4UI and Nero's ShowTime Player confirm this!
I thought it was a little strange. Maybe it's because I only have a 'trial version' of Nero.
If this is the case, I'm surprised I'm able to use Nero's 6Ch encoder at all, because I can't when using Recode2.
Any confirmation would be much appreciated.
Cheers
bond
25th February 2004, 20:51
So it means that thoses filters respect the MS-defined standard. And my channel mapping option is useless as the mapping is always the same.as the dshow decoders output uncompressed audio, i assume that they all output the same channel order, tough i am not sure
Originally posted by SeeMoreDigital
Because if I feed a 6Ch .WAV or 6Ch .AC3 stream into foobar2000 (or a 6Ch .WAV into dbpowerAMP). And select Nero HE above 96kbps, it reverts to LC.yes of course, he-aac is also not usable for too high bitrates with multichannel, as it isnt usable above 96kbps for stereo
its ok to use normal lc-aac with too high bitrates
KpeX
25th February 2004, 20:57
@SMD the displayed bitrates are for stereo, I don't think Nero adjusts the bitrates based on the number of channels input. But if you use the VBR presets you should be able to get a 5.1 HE-AAC file well above 96 kb/s.
SeeMoreDigital
25th February 2004, 21:14
I've just tried again to encode a 6Ch .WAV using Nero's HE 'variable bitrate' Extreme-High and Transcoding-Ultra settings.
And it keeps reverting to LC....
...bummer!
bond
25th February 2004, 21:20
once again SMD, he-aac is only usable up to the streaming preset, for both stereo and 5.1
it doesnt make sense to use he-aac with high bitrates
SeeMoreDigital
25th February 2004, 21:27
Originally posted by bond
once again SMD, he-aac is only usable up to the streaming preset, for both stereo and 5.1
it doesnt make sense to use he-aac with high bitrates I thought this was indeed the case. But gave it another go on strength of what KpeX said!
Cheers
KpeX
25th February 2004, 21:29
My (communication) mistake, I meant that when using a low enough preset HE-AAC will be used.
SeeMoreDigital
25th February 2004, 21:37
Originally posted by KpeX
My (communication) mistake, I meant that when using a low enough preset HE-AAC will be used. Uuuwww! I thought I was loosing it -again.
Good to have a clarification, none the less.
Cheers you guys
E-Male
26th February 2004, 12:33
ogg vs aac – 5.1 audio quality test
(using the realtime ac3 encoder for spdif output))
source: the fast and the furiouse ce rc1 chapter3 english ac3 5.1
converted to:
a)AAC
using besweetgui 5.1/old, high quality, ltp, at multiple vbr presets, with and without pns
b)OGG
using besweetgui 5.1, nomal bitrate 192
then i took the ogg file and the 2 aac files that came closest in size/bitrate:
ogg, 192kbps: 192kbps 6.64MB
aac, internet :: medium, with pns: 204kbps 7.04MB
aac, tape :: lowest, without pns: 187kbps 6.47MB
result:
the aac with pns sounds horrible, you notice the compression all the time
the aac without pns with with lower bitrate sounded better, but still the compressio is audible
the ogg file sounds fine, the comprssion is not audible and the audio is detailed
conclusion:
ogg is my clear winner
ok, everyone now please give your thoughts
bond
26th February 2004, 17:05
e-male
1) interesting results, you are the first one with these ;)
2) at that low bitrate you should definitely encode with he-aac, its there for a reason
3) it would be nice if you could make a so called ABX test and post the results, cause only that way you can get scientifc results with subjective audio quality comparisons
SeeMoreDigital
26th February 2004, 17:26
Originally posted by bond
...at that low bitrate you should definitely encode with he-aac, its there for a reason... Agreed!
But sadly as you can only encode 6Ch AAC HE audio at 96kbps, it does not always sound that brilliant!
Well that's what I've found.
Shame really
bond
26th February 2004, 17:37
SMD,
KpeX already wrote that the 96kbps are only mentioned for stereo encodings, multichannel encodes will of course use higher bitrates even with he-aac
E-Male
26th February 2004, 17:46
well, if my results are that unlikely to be correct, i can only assume that i've done something wrong at the aac encoding
could someone tell me whats the best way to do it, maybe point me to a guide?
or could it be a decoding problem? or related with this filter i use for spdif output?
oh, and how do i do a ABX test, i mean i can't do much more than listen, can I?
thx in advance
SeeMoreDigital
26th February 2004, 17:48
Yep, but am I right in assuming that E-Male wants to generate 5.1 (6Ch) audio streams?
If this is the case, why did you bother mentioning AAC HE?
Cheers dude ;)
bond
26th February 2004, 17:55
Originally posted by E-Male
well, if my results are that unlikely to be correct, i can only assume that i've done something wrong at the aac encoding
could someone tell me whats the best way to do it, maybe point me to a guide?hm unpacking latest besweet+gui, copying the needed nero dlls in the besweet folder, loading the source ac3, ticking 5.1 (new) and show conflig dialog, pushing ac3 -> mp4, choosing he-aac and streaming preset, ok that should be it :D
or could it be a decoding problem? or related with this filter i use for spdif output?well it can be a decoding problem if you used he-aac and used the .aac file, cause than often the high efficiency part isnt decoded (ie with coreaac) which results in really bad quality
oh, and how do i do a ABX test, i mean i can't do much more than listen, can I?you can do much more than only listening ;)
for an ABX test you need
this utility (http://ff123.net/abchr/abchr.html), i think you will also find a guide on ff123's site on how to use it
maybe for the first time its hard to use it but if you want to get really reliable results (better than "i listened to two different movies, one using codec A and the other codec B, with my sister screaming in the background during i was on the train on my back way home"-results) there will not be a way around it :D
Yep, but am I right in assuming that E-Male wants to generate 5.1 (6Ch) audio streams?yes
If this is the case, why did you bother mentioning AAC HE?because multichannel is THE area where he-aac can show best what it is able to do ;)
E-Male
26th February 2004, 19:09
i used "5.1 old" (i think because new didn't work), i'll try with new again
i didn't see an option called "ha-aac"
so if the file is named .mp4 it should be decoded correctly?
i'll try this program, but it think a randomized playlist will do the job, if i don't look at the order and take notes while listening
bond
26th February 2004, 19:15
Originally posted by E-Male
i used "5.1 old" (i think because new didn't work), i'll try with new again5.1 old will result in the wrong channel order with new nero dlls
make sure you have the latest dlls for best quality and possible bugfixes
i didn't see an option called "ha-aacits in the nero config dialog, where you choose the encoding settings
so if the file is named .mp4 it should be decoded correctly?the output is .mp4 by default
old besweet guis outputted a bugged .aac file, make sure you use the latest gui version
Ana
26th February 2004, 19:54
The Nero aac encoder downsamples all files to 44.1 khz, but movie soundtracks are 48 khz. So when encode 5.1 ac3 to 5.1 aac nero makes it always 44.1, but with vorbis 48 khz is kept. This might be one reason why aac souns worse. Another problem with 44.1 is that atleast my soundcard doesn't pass it properly to amplifier (via s/pdif).
But you can make 48khz files with nero encoder using foobar. Guide: http://forum.doom9.org/showthread.php?s=&threadid=67746
bond
26th February 2004, 19:57
from what the nero developers said you do not hear a difference between 44.1 and 48khz anyways (well thats a reason why it is downsampled too)
SeeMoreDigital
26th February 2004, 20:37
After some more fiddling about with Nero AAC HE, I have finally managed to generate a 6Ch encode higher than the max 96kbps CBR setting.
As KpeX mentioned it had to be done using VBR, Nero's 'Streaming-Medium' setting to be precise. And I ended up with around 170kbps.
Anyway, if anyone is interested, I've posted a short 'Channel Mapping' sample here (http://82.2.167.24/Uploaded_Files/Doom9_Forum_files/6Ch AAC HE VBR (170kbps).zip).
Cheers
E-Male
26th February 2004, 21:45
maybe i missed dlls
exactly what files do i have to copy from nero to besweet?
bond
26th February 2004, 21:48
Aac.dll, aacenc32.dll, NeroIPP.dll
Anyway, if anyone is interested, I've posted a short 'Channel Mapping' sample here.:)
edit: funny, in matrixmixer the rear channels are always reported as sound being available in all channels! how that?
E-Male
26th February 2004, 21:52
{voice=teletubby}Oh Oh{/voice}:scared:
i think i only copied *aac*.*, so i missed one dll
i'll do another (better) test next week
SeeMoreDigital
26th February 2004, 22:31
Originally posted by bond
...funny, in matrixmixer the rear channels are always reported as sound being available in all channels! how that? I thought it might interest you!
I made it available for download because it's a good example to show that audio can be accurately steered to a given channel, even when keeping all the channels open.
It would have been quite confusing if the video element had not been included. :confused:
Cheers
ZeB
26th February 2004, 22:39
wooot, nice!
I requested something like this back in 2002 ( I'm getting old :/ ).
http://forum.doom9.org/showthread.php?s=&postid=82427#post82427
thx Haaan!!
E-Male
26th February 2004, 23:45
ok, got the he-option now
i'll encode the full movie (the fast and the furiouse, as above) overnight in he-aac and ogg
E-Male
1st March 2004, 16:22
ok, i'm back, after my raid crashed it took some time to get everything work again
i encoded a sample with he-aac (using besweet and nero dlls)
when playing the resulting file in graphedit using the ac3 encoder filter and spdif output the file played to fast and high pitched
i gues it's a samplerate problem, because the he-aac file is 44.1 (22.05?)
the questions is where what filter causes the problem
or is there something i did wrong??
EDIT: update
i muxed both ogg and he-acc with the xvid video into a matroska file
ogg playes fine in sync with 5.1
aac playes fine in sync in tcmp with matrix mixer
but when i play the mkv with aac in graphedit through spdif audio again is too fast and high pitch and so also not in sync with the video
and before someone asks: my amp can handle 44.1 ac3
i assume either the ace encoder filter can't detect/handle 44.1 properly or it doesn't get the information that the audio is 44.1
EDIT2:
i experimented with the stretch feature of matroska
no success
gircobain
2nd March 2004, 03:07
Make sure you are using latest BeSweet and Nero dll's.
I believe some old ones are known to be buggy when it comes to aac encoding.
E-Male
2nd March 2004, 09:59
newest besweet beta. newest besweet gui and dlls from newest nero
all put in a clean directory
i daubt that this is the root of evil
E-Male
3rd March 2004, 03:23
tested 2 6ch-waves, one 44.1 the other 48khz
and only the 48khz one played fine
the 44.1khz file played to fast (and high)
so i'm now quiet sure that DolbyOutDS can't handle 44.1khz input
so Haan maybe that something for you to look into
for me it's the only bug/missing feature i can name
E-Male
11th March 2004, 03:27
just managed to encode a 48khz mp4 with foobar2000 and nero
it works
will compare tomnorrow
fjarle
12th April 2004, 17:33
Ok. I don't know jack shit about the programming skills required to do what that DolbyOutDS does, so, I might be asking for a lot here..
Got my Audigy2 a year and a half back... without really looking into the pros and cons of the card. I've found that it'll produce nice quality sound, which is really what I wanted with it in the first place. But. Its drivers are a hellish landscape of one AC3 decoder filling in for the other just when you thought you'd finally managed to sort out SPDIF passthrough just right. After a while though, I managed to get SPDIF to work just great, even without the DolbyOutDS passthrough function. As for other digital surround formats I haven't had the need to test them yet, allthough I'm sure DolbyOutDS will come in handy when those needs arrive.
Still.. I've got four cables between my Audigy2 and Yamaha surround-receiver. 3 MonsterCables for analog output from the card, and one el-cheapo generic minijack->phono cable to get to the spdif-output.
So... what I'd like..
I'd like DolbyOutDS to be "wrapped around" all of my analog outputs... -or at least what will eventually be analog output- when it's on the card. As Audigy2 has no less than 3 spdifs (1 for f. l/r, 1 for l/r s. and one for uhm... front center and rear center. ) I'm guessing everything is PCM bitstream in there at one point or another.
Results being : I can remove my analog cables 100% and play for instance Max Payne2 with full EAX relayed via AC3/spdif to my receiver, and all other surround-sound-fooling-around on my computer will also be output as AC3.
Is this possible at all? As said, I don't know anything about how much work lies behind all of this, so... please don't shoot me :)
- By the way. Why would anything output surround by use of 3*spdif's? I'd need high end... urhm... that'd be WEIRD-end equipment to get one box to decode it all... wouldn't I?
- One more sidenote - There wouldn't happen to allready be a tool out there that'll make use of directshow filters and output all sound through your selection of filters? This'd the trick.... Now, if I could only find it...
Mitchjs
12th April 2004, 22:18
I cant get a graph built with DolbyOutDS
has anyone got it to work?
my example is a 6ch .wav file that i want to convert to ac3
i figured as a test
i could send the DolbyOutDS-xformout pin to a file...
but i cant connect anything to it, not even the audio renderer
help
thanks
mitch
Jeroi
13th May 2008, 20:19
Where this filter can be downloaded nowdays? Haans links do not work anymore. Is there any other solutions to encode realtime aac into ac3?
nautilus7
13th May 2008, 23:23
i don't about that, but nowdays everybody uses ac3filter for realtime ac3 encoding. You can get it separate or with ffdshow.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.