View Full Version : save sequence as bmp
Mounir
6th May 2009, 17:09
I decided to start using avisynth recently so be nice, my knowledge atm is next to zero.
I use AVSP and i got a script that's working, now i wanna save the video as image sequence (.bmp) to rework on paintshop later
any idea on how i can do that ?
Thanks
Wilbert
6th May 2009, 17:15
Try ImageWriter (http://avisynth.org/mediawiki/ImageWriter).
Mounir
6th May 2009, 17:50
alright i have added this part at the end of my script:
ConverttoRGB24()
ImageWriter("", 0,7887, "bmp")
ImageWriter("J:\01-videos\test-avsp", type = "bmp")
how do you export all the frames past this point ?
Gavino
6th May 2009, 18:38
ImageWriter won't actually write any files until the relevant frames are requested by the program that is using Avisynth. So you need to run your script through a player (you can do this from within AvsP), at least over the range of frames you want to save. If it's just a small number of frames, you can scan through them directly in AvsP with the arrow key.
Also, in the script you posted, only the second ImageWriter call will have any effect (see this thread).
EDIT: Forget the last bit, I was thinking of a different situation - both calls will work, but frames 0-7887 will be output twice, which I don't think is what you want.
Mounir
6th May 2009, 19:11
alright so in essence imagewritter is useless since i have to render/export 7000 or so frames
Vdub mod seems to be an alternatives
Gavino
6th May 2009, 22:37
alright so in essence imagewritter is useless since i have to render/export 7000 or so frames
Why do you say it's useless? If you have configured AvsP with the ability to launch an external player, then all you need is one mouse-click and then let the player run through the relevant frames. At 25fps, 7000 frames takes less than 5 minutes (and you can watch your video while you're waiting :)).
Mounir
7th May 2009, 03:15
alright i didn't see this option, vlc would be good enough to play it ?
I don't remember if VLC supports Avisynth or not. One safe option is to use Media Player Classic (Home Cinema), or the "Queue Analysis Pass" option of MeGUI. Just load your script, hit that button, start your queue and you are good to go.
jollye
7th May 2009, 08:25
Another simple way without using ImageWriter. Open your script with VirtualDub. Then choose Export->Image Sequence and choose the export format. Then your bitmaps will be generated.
Mounir
11th May 2009, 17:33
i knew this option in vdub i use it quite often thanks jollye though
Now i will ask for the opposite, how do you load images sequence in avisynth ?
It seems "image source" is the way to go yet i don't grasp a word of what's written here
(http://avisynth.org/ImageSource)
Let's say i have a sequence that goes like this: myfile0.bmp, myfile1.bmp (etc....) > myfile5915.bmp
How would one load these pix ?
Gavino
11th May 2009, 19:30
Let's say i have a sequence that goes like this: myfile0.bmp, myfile1.bmp (etc....) > myfile5915.bmp
How would one load these pix ?
ImageSource("myfile%d.bmp", 0, 5915, ...)
You may want to specify fps and pixel_type too.
The %d is replaced by the numbers 0 to 5915 to get the sequence of filenames. This convention ("sprintf syntax") comes from the C/C++ language.
Mounir
11th May 2009, 20:57
i just tried and i get an error "raster sizes must be identical" what's this ??
edit:
well it seems to be working:
ImageSource("J:\myfile%d.bmp", 0, 5915, 24.000, use_DevIL = true)
if i add "pixel_type = RGB24" it don't work
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.