src/main/java/ch/wetwer/moviefleur/video/VideoExtractor.java
/**
     * @param file  video file to extract 3d frames
     * @param start frame where to start the extraction
     * @param end   frame to stop with the extraction
     *
     * @return list of frames in specified range
     */
@param file  video file to extract 3d frames
@param start frame where to start the extraction
@param end   frame to stop with the extraction

@return list of frames in specified range
@param file video file to extract 3d frames @param start frame where to start the extraction @param end frame to stop with the extraction @return list of frames in specified range
public List<BufferedImage> extractAll(File file, int start, int end) {
        try {
            FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber(file);
            frameGrabber.start();
            ArrayList<BufferedImage> extractedFrames = new ArrayList<>();
            for (int frame = start; frame <= end; frame = frame + 1) {
                System.out.println(frame);
                frameGrabber.setFrameNumber(frame);
                extractedFrames.add(new Java2DFrameConverter().convert(frameGrabber.grab()));
            }
            frameGrabber.stop();
            return extractedFrames;
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
public List < BufferedImage > extractAll ( File file , int start , int end ) { try { FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber ( file ) ; frameGrabber . start ( ) ; ArrayList < BufferedImage > extractedFrames = new ArrayList < > ( ) ; for ( int frame = start ; frame <= end ; frame = frame + 1 ) { System . out . println ( frame ) ; frameGrabber . setFrameNumber ( frame ) ; extractedFrames . add ( new Java2DFrameConverter ( ) . convert ( frameGrabber . grab ( ) ) ) ; } frameGrabber . stop ( ) ; return extractedFrames ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return null ; }
@param file  video file to extract 3d frames
 @param start frame where to start the extraction
 @param end   frame to stop with the extraction
@param file video file to extract 3d frames @param start frame where to start the extraction @param end frame to stop with the extraction