PDA

View Full Version : trouble killing and replacing audio


trolltuning
26th June 2004, 12:28
I've tried this a couple of ways but I can't find the error.
Problem:"Invalid arguments to function killAudio"
If I just start with the audio from the wave I get an error on AudioDub.
# File: D:\aaaCharles\redo\5posnewaudio.avs (unsplitted)
#==============================================================
# AVISynth-Script to generate Stream: [DVD (NTSC 720x480)]
# created from [AviScript] at: 26.06.2004, 06:01
#==============================================================

# 01___________________________________________________________
# Variables generated by AviScript
video = "D:\aaaCharles\mpg\5pos2.avs"
audio=""

killaudio("D:\aaaCharles\mpg\5pos2.avs")
audio = "D:\aaaCharles\redo\5th pos.wav"
AudioDub(video, audio)
masktop = 0
maskbuttom = 0
maskleft = 6
maskright = 240
smoothStrength = 4
smoothRadius = 3
#End01

# 02___________________________________________________________
# Load AviSynth PlugIns
# DLL - for mpeg2source, SmartDeInterlace and TemporalSmoother
LoadPlugIn("C:\Program Files\AviScript 2.8 (Fullversion)\PlugIns\mpeg2dec.dll")
#End02

# 03___________________________________________________________
# Load Video & Audio
# read AVI videostream
AviSource(video)
# Set userdefined YUY2 - Colorspace
ConvertToYUY2()
#Import(

# 06___________________________________________________________
# Filtering
# deinterlace with duplicate
Bob.SelectOdd()
# denoise
ConvertToYUY2().TemporalSmoother(smoothStrength, smoothRadius)
#End06

# 07___________________________________________________________
# Resize [DVD (NTSC 720x480)]
bicubicresize(720,480)
#End07

# 09___________________________________________________________
# Userdefined - Options
ResampleAudio(44100)
#End09

#EndAll

stephanV
26th June 2004, 12:44
killaudio isnt a variable... it should come after the avisource-command i think. i dont think you need it anyway

this will get more in your direction:

video = avisource("D:\aaaCharles\mpg\5pos2.avs")
audio = wavsource("D:\aaaCharles\redo\5th pos.wav")
AudioDub(video, audio)


you may figure out the rest of your script yourself. :)

Leak
26th June 2004, 13:18
Originally posted by stephanV
you may figure out the rest of your script yourself. :)

If he doesn't want the audio of his videosource anyway it might be a good idea doing it this way:

video = avisource("D:\aaaCharles\mpg\5pos2.avs",audio=false)

so it won't even get decoded.

np: Underworld - Cups (Beaucoup Fish)

trolltuning
26th June 2004, 13:19
Wow I didn't expect an instant answer-it was before 7am our time. Thank you. I thought I had tried that but when I pasted yours in it worked.