PDA

View Full Version : Trim audio


koszopal
21st January 2004, 13:43
hi
ive got movie let's say for example it has 1000 frames
and i got wrong (unsynch.) audio.
i wanna to corret audio in 0-100 frames by 2sec.
and on 100-500 by 3sec , and 500-999 by 4
could i do this in Avisynth ?
koszopal

clima
21st January 2004, 14:05
I don't know how to do it in Avisynth (never tried to be honest), but it can be done with vdub(mod) or besplit.

sh0dan
21st January 2004, 14:17
DelayAudio(), or AssumeSampleRate()+Resample(44100) might help you.

koszopal
23rd January 2004, 08:07
@sh0dan
it should be like that ? i dont know where to put AssumeSampleRate()and Resample(44100).Sound in this avi its VBR mp3 ~~128kbps but i ve got orginal wave too :D
koszopal
#### start script
LoadPlugin("mpeg2dec3.dll") #mpeg2source
clip =AVISource("myfile.avi", True, "YUY2")
# correct by 2 sec
movie = clip.Trim(0,100).DelayAudio(2)
# next part by 3 sec
movie = movie+clip.Trim(101,500).DelayAudio(3)
# and last by 4 sec
movie = movie+clip.Trim(501,999).DelayAudio(4)
return movie
### end script