Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
18th January 2009, 13:00 | #1 | Link |
Registered User
Join Date: Jul 2008
Posts: 31
|
A Script to Generate Slideshow with TransAll effects
I'm playing around with avisynth to create a slideshow with TransAll effects, see also.
I've created a DOS batch file ShowGen.bat which generates from a given directory a slideshow of all JPG-files: Code:
ShowGen C:\\photos folksDATA is a tool which I've written for other purpose. All these are created for my own use and hope someone will find them useful. Phuoc Can HUA |
19th January 2009, 02:16 | #2 | Link |
Resize Abuser
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
|
ImageMagick Reader would be a better starting point. It will load a dir and resize it. Then all thats needed is frame length manipulation & transitions.
__________________
Mine: KenBurnsEffect/ZoomBox CutFrames Helped: DissolveAGG ColorBalance LQ Animation Fixer |
19th January 2009, 02:49 | #3 | Link | |
Registered User
Join Date: Jul 2008
Posts: 31
|
Thanks for that, that's what I need because I've noticed that the performance of my script is terrible. I guess that it's resizing each single frame at the moment.
I went through the link below somehow I couldn't find avisynth script example or tutorial for immaread/write. Do I need to write it back to a file and use ImageSource() on it? or I can use the converted image directly from memory? Quote:
|
|
19th January 2009, 02:54 | #4 | Link |
Resize Abuser
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
|
Here's the homepage for it
http://www.geocities.com/wilbertdijkhof/ Direct link http://www.geocities.com/wilbertdijk...maavs_v141.zip Future reference for finding plugins/filters http://avisynth.org/mediawiki/External_filters btw the link is about 2/3 the way down on the first post.
__________________
Mine: KenBurnsEffect/ZoomBox CutFrames Helped: DissolveAGG ColorBalance LQ Animation Fixer |
23rd January 2009, 14:14 | #5 | Link |
Registered User
Join Date: Jul 2008
Posts: 31
|
I've tried immaavs.dll and got the error LoadPlugin: unable to load "immaavs.dll". Then I checked:
http://forum.doom9.org/archive/index.php/t-135928.html It sounds like I need more than just one DLL. Since I only need it for resize I'd better leave it for the moment. So, I optimize my function: Code:
function Image2Clip( string FName, int ImgLen) { # B= KillAudio( BlankClip( ImgLen, ScrWidth, ScrHeight, color=$001144, pixel_type="RGB24")) # C= ImageSource( FName).trim(1, ImgLen) B= KillAudio( BlankClip( 1, ScrWidth, ScrHeight, color=$001144, pixel_type="RGB24")) C= ImageSource( FName) ImgIsWide=( (C.Width/ C.Height) >= (ScrWidth/ ScrHeight))? 1: 0 Fact=( ImgIsWide== 1)? 1.0 *ScrWidth/ C.Width: 1.0 *ScrHeight/ C.Height NewWidth= Round( Fact* C.Width) NewHeight= Round( Fact* C.Height) O= C.BilinearResize( NewWidth, NewHeight) return B.Overlay( O, (ScrWidth-NewWidth)/2, (ScrHeight-NewHeight)/2).Loop( ImgLen) } |
23rd January 2009, 16:20 | #6 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
Code:
ImgIsWide = float(C.Width)/C.Height >= float(ScrWidth)/ScrHeight Fact= ImgIsWide ? 1.0 *ScrWidth/C.Width : 1.0 *ScrHeight/C.Height |
|
24th January 2009, 03:51 | #7 | Link |
Resize Abuser
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
|
@bigboss97
You might want to tryout Zoombox for your resizing, it takes care of all the Aspect Ratio math for you. http://forum.doom9.org/showthread.ph...89#post1111789
__________________
Mine: KenBurnsEffect/ZoomBox CutFrames Helped: DissolveAGG ColorBalance LQ Animation Fixer |
24th January 2009, 12:20 | #8 | Link | |
Registered User
Join Date: Jul 2008
Posts: 31
|
No doubt, Ken Burns effect will make my slideshow alive.
Since I'm trying to use Avisynth in realtime (preview mode) I can only afford limited number of filters. Certainly, I don't need to run two filters overlapped. Ken-Bruns will run between the transition filters. I'm just an AVS-beginner. I'll leave this for the moment. Unless someone can give me few lines example. Thanks Phuoc Can HUA Quote:
|
|
|
|