View Full Version : AVS Trim() doesn't trim sound


Buddabing
30th December 2004, 05:35
Hello,

I've got a very simple application. I want to take a series of png images and a wav and make an avi out of them.

So I've got a .avs file:
video1=ImageSource("image%05d.png", 0, 3245, 60.000000)
audio1=WavSource("sound.wav")
AudioDub(video1,audio1)
Trim(video1,509,0)

I am running the .avs file through VirtualDub.

Without the Trim(), everything works like I expect. The audio and video are synced. When the Trim() is put in, the video is trimmed like I expect, but the audio is not trimmed.

I can post the VirtualDub job file if requested.

What am I doing wrong?

Regards,
Buddabing

wolfsoft
30th December 2004, 05:47
Yes,you have only trimed the part of video.The statement of trim is wrong.

Last statements you should change as this:

together=AudioDub(video1,audio1)
Trim(together,509,0)

I have tested it. It worked very well.

Buddabing
30th December 2004, 06:01
Originally posted by wolfsoft
Yes,you have only trimed the part of video.The statement of trim is wrong.

Last statements you should change as this:

together=AudioDub(video1,audio1)
Trim(together,509,0)

I have tested it. It worked very well.

Hmmmmmm. I tried what you suggested, and it didn't work for me. Did you try it successfully with a sequence of images, or with an existing video as the source?

stickboy
30th December 2004, 06:20
Originally posted by Buddabing
Hmmmmmm. I tried what you suggested, and it didn't work for me. Did you try it successfully with a sequence of images, or with an existing video as the source?It shouldn't matter.

Post your entire, updated script.

Buddabing
30th December 2004, 14:16
FYI:

The problem was in my VDub script, not the .avs file. I had this line in my Vdub script:

VirtualDub.audio.SetSource("zookeep.wav");

This had the effect of overriding the audio from the avs file.

The syntax of the Trim() in the .avs file did not have to be changed.

The users on this board really go out of their way to send prompt, helpful replies. Thank you all.