#b = DirectShowSource(" put here name of other video file") #a = DirectShowSource(" put here name of one video file") #b = AVISource(" put here name of other video file") #a = AVISource(" put here name of one video file") The result should be 804 frames long: (822 frames from the original clips) - (4 dissolve points) * (5 frames of overlap per dissolve) + (2 frames from FadeIO).#SetWorkingDir(" put here the path to your folder where your source video files are") Or more succinctly: video = FadeIO(Dissolve(v1, v3, v9, v10, v11, 5), 60) You probably intended to do something like: video = Dissolve(v1, v3, 5) The version with Dissolve dramatically increases the frame count because it's combining the same clips multiple times: d1 = Dissolve(v1, v3, 5)ĭ1 and d3 each include a copy of the v3 clip, and then you spliced d1 and d3 together at the end, meaning that v3 is included twice. Your "real examples" are comparing apples to oranges. If you want exactness, then simply trim off the first and/or last frames before using the normal FadeIn/ FadeOut/ FadeIO functions. If you do not want this, then you can use FadeIn0/ FadeOut0 (or FadeIO0 since you're using both), although note that with those functions, the first/last frame will not exactly be exactly black. Since you made one call to FadeIn and one call to FadeOut in test3.avs, two extra frames were added. The documentation for FadeIn/ FadeOut state:Īn additional color frame is added at the start/end, thus increasing the total frame count by one (or for FadeIO, by two). In your FadeOut example ( Test3.avs), you say that 202 frames is unexpected, but that also sounds correct to me. You combined two 100-frame clips and specified a 5-frame overlap, so 100 + 100 - 5 = 195. The overlap means that the result must be shorter than the sum of the clips' individual lengths. "Dissolving" two clips together means that the end of one clip overlaps with the beginning of a second clip as one gradually fades into the other this is not the same as fading out the first clip and then fading in the second clip. In your Dissolve example ( Test2.avs), you say that 195 frames is unexpected, but that sounds correct to me. (When discussing problems, you should always state what results you got and what results you expected instead.) You stated that some of your results gave "unexpected behavior", but you didn't specify what you expected them to be, so it's unclear what you think is wrong and where your misunderstanding lies.
RealExample = 1368 frames long LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")įadeOut(fadeIn(d1 + d3 + d9 + d10,60),60) RealExample = 822 frames long = Expected behaviour (this is what I want) LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll") Test5.avs explicity specifying frame rates on dissolve and fade = 197 frames = Unexpected behaviour LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")įadeOut(fadeIn(v3, 60, $000000, 24), 60, $000000, 24) Test4.avs with dissolve and fade = 197 frames long = Unexpected behaviour LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll") Test3.avs with fadeOut(fadeIn = 202 frames long = Unexpected behaviour LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll") Test2.avs with return Dissolve = 195 frames long = Unexpected behaviour LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll") Test1.avs = 200 frames long = Expected behaviour LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll") Or my lack of avs coding skills.įFmpeg version: 20170223-dcd3418 win32 shared, Ffmpeg also borks on the same script which leads me to think this is an Avisynth issue. Please let me know if I can clarify anything.
Any guidance would be greatly appreciated. Of course I may be doing something stupid. I have run some basic tests which appear to support this hypothesis.
My real world example below shows a difference of 822 frames vs 1368 frames for the same script. When I add up the total number of frames in the avs script and then load the avs script in Vdub the total number of frames is different. It appears that Dissolve and/or Fade change the total number of frames in.