lib 1006715 // jcodec 0.2.0 lib 1006717 // jcodec 0.2.0 javase import org.jcodec.common.io.*; import org.jcodec.api.awt.*; static IterableIterator framesFromVideo(File video) ctex { final FileChannelWrapper ch = NIOUtils.readableChannel(video); final AWTFrameGrab8Bit grab = AWTFrameGrab8Bit.createAWTFrameGrab8Bit(ch); ret iteratorFromFunction(func { BufferedImage img = grab.getFrame(); if (img == null) NIOUtils.closeQuietly(ch); ret img; }); // TODO: close file when not all frames are grabbed }