PDA

View Full Version : trim() for audio with AviSynth?


Ravenlord
17th December 2007, 20:07
Hi,

I wanted to know if it is possible to cut the audio in an AviSynth file.
Example:
I recorded - let's say - one hour. At the end, there is the part i want to have in a single video. So i use trim() for it. But the audio is one hour long..

My script:

LoadPlugin("C:\Programme\AviSynth 2.5\plugins\DGDecode.dll")
v = mpeg2source("falco.d2v")
a = directshowsource("falco T01 DELAY 56ms.mpa")
audiodub(v,a)
dgbob(1)
bicubicresize(320,240,0,0)
crop(8,2,300,236)
trim(290,0)

stickboy
18th December 2007, 05:18
You can cut audio by creating an appropriately-sized clip with BlankClip, using AudioDub to combine it with your audio, and then calling Trim on that.

IanB
18th December 2007, 13:22
I recently posted a prototype Function ATrim() that (hopefully) will deal with most cases of wanting to Trim the audio track. Somewhere down the track I will probably add this functionality (or something very similar) to the core.