It appears that Dissolve and/or Fade change the total number of frames in .avs scripts. 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. My real world example below shows a difference of 822 frames vs 1368 frames for the same script. I have run some basic tests which appear to support this hypothesis. Of course I may be doing something stupid. Any guidance would be greatly appreciated. Please let me know if I can clarify anything. Ffmpeg also borks on the same script which leads me to think this is an Avisynth issue. Or my lack of avs coding skills.
System specs: Win7, FFmpeg version: 20170223-dcd3418 win32 shared, AVISynth version: 2.6
Test1.avs = 200 frames long = Expected behaviour
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
v1=ImageReader("1.png", fps=24, start=1, end=100)
v2=ImageReader("2.png", fps=24, start=1, end=100)
video = v1 + v2
return video
Test2.avs with return Dissolve = 195 frames long = Unexpected behaviour
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
v1=ImageReader("1.png", fps=24, start=1, end=100)
v2=ImageReader("2.png", fps=24, start=1, end=100)
return Dissolve(v1, v2, 5)
Test3.avs with fadeOut(fadeIn = 202 frames long = Unexpected behaviour
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
v1=ImageReader("1.png", fps=24, start=1, end=100)
v2=ImageReader("2.png", fps=24, start=1, end=100)
fadeOut(fadeIn(v1 + v2, 60), 60)
Test4.avs with dissolve and fade = 197 frames long = Unexpected behaviour
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
v1=ImageReader("1.png", fps=24, start=1, end=100)
v2=ImageReader("2.png", fps=24, start=1, end=100)
v3 = Dissolve(v1, v2, 5)
fadeOut(fadeIn(v3, 60), 60)
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")
v1=ImageReader("1.png", fps=24, start=1, end=100)
v2=ImageReader("2.png", fps=24, start=1, end=100)
v3 = Dissolve(v1, v2, 5, 24)
fadeOut(fadeIn(v3, 60, $000000, 24), 60, $000000, 24)
realExample = 822 frames long = Expected behaviour (this is what I want)
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
v1=ImageReader("1.png", fps=24).trim(1,106)
v3=ImageReader("3.png", fps=24).trim(1,471)
v9=ImageReader("9.png", fps=24).trim(1,58)
v10=ImageReader("10.png", fps=24).trim(1,35)
v11=ImageReader("11.png", fps=24).trim(1,152)
video = v1 + v3 + v9 + v10 + v11
return video
realExample = 1368 frames long
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
v1=ImageReader("1.png", fps=24).trim(1,106)
v3=ImageReader("3.png", fps=24).trim(1,471)
v9=ImageReader("9.png", fps=24).trim(1,58)
v10=ImageReader("10.png", fps=24).trim(1,35)
v11=ImageReader("11.png", fps=24).trim(1,152)
d1 = Dissolve(v1, v3, 5)
d3 = Dissolve(v3, v9, 5)
d9 = Dissolve(v9, v10, 5)
d10 = Dissolve(v10, v11, 5)
fadeOut(fadeIn(d1 + d3 + d9 + d10,60),60)