Log in

View Full Version : Is this possible?


TurnX
19th January 2007, 23:43
Not sure if this is even possible, and I am relatively new when it comes to avisynth, so please be kind if this sounds stupid.

I was curious if it was possible with an avs script to open 2 clips in the same file, apply different filters to each of the clips without the filters being applied to the other clip, and when I encode this avs file the resulting encode be a combination of both clips.

Main reason im trying to do this is im having trouble merging 2 mp4 files (x264 video and AAC audio) together. Ive tried different methods which either result in having to re-encode the video (which im trying to avoid) or giving me some wierd output file that shows up in 2 windows.

thanks for any help

Guest
19th January 2007, 23:59
Please fix your thread title to comply with rule 9. Thank you.

Yes, it is possible:

vid1=avisource("vid1.avi").filter1().filter2()
vid2=avisource("vid2.avi").filter3().filter4()
return vid1++vid2

martino
20th January 2007, 00:51
Do you have to include "return" by the way, or would just "vid1++vid2" be enough?

Also, sorry for bumping in, but what if you wanted to apply the filters to a certain frame(s). Would this work:
vid = AviSource("clip.avi")

vid1 = trim(vid,0,23).aWarpSharp(10,2)
vid2 = trim(vid,24,3846).lanczos4resize(640,480,0,3.0,0,0).aWarpSharp(4,2)
vid3 = trim(vid,3847,52275).FluxSmooth(4,4)
vid1+vid2+vid3

Guest
20th January 2007, 01:27
Yes, that would work too. The return is superfluous I believe, but I like to be explicit. Just a personal preference. Keep in mind ++ versus + if there is audio involved.