Log in

View Full Version : Frameserving a sequence of bitmaps into AviSynth?


Dannyboy007
14th July 2007, 22:37
Hey guys. I have a lot of BMP images that I want to convert to XviD. Their resolution is 1280 x 1024, and frame rate should be 60. The images are like this:

image00018.bmp (yes, it does not start at 00001) to ->
image00130.bmp, which are 113 images exactly.

I want to convert them to XviD, with an resolution to 720 x 576 (PAL), and I want to crop the top and bottom with 141. But when I open it in VDmod, add filter resize, then crop, the picture is so big that it goes out of the screen! And can therefore I cannot crop the bottom, cause it's long out of the screen. So I make an AviSynth script, but are having trouble with opening the sequence image00018.bmp -> image00130.bmp.

Any suggestions? I've tried ImageSource, but those I have tried for now, haven't worked.

Thank you:)

stickboy
14th July 2007, 22:51
Why didn't ImageSource work? Post your script.

Dannyboy007
14th July 2007, 23:22
I dunno, but here are some I tried:

ImageSource("C:\Programfiler\Adobe\Projects\Counter-Strike - I'm Still Here\Clips\Clip

1\dollsaaa00018.bmp")

Crop(0,141,-0,-141).LanczosResize(720,576)
ImageSource("C:\Programfiler\Adobe\Projects\Counter-Strike - I'm Still Here\Clips\Clip

1\dollsaaa00018.bmp", 00018, 00130, 60)
ImageSource("C:\Programfiler\Adobe\Projects\Counter-Strike - I'm Still Here\Clips\Clip

1\dollsaaa00018.bmp", end = 00130, use_DevIL = true)

I can open the AVS file in VDMod, but it won't play the whole sequence, only one still-image (dollsaaa00018.bmp).

wonkey_monkey
14th July 2007, 23:41
You have to specify the number in C's printf format:

ImageSource("C:\Programfiler\Adobe\Projects\Counter-Strike - I'm Still Here\Clips\Clip

1\dollsaaa%05d.bmp", start=18, end = 130, use_DevIL = true)

The %05d is a placeholder which specifies a 5 character number padded with 0s.

David

Dannyboy007
14th July 2007, 23:52
Thank you :) Sorry, I must have missed the "%05d.bmp" on the AviSynth main page. However, it looks like it's playing the images correct now, but the video is now black in VDMod. How come it is black, but playing the sequence?

Edit: I also found out that I had to add fps = 29.97, because the clip is 3.77 seconds. And without telling manually the fps, it made the movie to 24 fps, which made the movie play for 4.7 seconds. But it's still odd, since in Counter-Strike I wrote "startmovie DollsAAA 60", and 60 stands for 60 fps. Can someone explain me why I have to convert the images to 29.97 fps when in Counter-Strike I wrote 60 fps? I can't figure it out myself, and I want to learn :)

And I still have the problem with VDMod only showing black video by the images, if someone have a solution for that.

Dark Shikari
15th July 2007, 05:16
Thank you :) Sorry, I must have missed the "%05d.bmp" on the AviSynth main page. However, it looks like it's playing the images correct now, but the video is now black in VDMod. How come it is black, but playing the sequence?

Edit: I also found out that I had to add fps = 29.97, because the clip is 3.77 seconds. And without telling manually the fps, it made the movie to 24 fps, which made the movie play for 4.7 seconds. But it's still odd, since in Counter-Strike I wrote "startmovie DollsAAA 60", and 60 stands for 60 fps. Can someone explain me why I have to convert the images to 29.97 fps when in Counter-Strike I wrote 60 fps? I can't figure it out myself, and I want to learn :)

And I still have the problem with VDMod only showing black video by the images, if someone have a solution for that.
Well since they're images, not a video, there's nothing telling the computer what framerate they should be, so AviSynth has to make one up unless you tell it specifically.

Dannyboy007
15th July 2007, 21:14
I understand that, but I find it odd that in Counter-Strike I wrote "startmovie DollsAAA 60", which means a framerate of 60. But when I tried fps = 60 in AviSynth, the images played faster than normal. The videos orignial length is 3.77 seconds. But with fps = 60 in AviSynth, it only lasted for ca. 2 seconds. But with fps = 29.97, the movie lasted 3.77 seconds, which is the original length.

But nevermind that, because I found the "problem". I have 113 images, and the clip's original length is 3.77 seconds. And 113 / 3,77 = 29.97, so even though I wrote 60 in CS, it didn't render out 60 frames per second. Only 29.97 frames per second. Maybe I did something wrong in CS. But it's all normal now.

But I got another problem^^ I can open the images with AviSynth in VDMod now, but the video becomes black. Any suggestions there?

http://img220.imageshack.us/img220/12/vdmodproblemuu1.png

Leak
15th July 2007, 21:28
But I got another problem^^ I can open the images with AviSynth in VDMod now, but the video becomes black. Any suggestions there?
Is there a reason you're using VDubMod instead of VirtualDub 1.6.19, which is much more recent?

If the black frames are caused by the script outputting YV12, you'll either need a more recent version of VirtualDub or need a VfW YV12 decoder filter (like the Helix YV12 codec, or XviD, or ffdshow) so VDubMod will be able to display it...

np: The Orb - Abstractions (Trance Pennine Express) (Bicycles & Tricycles)

Dannyboy007
15th July 2007, 22:50
I run VDMod from Gordian Knot Rip Pack.

Since I already have XviD and FFDShow installed, I tried the latest stable version of VirtualDub as you said. But that didn't work either. Still black. And I checked in the VFW configuration to FFDShow, and couldn't find any YV12 in the Decoder - Codecs section.

Edit: Sorry, my bad. It works now, just a missunderstanding with the path. You can clearly see the difference here, lol:

This one has a "wrong" path:
ImageSource("C:\Programfiler\Adobe\Projects\Counter-Strike - I'm Still Here\Clips\Clip
1\dollsaaa%05d.bmp", start=18, end = 130, use_DevIL = true)

And here is the on that works:
ImageSource("C:\Programfiler\Adobe\Projects\Counter-Strike - I'm Still Here\Clips\Clip 1\dollsaaa%05d.bmp", start=18, end = 130, use_DevIL = true)
;)