Log in

View Full Version : DTS -> AAC for headphones 5.1 "souround"???


sjchmura
2nd March 2006, 20:51
Is there a way to encode a AC3 or DTS track (like a concert) that is in 5.1 with "psuedo" HFRT so the headphones "sound" like 5.1???

Sirber
2nd March 2006, 22:10
Does it have anything to do with "MPEG-4 Encoder GUIs"? :sly:

Rockaria
6th March 2006, 17:41
Is there a way to encode a AC3 or DTS track (like a concert) that is in 5.1 with "psuedo" HFRT so the headphones "sound" like 5.1???Recent FFDShow versions have the HRTF mixer DSP.
Use the graphedit or the avisynth environment to transcode through the FFDShow dsfilter.
http://forum.doom9.org/showpost.php?p=792939&postcount=85
http://forum.doom9.org/showpost.php?p=787789&postcount=149

SeeMoreDigital
6th March 2006, 18:39
Hi sjchmura,

Did you mean to mention "AAC" in your thread title?


Cheers

Rockaria
6th March 2006, 18:56
DTS -> AAC for headphones 5.1 "souround"???
It has indeed nothing to do with the MPEG-4 Encoder GUIs, thus moved in from the other section.
I understood he made his point very clear that he wants to transcode 6ch sources to aac 2ch containing the HRTF signal for his headphone use to feel 5.1ch effect??

I wonder what your point is SeeMoreDigital?

SeeMoreDigital
6th March 2006, 19:19
I wonder what your point is SeeMoreDigital?I was under the impression that HRTF (Head Related Transfer Function) is not specific to an AAC audio signal!

Surely it can be applied to any audio signal, can't it. So why transcode to AAC?

Rockaria
6th March 2006, 19:39
Surely it can be applied to any audio signal, can't it. So why transcode to AAC?
That's true. The HRTF is said designed to reduce(by adding the natural spatial feeling) the discomfort after long use of the headphone in normal mode(regardless of the channels).
The mode actually has some spatial feeling which I believe can be enhanced by 5.1 sources.

The portable formats would be mp3>wma>ogg/aac... and the player devices would be mostly portable players which asks 2ch clips.
Of course, in pc environment(with a headphone), we can just use the ffdshow's HRTF mixer dsp dynamically.

http://en.wikipedia.org/wiki/HRTF
[edit] clarification, added a reference.

specise_8472
6th March 2006, 20:02
What you are after is called BINAURAL processing.
A google search will point you in the right direction.

Rockaria
6th March 2006, 20:11
A google search will point you in the right direction.http://en.wikipedia.org/wiki/Binaural_recording
A typical binaural recording unit has two high-fidelity microphones mounted in a dummy head, inset in ear-shaped molds to fully capture all of the audio frequency adjustments (known as head-related transfer functions (HRTFs) in the psychoacoustic research community) that happen naturally as sound wraps around the human head and is "shaped" by the form of the outer and inner ear. The Neumann KU-81, and KU-100 are the most commonly used binaural packages. The KEMAR system is another alternative.

sjchmura
6th March 2006, 20:49
SOrry for the wrong section - but I thought since this was AAC/MP4 section and I am NOT programming savy if there was GUI way to do this.

The graphedit way - so do I setup a custom command line and PROCESS through MeGUI or StatRX?????

I ahve the U2 Live Chicaog concert ( I was actually there) and would LOVe to get the deep 5.1 soudn to 2 channel AAC in some simple GUI way

Sorry again

Steve

scharfis_brain
6th March 2006, 21:33
but unfortunately the HRTFs cannot reproduce the feeling of binaural recordings (in German it is called "Kunstkopf-Stereo").

Rockaria
6th March 2006, 21:50
but unfortunately the HRTFs cannot reproduce the feeling of binaural recordings (in German it is called "Kunstkopf-Stereo").
But do you remember that he asked the HRTF not the binaural recordings?
Also do you have any suggestions for the binaural recordings implementation? Any practical right directions will be appreciated here.

@sjchmura, you are in the right 'Audio Encoding' section now, as crowded as it can be.

Actually the Avisynth environment is the easiest & most flexible one if you are familiar with dos shell.
The MeGui is the gui implemention of it and actually need the same simple avs script to define the processes(no coding here now!).
<i.e. HRTF.avs>

#NicDTSSource("1.dts")
NicAC3Source("D:\My Music\6ch.ac3")

LoadPlugin("ffavisynth.dll")
ffdshowAudio(preset="avsHRTF")
Besides the above simple script, you need the working ffavisynth.dll, aac encoder, and avsynth environment described in the first page, which would be similar to MeGui's avisynth requirements.(also the 'avsHRTF' profile must be defined in the ffdshow with the HRTF mixer option is enabled.) http://forum.doom9.org/showthread.php?t=103069

The graphedit method will be very similar to this example : http://forum.doom9.org/showpost.php?p=666230&postcount=58
A dts or ac3 needs to be dropped instead. Also you need to find an aac encoder dsfilter if any. If not you will have to use a temporary file. FFDShow can capture to AC3 and WAV formats. You may find some more encoder dsfilters in free-codecs.com.

Try both methods from the easier one. Anyway, the Avisynth's DirectShowSource() can also read from the dsfilters or grf graphedit files.
Both are very flexible and worth to be familiar with.

sjchmura
6th March 2006, 22:23
THanks :) I should have done Audio :) I never thought of doing this but to be honest why don't we all do this for our DVD rips, HDTV conversion etc?

sjchmura
6th March 2006, 22:27
Rockaria, thanks!!!!

BUt I thought AVISynth had NO DTS filer - just AC3 - that is why Megui "script creator" only works with AC3 - correct? If so which AVIsyny 2.55 plugin should I use?

Anny suggstions on the HFRT settings for headphones? Do I measure my head :)

Steve

scharfis_brain
6th March 2006, 22:30
@sjchmura: if you want to convert DTS sources with AVISynth, you may use directshowsource("source.dts") with AC3Filter set as preferred decoder.

@rockaria: it was just meant to be a comment on HRTFs. For sure they are an improvement over plain stereo on headphones. Also I don't have an idea how to implement binaural codings...

Rockaria
6th March 2006, 22:46
@sjchmura: if you want to convert DTS sources with AVISynth, you may use directshowsource("source.dts") with AC3Filter set as preferred decoder.
This is good, it has practical suggestions.;)

But I already included
#NicDTSSource("1.dts") for the dts decoding.(# is for remarks)
The directshowsource() method requires the accurate dsfilter merit control when there are more than one candidates to perform the same functions, not recommended for normal uses.

@sjchmura, I believe you need to get down to it and take your time.
The linked page & here contains all the related informations and links to the related files you need.(get the latest versions)

There has been this efforts since some while ago, but recently reintroduced and is being implemented in MeGui also.
It's very flexible and powerful...

sjchmura
7th March 2006, 06:29
THanks Rock!!!

I will get it down well - and post my results :)

Thanks again.

Steve

3dsnar
9th March 2006, 18:47
I know how to implement the HRTF based filtering.
In fact, I have implemented something like this in Matlab,
and was planing to produce a converter from 5.1 to stereo
with HRTF-based downmix.
But the results were dissapointing and I found it not very practical.
I.e. I exptected good results, but honestly they were far
below my expectations.
Please check this out, and you will see how strongly the result depends on the head and shoulders shape:
http://recherche.ircam.fr/equipes/salles/listen/sounds.html

3dsnar
9th March 2006, 18:57
Just to mention.
AAC may not very good for storing the HRTF stereo downmix,
because upper subband does not contain exact phase properties of the encoded sounds, while the phase characteristics is of importance in the filtering.

Rockaria
9th March 2006, 22:31
Why the supposedly front sounds are playing behind..;)

What was your impression with the FFDSHow's generic HRTF approach?
Dolby headphone & virtual speaker technology also provide some surround media flash samples on their site.

The HRTF stream, directed to any 2ch headphone, is not reconstructed anywhere, unlike DPL II.
So I believe there is no possibility of the aac he's SBR band area being broken(or mixed reconstructed).

Rockaria
10th March 2006, 06:56
The HRTF stream, directed to any 2ch headphone, is not reconstructed anywhere, unlike DPL II.
So I believe there is no possibility of the aac he's SBR band area being broken(or mixed reconstructed).
OK. my second thought is the human ears perception organ is working as the HRTF signal decoder(very subjective).
So there is a strong possibility, the (upper) SBR band area is mixed reconstructed(phase info broken when decoding to PCM 2ch), like DPL II & 3dsnar's reasoning.
Thus the recommended bit rate of aac HE 48k ~96k 2ch, from over 64k the aac decoding is considered affected minimal by the SBR band area artifical reconstruction.

http://forum.doom9.org/showpost.php?p=788534&postcount=84

BTW,AFAIK, his iPOD AAC has no HE(SBR) encoding mode...

3dsnar
10th March 2006, 07:27
Hmm, my experiance is the following:
The darn (HRTF) stereo-surround sounds were located
in front of my eyes, but just strangly modulated :confused:
When I was trying myself to convince that the noise is
moving around my head, I was getting a sort of this surround feeling (not sure). But this is NOT what I've exptected...
---------------------------
The SBR band area is sure reconstructed...
In your brain.
So you can imagine your brain working like a DPLII decoder :p

Rockaria
10th March 2006, 09:16
Which sound sources were you using, 2h or 6ch, for the FFDSHow HRTF mixer?

The 6ch showed a lot better spatial feeling to me, beside that I felt :
. It is pushing the sound (ch) origins out of the brain, far way, thus causing less listener fatigue .
. Somewhat less bass, emphasized high freq (because of the wider origin spots?)
. Wider volume range (because of the quite listening environment?)
. not centered to front(of eyes) to me, I feel myself in the center of the room (with my Kinyo 5.1ch).

True, it's a bit fooling the perception organ(sorta illusion), but we are living with the imperfect decoders, and I feel some more comfort with it than with normal stereo downmix mode.

3dsnar
10th March 2006, 10:01
No, I did not use FFDshow. I have tested
the sounds from the internet, plus my own
tests (using HRIR) i Matlab.

How to use the HRTF in FFDshow?

(is there something like that? Or maybe you mean
the DPLII decoder?)

3dsnar
10th March 2006, 10:22
OK, I've got it!
Hmm, even worst than the selected HRIR that I used in Matlab.
Although somewhat better with ear-insterted type of headphones,
than a big can headphones (which is exptected).

Rockaria
10th March 2006, 10:27
Well, now I feel it's even clearer than 5.1ch mode with my Kinyo....;)

3dsnar
10th March 2006, 10:33
I do not like the frequency characteristics distortions.
I guess it does not match my head related characteristics,
therefore I perceive it as distortions, and not as the sound
coming from behind (or front or center).
Although the rear channels seem to be more spread in stereo panorama.
So maybe instead of using HRTF it would be better to move the fronts a bit to center, and spread the surrounds to maximum.
This will not cause the frequency responce distortions.
This is worthless anyway :(

Rockaria
10th March 2006, 10:39
I do not like the frequency characteristics distortions.
I guess it does not match my head related characteristics,
..This is worthless anyway :(Sure it's very much subjective. And your conclusion only applies to you.

sjchmura
15th March 2006, 00:06
Rockaria -
How did you get the HFRT to work in AAC? Did you construct a custom graph wwith FFDShow?

The advantage I see of this method (been reading) is we SHOULD be able to set the equalizer to INCRESE teh 0.1 (subwoofer) encoding to give more "boom" that is lost wtih HFRT

Rockaria
15th March 2006, 01:45
The graphedit is not necessary unless you want to access the ffdshow directly and capture the HRTF processed stream to a wav file.
The 'ffavisynth.dll' is an avisynth plugin which is made to use and control the FFDShow DSPs within the avs script.

As is explained in this post : http://forum.doom9.org/showpost.php?p=795485&postcount=12

#NicDTSSource("1.dts")
NicAC3Source("D:\My Music\6ch.ac3")

LoadPlugin("ffavisynth.dll")
ffdshowAudio(preset="avsHRTF")

Firstly define the 'avsHRTF' profile(with the HRTF mixer dsp enabled) and compose an avs script like above named like FFDHRTF.avs
Preview this avs script with MPC or any DSF enabled player. If it sounds as intended, then you are ready to encode the stream to AAC.

<profiles.cmd> or any command script file.

..
rem avs2wav.exe FFDHRTF.avs - | naac.exe -profile lc -vbr 5 -quality high - "D:\My AAC\HRTF.m4a"
bepipe.exe --script "import(^FFDHRTF.avs^)" | enc_aacPlus.exe - "D:\My AAC\HRTF.aac" --cbr 80000
..

I adjusted the command script from this link : http://forum.doom9.org/showpost.php?p=787789&postcount=149
There are two utilities which can route the stream from avs script to stdout for the aac encoders to read the streams from stdin : avs2wav.exe and bepipe.exe
Also you can use any of the above two mentioned AAC cli encoders. The generated *.aac can be muxed to mp4 container using foobar2k, mp4box,... or even by specifyng the mux option in the enc_aacPlus.exe directly.

Some additional comments :
. you can capture the HRTF processed stream to a wav file in the graphedit. Also the avs2wav can save the avs stream to a wav file.
. The captured wav file will contain the HRTF signal, thus can be played to verify and encoded to SOME efficient formats(codecs) using your preferred encoders.
. If you want the AAC vbr under 64kbps, I suggest you to use the LC encoding( -profile lc -vbr 4 with naac.exe or --lc --cbr 56000 with enc_aacPlus.exe).

Search the mentioned links or this forum to find the utils required...but feel free to share any issues encountered.