Log in

View Full Version : Help with creating avi from jpg


EuropeanMan
24th May 2010, 19:11
I have 12 images that are 1024 x 768 in JPG format. I'd like to create an ~ 1 minute VIDEO in XviD .avi with some background music (mp3 or mp4). What I'd like happen is to have these images shown in playback...

I'd like to have those images be shown for 5 seconds each...and be viewable easily through the regular Windows Media Player...as I doubt my friend has vlc/mpc.

I'll run the .avs through MeGUI to create my avi. Thanks in advance.

jordisound
24th May 2010, 19:40
you have to load the image with imagesource
http://avisynth.org/mediawiki/ImageSource

EuropeanMan
24th May 2010, 19:51
^ I know THAT much already. But I want EACH image to be ONLY 5 seconds!!! That's the problem I'm having.

Right now, I have:


a=imagesource("c:\users\zztop\desktop\a.jpg").addborders(0,1,0,1).spline36resize(1024,768)
b=imagesource("c:\users\zztop\desktop\b.jpg").addborders(0,50,0,50).spline36resize(1024,768)
c=imagesource("c:\users\zztop\desktop\c.jpg").spline36resize(1024,768)
d=imagesource("c:\users\zztop\desktop\d.jpg").spline36resize(1024,768)
e=imagesource("c:\users\zztop\desktop\e.jpg").spline36resize(1024,768)
f=imagesource("c:\users\zztop\desktop\f.jpg").addborders(0,54,0,54).spline36resize(1024,768)
g=imagesource("c:\users\zztop\desktop\g.jpg").addborders(0,43,0,43).spline36resize(1024,768)
h=imagesource("c:\users\zztop\desktop\h.jpg").spline36resize(1024,768)
i=imagesource("c:\users\zztop\desktop\i.jpg").addborders(0,46,0,47).spline36resize(1024,768)
j=imagesource("c:\users\zztop\desktop\j.jpg").spline36resize(1024,768)
k=imagesource("c:\users\zztop\desktop\k.jpg").addborders(0,62,0,63).spline36resize(1024,768)
l=imagesource("c:\users\zztop\desktop\l.jpg").addborders(0,43,0,44).spline36resize(1024,768)
a+b+c+d+e+f+g+h+i+j+k+l
ConvertToYV12()

mariush
24th May 2010, 20:14
Load the avs in virtualdub and play with the Convert frame rate option in the Video menu.... you can convert the 1fps clip to 15-25 fps clip and then you can stretch it 5 times ...

EuropeanMan
24th May 2010, 20:19
i figured out "a" solution by adding ".trim(1,120) at the end of each line

Thanks guys :)

24fps was the framerate of my above script...24 x 5 = 120 :)

Gavino
24th May 2010, 21:05
i figured out "a" solution by adding ".trim(1,120) at the end of each line
You could also just have used 'end=119' as an argument to ImageSource.

EuropeanMan
24th May 2010, 21:18
^ I didn't know about that parametre :( thanks for the tip/advice :)

AVIL
24th May 2010, 22:12
Hi,

add .assumefps(0.2).changefps(25) to the last ConvertToYV12(), i.e. ConvertToYV12().assumefps(0.2).changefps(25)

Gavino
24th May 2010, 22:35
ConvertToYV12().assumefps(0.2).changefps(25)
For that to work, you would also have to use 'end=0' with ImageSource to make each image a single frame instead of the current 120 frames. (Note ImageSource default is 1001 frames).

If 25fps output is wanted, easiest is to use
ImageSource(..., end=124, fps=25)

EuropeanMan
25th May 2010, 06:29
No, I had wanted 24fps...anyway, MY solution had worked. Thanks guys :)

I needed to make a birthday gift for someone and it came out great...she'll get it tomorrow