Log in

View Full Version : need help with using avisynth for playback


saint-francis
17th December 2007, 04:03
When I try this script I get errors in involving anything below the video source:

video = DGDecode_mpeg2source("G:\my movie",info=3)
ColorMatrix(hints=true)
crop( 0, 58, 0, -64)
Spline36Resize(720,304)
Undot ()
audio = DirectShowSource("G:\my movie.mp4", audio=true)
AudioDub(video, audio)

I tried making a script for just the video and importing it and using that as the video source and then I get errors involving audiodub. But if I don't filter the video at all it plays fine, albeit unfiltered.
Here's an example:

video = DGDecode_mpeg2source("G:\my movie",info=3)
audio = DirectShowSource("G:\my movie.mp4")
AudioDub(video, audio)

Can someone please explain to me how to correctly use audiodub? Or is there a better way to accomplish what I'm trying to do?

Guest
17th December 2007, 05:23
Try this:

DGDecode_mpeg2source("G:\my movie",info=3)
ColorMatrix(hints=true)
crop( 0, 58, 0, -64)
Spline36Resize(720,304)
video=Undot()
audio = DirectShowSource("G:\my movie.mp4", audio=true)
AudioDub(video, audio)

Study the Avisynth syntax, especially the implicit variable 'last'.

saint-francis
17th December 2007, 06:05
Thanks Neuron2. It worked like a charm. I have found the section of the avisynth wiki explaining block statements and am studying it.

saint-francis
30th March 2008, 02:36
New issue along the same line.
Why isn't this script working? It works fine in AVSP but MPC doesn't want to deal with the audio.

DGDecode_mpeg2source("D:\FLETCH\VIDEO_TS\VTS_01_1.d2v",info=3)
ColorMatrix(hints=true)
crop( 0, 8, 0, -12)
LanczosResize(720,400)
video=Undot ()
Audio=DirectShowSource("D:\FLETCH\VIDEO_TS\main.mp4",audio=true)
AudioDub(video,audio)