Log in

View Full Version : Image sequence


Pages : [1] 2

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.