Log in

View Full Version : How to keep 6 channel audio and set automatic delayaudio info?


tomos
1st April 2006, 02:10
it seems from my uses that directshowsource seems better than ac3source. problem is both are downsampled to 2 channels. i've searched here, googled and checked the avisynth online manual but cant find much on how to keep the 6 channels. the only thing i've seen is the following here but i cant seem to make it work.

v = Mpeg2Source("video.d2v")
aud = ("audio.ac3")

a=rightstr(aud,3)
b=rightstr(aud,10)
c=leftstr(b,4)
d=value(c)
e=d/1000
a=="ac3" ?audiodub(last,nicac3source(aud,2)).delayaudio(e):NOP
a=="mpa" ?audiodub(last,nicmpasource(aud)).delayaudio(e):NOP

i am guessing this is linked to what i want to do but cant understand how it works.

can someone please help?

also, right now my scripts kinda go like this:

v = Mpeg2Source("video.d2v")
a = DirectShowSource("audio .... delay -493ms.ac3")
AudioDub(v,a)
DelayAudio(-0.493)

this is something that i also cant find how to do - fill in the delayaudio info automatically. it seems the first quote i made holds the answer but it just wont work. i get the err:

Avisynth open failure:
Script error: Invalid arguments to function "audiodub"


this is for the a=="ac3" ?audiodub(last,nicac3source(aud,2)).delayaudio(e):NOP line.

i am having no luck getting either of the above (6 channel audio, or getting the delay set) to work :( . please help :)

:cool:

IanB
1st April 2006, 05:04
The invalid argument to AudioDub is probably "Last", it has to be a Video Clip and it will be null in your example. You probable want to use "v" instead.

In your nicac3source(aud, 2) the 2 is the downmix, leave it out or set it to 6. RTFM for more info.

I am currently working on getting 6 channel audio to work in 2.5.7alpha with fccHandler's acm AC3 codec. When a working version is released you should be able to use WavSource() as an alternative.

tomos
1st April 2006, 11:30
ah cool. am at work at the mo but will try this when i get home.

looking forward to the update :D

just makes things a lot easier to have the audio in the stream along with the vid :)

tomos
1st April 2006, 13:29
just tried it now (god bless logmein) and it works :thanks:

have 6 channel audio and seems fine. cant test the audio delay option of course but hopefully will work too :)

thanks again