Log in

View Full Version : ConvertToMono do not work with wavsource?


quakerman
30th November 2003, 03:23
it's the script:


audio1=ConvertToMono(wavsource("j:\1.wav"))
return audio1

but is do not work,it only return a silent with some noise.


why?

sh0dan
30th November 2003, 22:25
What format is the WAV-file? (bits per sample / number of channels)

I assume you use AviSynth 2.53?

Try:
wavsource("j:\1.wav")
ConvertAudioToFloat()
audio1=ConvertToMono()
return audio1

quakerman
2nd December 2003, 13:46
it's a five channel 48khz wav file.
It's still work well with your script.It have sound now,but the sound's speed is slow.:(

sh0dan
2nd December 2003, 16:16
ok - found and fixed!

It'll be available in the next CVS update!

Thanks for the report!

Meanwhile you should be able to use:

wavsource("j:\1.wav")
a1 = mixaudio(audio.getchannel(1), audio.getchannel(2)) # 50/50
a2 = mixaudio(audio.getchannel(3), audio.getchannel(4)) # 50/50
a3 = mixaudio(a1, a2) # 25/25/25/25

a_final = mixaudio(a3, audio.getchannel(5),0.8,0.2) # 20/20/20/20/20

return a_final

Clumsy, but should work ATM. ;)