/** * Position frame grabber to a specific second in a movie. As a result the * next decoded frame will be precisely at the requested second. * * WARNING: potentially very slow. Use only when you absolutely need precise * seek. Tries to seek to exactly the requested second and for this it might * have to decode a sequence of frames from the closes key frame. Depending * on GOP structure this may be as many as 500 frames. * * @param second * @return * @throws IOException * @throws JCodecException */ public FrameGrab seekToSecondPrecise(double second) throws IOException, JCodecException { sdt().seek(second); decodeLeadingFrames(); return this; }
/** * Position frame grabber to a specific second in a movie. * * Performs a sloppy seek, meaning that it may actually not seek to exact * second requested, instead it will seek to the closest key frame * * NOTE: fast, as it just seeks to the closest previous key frame and * doesn't try to decode frames in the middle * * @param second * @return * @throws IOException * @throws JCodecException */ public FrameGrab seekToSecondSloppy(double second) throws IOException, JCodecException { sdt().seek(second); goToPrevKeyframe(); return this; }