View Full Version : Image sequence
bzzz2
8th June 2002, 16:00
Hi!
Is there an avisynth plugin that will allow to open image sequences (jpegs .jpg or targas .tga) into avisynth ?
Thanks,
/Bzzz
bzzz2
10th June 2002, 14:51
Never mind, I solved my own problem
I attach the ImageSequence.dll in case anybody else is interested.
Probably not totally stable, but functionnal..
Cheers,
/Bzzz
vinetu
10th June 2002, 19:41
This is a GODSEND for me !!!
Thank you man!
bzzz2
11th June 2002, 10:10
glad this could be of help :D
I realised I made a mistake in the sample use, it should read
LoadPlugin("ImageSequence.dll")
#ImageSequence("path",firstframe,lastframe,fps)
ImageSequence("c:\images\sequence%.3d.tga",1,22,25)
and not "ImageSource.dll"...
sorry about that
vinetu
11th June 2002, 19:49
No problemo bzzz2!!!
... and the "IMGLIB.DLL" must be in "system32" folder(in case of win98
may be in "system") - else didn't work.
Also in case of "images_0001.tga - images_9999.tga" script should be
...
ImageSequence("c:\images\images_%.4d.tga",1,9999,25)
...
... more - if the resolution of an image sequence (.bmp) is 512x389 (389:2=xxx.xxxxx)
the picture is screwed (i guess it is avisynth) ...
I have tested it with 8xxx tga , bmp ,jpg images and it work !
Thank you again !!!
Best Regards !
vinetu
lark
11th June 2002, 21:25
hey,
this is great.
thanks a 1000000.
but to me it looks like both the width and height
must be divisable by 16 (at least for jpg).
could you please confirm this
or what am i doing wrong?
regards
t :)
bzzz2
12th June 2002, 07:16
It's possible, although I haven't been able to reproduce non working sequences, even with odd sized images.
ALL images in the sequence need to be exactly the same size though, and 24 bits per pixel..
Do you have a sample of a non-working jpeg ?
vinetu
12th June 2002, 21:59
Hi bzzz2 !
I never use odd sized sequences ,but as you ask
for non working sequences here is one :
http://www.freewebz.com/vinetu/non_working_jpg_sequence.zip
(1.3 MB)
If this work on your mashine,then it's may be windows or VGA card
I'm running WinXP ...celeron@1440...GeForce 2mx 200 PCI 32MB video RAM ,512 MB system RAM.
Best Regards!
vinetu
P.S. To download the file may be "save target as" will work...
bzzz2
12th June 2002, 23:48
hmmm... something wrong with the line data sizes..
this new version should help.
Thanks for the non working files,
/bzzz
vinetu
13th June 2002, 09:05
GREAT !
Now the "non working" is ALWAYS WORKING !
Best Regards !!!
vinetu
WarpEnterprises
13th June 2002, 16:13
Superb! Thanks!
WarpEnterprises
14th June 2002, 12:42
...but now I don't know what to do:
Is it possible that the DLL doesn't work on Win98? I get an errormsg as if the DLL isn't found (..unable to load...), but I definitly didn't misspell the path.
On a win2k-system all works fine as I indicated above.
bzzz2
14th June 2002, 17:22
try to put IMGLIB.DLL in your windows\system directory instead of ..\system32
dividee
16th June 2002, 14:28
Thanks bzzz2!
This is a great plugin.
Just one thing:
For robustness (and future-proofing) you should change
viScanLine = (vi->RowSize()+7) & -8;
by
viScanLine = dst->GetPitch();
bzzz2
17th June 2002, 21:09
thank you dividee ! :D
I had been looking for that property...
thanks again
robpea
10th July 2002, 22:39
Forgive me if this is way off...
How easy would it be to add a cross-dissolve functionality
to this plugin. I use Premiere to create slideshows from images,
with always the same steps:
1) Load all images in, each set for 150 frames (29.970*5sec)
2) Place on timeline
3) Offset image with cross-disolve transition of 20 frames
4) Add Audio Wavs
5) Export.
With this one plugin, I could save a ton of time.
Just a thought.
dividee
11th July 2002, 01:05
Here is a little script that does what you want (except for audio).
You just have to change the variables on top of the script:
LoadPlugin("ImageSequence.dll")
n=2 # numbers of stills
fname="K:\Stills\still%.3d.bmp"
exposition=150 # should be even. includes overlap
overlap=20
rate=29.97
ImageSequence(fname,1,n,1)
DUP_FRAMES(exposition)
AssumeFPS(rate)
TRANSITION(0,exposition,overlap)
function DUP_FRAMES(clip clip, int count)
{
# tricky !
# add room for new frames (changeFPS doesn't change the framecount)
clip + BlankClip(clip,length=clip.framecount*(count-1)-(count/2))
ChangeFPS(framerate*count)
# the first frame was only reproduced count/2 times
Trim(0,(count/2-1)) + last
return last
}
function TRANSITION(clip clip, int start, int expo, int overlap)
{
return ( start >= clip.framecount-expo ?
\ Trim(clip,start,0) :
\ Dissolve(Trim(clip,start,start+expo-1),
\ TRANSITION(clip,start+expo,expo,overlap),
\ overlap)
\ )
}
We don't have loops in avisynth but we have recursion ;)
Be sure to use a version of avisynth where Dissolve works (this filter has been fixed and broken a few times)
robpea
11th July 2002, 06:21
Awesome! :D
Just one problem.
I have version 1.0 beta 7d Feb 23, 2002 and I think the disolve must be broken.
I comment out the Transition function, and end up with the right number of frames, but obviously no dissolve. When the TRANSITION function is added to the code, I only get the 1st image (150 frames).
fname="F:\F707\DSC0%.4d.jpg"
exposition=150 # should be even. includes overlap
overlap=20
rate=29.97
start_image_num = 1629
end_image_num = 1659
ImageSequence(fname, start_image_num, end_image_num,1)
BilinearResize(720,480)
DUP_FRAMES(exposition)
AssumeFPS(rate)
#TRANSITION(0,exposition,overlap)
Any thoughts?
A big thanks in advance.
dividee
11th July 2002, 12:20
Try with the 1.0 beta 6 version from videotools (http://www.videotools.net). Unfortunately in the current release on sourceforge Dissolve is broken, maybe Richard will be kind enough to make a new release. In last resort, I'll post my dll.
Didée
16th July 2002, 15:16
If I´m not blind, the latest version videotools offers is 1.05, I don´t see 1.06 there.
Wasn´t dissolve broken in 1.05, too, and only (temporarily :( ) fixed in 1.06?
It´s a little complicated with all those versions ...
BTW, concerning the evolving avisynth 2.x:
Has anyone information if all of the "older" functions are working there, or are there still broken ones in it ???
Wilbert
16th July 2002, 16:17
If I´m not blind, the latest version videotools offers is 1.05, I don´t see 1.06 there. Wasn´t dissolve broken in 1.05, too, and only (temporarily ) fixed in 1.06? It´s a little complicated with all those versions ...
I guess I have to make the faq clearer :) There are two kinds of versions floating around. The versions which can be found on Edwins homepage fourth line of this page (http://www.videotools.net/uk/download.php?), and the versions which can be found here in the threads/sourceforge. These versions run parallel to each other :( The dissolve filter is fixed in Edwins 1.06, and will also be fixed in "upcoming" versions which can be found on sourceforge.
Maybe it is also fixed in 1.0b7a (see faq where to find it). But I'm not sure, you will have to try that.
BTW, concerning the evolving avisynth 2.x: Has anyone information if all of the "older" functions are working there, or are there still broken ones in it ???
I'm not aware of any broken filters in the upcoming version. But who knows?
Didée
17th July 2002, 11:18
Okay, I was not blind - it was only me, in my optimistic manner, immediately heading over to the "/de" sub-page. There is only 1.05 to be found, the "/uk" page holds 1.06 ...
Thanks, Wilbert!
poptones
24th July 2002, 00:52
Can someone please explain to me this imglib.dll? I find nothing of use on google (the name is kinda generic) and I find no source in the zip. Am I missing something?
dividee
24th July 2002, 09:07
This plugin is very useful and I already tought about including it in avisynth, but I had the same problem. If you look at the file version, it says © 1994,1995 SimSoft. It's an old shareware library that wasn't updated since 1995. Does anyone known an open source equivalent ?
poptones
24th July 2002, 09:32
In fact that's just what I been workin' on. I did manage to track it down to one archive site in the UK; it's a dll the developer encourages people to share, but you cannot use it in a package without a license. Don't mean it can't be shared (of course) but he does ask for $50 if you keep using it. Yikes.
So I hit sourceforge and looked for "image library" and found this really cool library called "openil" (aka "devil" for DEVeloper's Image Library). It's probably not the only one out there, but it appears pretty powerful and the docs link to all the other libs used in its construction. So it shouldn't be hard to lift the jpeg, bmp, tiff and maybe even doom texturemap handlers (!)
WarpEnterprises
20th November 2002, 23:47
I made a little modification which hopefully make ImageSequence.DLL ignore any missing images in the sequence.
(attachement)
sh0dan
28th December 2002, 02:06
Updated this invaluable filter for AviSynth 2.5. It will also no longer fail on 32bpp images - don't know if it'll give any changed functionality.
All necessary files and source included.
Richard Berg
29th December 2002, 10:44
This reminds me -- when I was working on an old version of what will eventually become an Avisynth GUI, I made an interface to some open-source image libraries. (I used the official libjpeg & libpng, which are licensed quite liberally, and wrote my own simple BMP parser as GNU of course.) It wouldn't be hard to rework into a source filter for AVS 2.5x; when I get back, someone bug me about it lest I forget...
Wilbert
29th December 2002, 17:25
Marc FD made such a plugin. See http://forum.doom9.org/showthread.php?s=&threadid=39798.
esby
19th February 2003, 13:20
Well
after having some problems to find the 2.5 version,
but these are solved now,
now i have a little problem.
All i am getting is black image output...
i tried with .bmp ; .tga ; .jpg
and even with some old project containing overlay i did for avs v2.07
(which were working)
all i m getting is black image...
esby
[edit] PS: what i do of the 70 mb of bmp i have now :) ?
sh0dan
19th February 2003, 13:40
Could you post one or two bmp's?
esby
19th February 2003, 13:52
here are two ...
http://www.chez.com/esbyphp/gb01.avs.32212.bmp
http://www.chez.com/esbyphp/gb01.avs.32216.bmp
chez.com forbidding the direct linking,
so c/p the link in a blank ie to get it working...
esby
esby
21st February 2003, 01:02
ok.
Problem solved...
relative linking of the bmp/image just wont work actually.
loadplugin("D:\tools\encodeur\yv12\ImageSequence.dll")
#ImageSequence("path",firstframe,lastframe,fps)
ImageSequence("F:\timing\gb01 dvd\gb01.avs.32212.bmp",0,1,24)
will works
and ...
loadplugin("D:\tools\encodeur\yv12\ImageSequence.dll")
#ImageSequence("path",firstframe,lastframe,fps)
ImageSequence(".\gb01.avs.32212.bmp",0,1,24)
will not work even if the avs is in the same dir...
And it will just display a black screen output... --
esby
HighInBC
1st March 2003, 00:11
I have used the 32bit friendly image importer, it works fine, but it seems that it thorws away the alpha layer, is this an error? or was the alpha layer not meant to be supported, just tolerated?
WarpEnterprises
2nd March 2003, 23:33
@sh0dan and 32bit: I can't see how it should work correctly, maybe you attached the wrong ZIP
(memcpy(wBuf+ (i*viScanLine ),((BYTE*)lpBmp)+40+(i*ScanLine),3 * Width))
Btw, should NewVideoFrame create a black frame or do I have to blank it myself?
@HighInBC: could you mail me some of your 32bit bitmaps, I wanted to test it, but could not find a program to generate alpha BMPs.
Anyhow, I made another version (so far only for AviSynth 2.0x) which has the following features:
* new library CORONA added, which is much faster (as different filter command CoronaSequence)
* can display the actual filename on the image
* no errors when images are missing (there was a bug in previous versions)
* even the first image can be missing - the first FOUND image is taken as size- and format-template
* with corona the image format can change in the sequence (not the size of course)
* if no image is found the filename is displayed so you can check the number formatting
* 32bit with alpha should work
Get it here:
http://members.aon.at/archi/warpenterprises
arlsair
3rd March 2003, 09:23
The link for the corona.dll is not working.
WarpEnterprises
3rd March 2003, 10:06
...forgot to upload the ZIP
[edit] oops, CoronaSource crashes on W2K :(
sh0dan
3rd March 2003, 13:56
Originally posted by WarpEnterprises
@sh0dan and 32bit: I can't see how it should work correctly, maybe you attached the wrong ZIP
(memcpy(wBuf+ (i*viScanLine ),((BYTE*)lpBmp)+40+(i*ScanLine),3 * Width))
Btw, should NewVideoFrame create a black frame or do I have to blank it myself?
It never seemed to return 32bits anyway, so the code probably never worked.
NewvideoFrame doesn't do anything to your image - it will contain uninitialized data (random data, or a previous frame). When AviSynth is compiled in debug mode, there will be a specific pattern put into it. ("A110 CA7ED" or something like that).
WarpEnterprises
3rd March 2003, 21:41
OK, all should be working now.
[edit: the DLL must be from 2003-03-04]
http://members.aon.at/archi/warpenterprises
Please send me some 32bit images :sly:
smok3
27th March 2003, 18:49
ok, i have few basic questions:
- offtopic/can i use avisynth 2.0x and 2.5x at the same time?
- what formats are supported by corona.dll and where to put that dll? (how do i use that dll in scripts?)
p.s. so far i was only able to open one jpg image sequence, tga sequence is broken and tif wont open at all... (under winnt)
for tif i was trying to use something like:
LoadPlugin("c:\program files\avisynth2.5\plugins\ImageSequence\ImageSequence.dll")
#ImageSequence("path",firstframe,lastframe,fps)
ImageSequence("D:\primer.%.4d.tif",1,155,25)
info
WarpEnterprises
27th March 2003, 20:59
- there are some threads on using both AviSynth versions, pls search for them
- put corona.dll in the system32-directory (just as imglib.dll) and you should be able to use CoronaSequence alternativly just like ImageSequence
- it should decode, PNG, JPG, PCX, BMP, TGA, GIF
What does happen? Is there a black screen with the filename written on it / a crash / nothing at all?
You can mail me one of your non-working pictures if you like
(peche at aon dot at)
smok3
28th March 2003, 15:24
thx for reply, i will send you a mail with a link to specific files including one tga and one tif. [ mail sent ]
edit: ok, i reinstalled everything again and now i get the tga sequence in corectly (i have no idea what was happening before - maybe some wrong version of some library/dll)
tif still not working, i get an image in vdub telling me that 'NO PICTURES FOUND'
script is like this:#avisynth 2.08
LoadPlugin("c:\program files\avisynth2\plugins\ImageSequence.dll")
#ImageSequence("path",firstframe,lastframe,fps)
ImageSequence("E:\twixtor\oblacek\oblacek_%.3d.tif",0,224,25)edit2: ok, i got into the tif problem as well, looks like it is connected to the LZW tif compression, uncompressed pictures will load well, unfortunately i have no wish to use such tifs since i can use the targa instead then... :(
edit3: what about this 'library' ?
http://openil.sourceforge.net/features.php
liquid217
1st April 2003, 21:24
Hello, I seem to be having some trouble using the version compiled by sh0dan for avisynth 2.5. Im using a win98 machine, and have the imglib.dll from warpenterprise's site installed in the windows/system32 dir AND in the plugin dir where imagesequence.dll is located. It seems my script fails when loadplugin("/path/imagesequence.dll") is run. The error message returned is LoadPlugin: unable to load imagesequene.dll
Any thoughts? thanks.
kilg0r3
1st April 2003, 21:31
@liquid217
i am not sure but i had the same problem. i think i resolved it by putting the imagesequence.dll in the system32 _and_ in the plugin directory. Or, was it that i put the imglib.dll in the same directory as imagesequence.dll? Sorry, can't remember
WarpEnterprises
2nd April 2003, 08:30
With WIN98 you have to put it in \System not \System32.
Try if this works.
I will make a 2.5 version with my additions ASAP.
liquid217
2nd April 2003, 17:01
thanks for the replys. WarpEnterprises, sorry, i said wrong. i meant to say its in the windows/system dir. I have a temporary fix, atm. Im using the loadpluginex.dll and the updated (v2)imagesequence.dll. This combination seems to be running well for now. Again, thanks for the help.
WarpEnterprises
3rd April 2003, 12:51
Aviynth 2.5 version uploaded.
Look at my "www" button.
cweb
16th April 2003, 11:31
The files merged in the sequence seem to have to be in the form xyz(spaces)(number).tga etc otherwise you get the dreaded error no picture found.
How is it possible to use it to combine a sequence with a 0-prefix rather than a space prefix?
I.e. files named xyz000.tga, xyz001.tga, xyz002.tga, etc.
Or files name xyz0000.tga, xyz0001.tga, xyz0002.tga..
Any suggestions, besides writing a program to rename all the files?
sh0dan
16th April 2003, 11:47
@cweb: Total Commander (formerly Windows Commander) has a great "MultiRename Tool", which lets you eaasily rename a bunch of files. Easy and powerful to use.
WarpEnterprises
16th April 2003, 21:31
# pic%d.jpg standard numbering "pic1.jpg" "pic15.jpg" "pic153.jpg"
# pic%5.3d.jpg 5 characters 3 digits "pic 001.jpg" "pic 015.jpg" "pic 153.jpg"
# pic%-5d.jpg 5 characters left aligned "pic1 .jpg" "pic15 .jpg" "pic153 .jpg"
pic%.4d.jpg expects pic0000.jpg
pic%.6d.jpg expects pic000000.jpg
and so on.
cweb
20th April 2003, 20:31
Ah that was it!
pic%.4d.jpg!!
Thank you very much. And yes, I thought of the mass renaming
utility solution.
Originally posted by WarpEnterprises
# pic%d.jpg standard numbering "pic1.jpg" "pic15.jpg" "pic153.jpg"
# pic%5.3d.jpg 5 characters 3 digits "pic 001.jpg" "pic 015.jpg" "pic 153.jpg"
# pic%-5d.jpg 5 characters left aligned "pic1 .jpg" "pic15 .jpg" "pic153 .jpg"
pic%.4d.jpg expects pic0000.jpg
pic%.6d.jpg expects pic000000.jpg
and so on.
WarpEnterprises
7th May 2003, 22:42
two bugs removed:
- named arguments were not functional
- CoronaSequence had an image shift and possible crash
new version on my www
kastro68
13th May 2003, 17:40
Hi, I just need help adding an image sequence in front of a video using avisynth
Edit: I get this error message
"Splice: video formats don't match"
I may be using the wrong commands. If anyone knows a simpler command, please help.
something like this maybe,
assuming you are using
clip = avisource("something.avi")
i'll go for something like that
#missing function in avs 2.5
function isYv12(clip) {
return !(clip.isRGB() || clip.isYuY2())
}
#AutoColorSpace Function
function convertToColorSpace(clip1,clip2) {
clip1 = (clip2.isRGB32() && !clip1.isRGB32()) ? clip1.convertToRGB32(): clip1
clip1 = (clip2.isRGB24() && !clip1.isRGB24()) ? clip1.convertToRGB24(): clip1
clip1 = (clip2.isYUY2() && !clip1.isYUY2()) ? clip1.convertToYuy2(): clip1
clip1 = (clip2.isYV12() && !clip1.isYV12()) ? clip1.convertToYv12(): clip1
return clip1
}
# here the stuff really interesting you...
intro = imagesequence("...,insert your param here...").assumefps(clip.framerate).convertToColorSpace(clip)
clip = intro + clip # or ++ ( depending if you want to keep audio aligned or not).
#and of course
return clip
Of course you need to have the same height & width for your video & sequence of images...
If you don't have the same, you'll have choice
or to add border, or to resize one of the two, (maybe the two)...
esby
PS: there could be still some bugs left too, but afik, there were corrected in previous version of avs 2.5 ( i m using avs 2.5).
kastro68
14th May 2003, 05:00
I'll try it as soon as I get home.
Maybe someone could add this to the avisynth FAQ, or documention.
The way I did it in the past was via virtualdub, which can get inefficient at times.
WarpEnterprises
14th May 2003, 07:33
esby is correct, in short you have to add an "convertto..." either to the clip or to the imagesequence-import-clip.
sh0dan
15th May 2003, 17:42
To keep this thread on topic desync issues has been moved to a new thread (http://forum.doom9.org/showthread.php?s=&threadid=53452).
kastro68
22nd May 2003, 05:44
Originally posted by cweb
How is it possible to use it to combine a sequence with a 0-prefix rather than a space prefix?
I.e. files named xyz000.tga, xyz001.tga, xyz002.tga, etc.
Or files name xyz0000.tga, xyz0001.tga, xyz0002.tga..
Any suggestions, besides writing a program to rename all the files?
You can also use ACDsee to rename picture files.
nnigam
3rd January 2005, 22:02
I was wondering about that. I use 0's also. Use IMG%05d.jpg This will make sequence IMG00001.jpg, IMG00002.jpg etc. Upto 5 places in length filled with leading 0's.
nnigam
3rd January 2005, 22:04
This works great, but only if I have less then 8 images. More then that, virtualdub immediately closes. I also have a very long black sequence at the end of the file.
Originally posted by robpea
Awesome! :D
Just one problem.
I have version 1.0 beta 7d Feb 23, 2002 and I think the disolve must be broken.
I comment out the Transition function, and end up with the right number of frames, but obviously no dissolve. When the TRANSITION function is added to the code, I only get the 1st image (150 frames).
fname="F:\F707\DSC0%.4d.jpg"
exposition=150 # should be even. includes overlap
overlap=20
rate=29.97
start_image_num = 1629
end_image_num = 1659
ImageSequence(fname, start_image_num, end_image_num,1)
BilinearResize(720,480)
DUP_FRAMES(exposition)
AssumeFPS(rate)
#TRANSITION(0,exposition,overlap)
Any thoughts?
A big thanks in advance.
Wilbert
3rd January 2005, 22:31
Did you try the internal ImageSource instead of ImageSequence plugin?
nnigam
3rd January 2005, 23:08
Sure Did. Same results.
I am trying to convert a bunch of images to dvd that I can watch on my dvd player. Avisynth and VirtualDub are working great. I am just missing a transition between the images. All the commands I see work on two files and put a transition between them. If this could be added as an optional parameter to ImageSource, it would be great.
stickboy
3rd January 2005, 23:21
1. What version of AviSynth are you using?
2. Please post your exact script.
esby
3rd January 2005, 23:26
I am trying to convert a bunch of images to dvd that I can watch on my dvd player. Avisynth and VirtualDub are working great. I am just missing a transition between the images. All the commands I see work on two files and put a transition between them. If this could be added as an optional parameter to ImageSource, it would be great.
What do you want to do exactly ?
supposed you got:
{a, b, c, d, e, f} images
do you want to have something like that ?
{a, a, a, a, a+b, a+b, b, b, b, b, b+c, b+c, c, c, c, ...}
I don't know about a+b,
but for {a, a, a, a, b, b, b, b, c, c, c, c,...}
selectEvery should do the trick...
Now if you have a huge quantity of image to load, someone made a plugin for loading several image if I am remembering well...
esby
PS: What is DUP_FRAMES() ?
Wilbert
3rd January 2005, 23:26
3. Where do we get the dup_frames plugin?
4. Where do we get the transition plugin?
here: http://forum.doom9.org/showthread.php?s=&threadid=69155 ?
nnigam
4th January 2005, 22:50
Here is the script I was using
If I have n > 8 and use the dup_frames, and Transition functions, virtualdubmod immediately dies. For 6 or less, the file opens up with the selected images, but with a huge black ending. I tried to modify it with the MergeImg function and transall plugin, but obviously I do not know this well enough yet as it does not work. Without the function, my images open fine with an immediate change beteen images. I would like to make something softer such as a blur or sliding effect. I guess the problem is that I do not know how to extract two different images the first time and then move the second to first postion and get the next image for the second position since avisynth does not appear to have a looping control.
#LoadPlugin("c:\hdtools\imgseq\imagesequence.dll")
LoadPlugin("c:\hdtools\transall\transall.dll")
seconds_per_still=6
n=17 # numbers of stills
fname="c:\projects\cnv\F%05d.jpg"
exposition=150 # should be even. includes overlap
overlap=20
rate=29.97 #25
#ImageSequence(fname,1,n,1)
ImageSource(fname,1,n,1)
Bicubicresize(720,480)
changeFPS(seconds_per_still*rate)
#DUP_FRAMES(exposition)
AssumeFPS(rate)
#TRANSITION(0,exposition,overlap)
MergeImg()
function MergeImg
{
TransFlipPage(clip,clip,3)
}
function DUP_FRAMES(clip clip, int count)
{
# tricky !
# add room for new frames (changeFPS doesn't change the framecount)
clip + BlankClip(clip,length=clip.framecount*(count-1)-(count/2))
ChangeFPS(framerate*count)
# the first frame was only reproduced count/2 times
Trim(0,(count/2-1)) + last
return last
}
function TRANSITION(clip clip, int start, int expo, int overlap)
{
return ( start >= clip.framecount-expo ?
\ Trim(clip,start,0) :
\ Dissolve(Trim(clip,start,start+expo-1),
\ TRANSITION(clip,start+expo,expo,overlap),
\ overlap)
\ )
}
stickboy
5th January 2005, 08:22
Please use [ code ] ... [ /code ] tags for easier readability.
I haven't looked at your entire script, but dup_frames caught my eye:function DUP_FRAMES(clip clip, int count)
{
# tricky !
# add room for new frames (changeFPS doesn't change the framecount)
clip + BlankClip(clip,length=clip.framecount*(count-1)-(count/2))
ChangeFPS(framerate*count)
# the first frame was only reproduced count/2 times
Trim(0,(count/2-1)) + last
return last
}This function is bad.
1. What it says about ChangeFPS is a lie. ChangeFPS duplicates or deletes frames as necessary to achieve the desired frame rate. Possibly the author confused it with ConvertFPS?
2. Using Trim in user-defined functions is tricky (http://forum.doom9.org/showthread.php?s=&threadid=58358). For example, the above function wouldn't work correctly if count < 4.
And of course, it doesn't document what it's trying to do, so I'm not sure if it correctly accomplishes its intent. Maybe ChangeFPS actually does what's wanted?
stickboy
5th January 2005, 08:39
Ah, okay, it's trying to duplicate each frame by count times using ChangeFPS. Interesting.
Looks like ChangeFPS still duplicates the wrong number of frames at the beginning and end.
Hmm... there should be a better way to do this. If not, writing a plug-in to do this correctly should be pretty trivial.
(The BlankClip stuff dup_frames uses is still wrong, though.)
nnigam
5th January 2005, 15:35
I suspected something was wrong with it. I got the orignial from somewhere in the forums here. But when I comment it out, then transition does not work either. I therefore modified it to use changefps and assumefps, but am unable to pass the needed two clips to transition. The best place that I can see for this would be in the ImageSource functioin as a parameter. This would have the added benefit of allowing random transitions. I am looking furiously at the functions available to me, but have yet to find a way to do this in avisynth.
WarpEnterprises
14th April 2006, 21:33
Look and post here for the new wildcard version.
http://forum.doom9.org/showthread.php?t=109997
tin3tin
14th April 2006, 21:45
Have a look on DVD slideshow GUI... the test version in the videohelp forum and exports to avs script among other things. The gui uses the great transall plugin.
Tin2tin
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.