Log in

View Full Version : Needed: Ability to grab 1 frame from avs


HighInBC
12th September 2005, 19:42
I am in need of a small command line program that can be used to export a single frame from an avs file into a BMP, something like:

getframe narf.avs 156

would give:

frame156.bmp

movax
12th September 2005, 20:13
Just open your AVS in VirtualDub and save the frame/copy frame to clipboard and save in Paint, or something along those lines.

WarpEnterprises
12th September 2005, 20:58
Or use the ImageWriter command.

sh0dan
13th September 2005, 13:15
"Simple" little scipt:

AVISource("file.avi")
global name = "frame"
global exportpath="c:\temp\"
global runme = "(exportframe) ? ImageWriter(converttorgb24(), "+chr(34)+ exportpath + name + "-"+chr(34)+", current_frame , current_frame, "+chr(34)+ "bmp"+chr(34)+").RGBDifferenceFromPrevious() : Nop()"
frameevaluate(runme, show=false)
conditionalreader("outframes.txt", "exportframe", show=false)

outframes.txt:
type bool
default false
100 true
200 true
250 true
Exports frame 100, 200 and 250 to "c:\temp\frame100.bmp", "c:\temp\frame200.bmp". Adjust frame numbers and output path to your liking.

Wilbert
13th September 2005, 21:37
Follow up here: http://forum.doom9.org/showthread.php?t=99988

movax
14th September 2005, 02:34
Ah thanks for relinking back to that thread Wilbert. :)