src/main/java/ch/wetwer/moviefleur/video/VideoExtractor.java
/**
     * @param file          video file to extract 3d frame
     * @param framePosition position of frame to be extracted from video file
     *
     * @return img file of
     */
@param file          video file to extract 3d frame
@param framePosition position of frame to be extracted from video file

@return img file of
@param file video file to extract 3d frame @param framePosition position of frame to be extracted from video file @return img file of
public BufferedImage extractFrame(File file, int framePosition) {
        try {
            Java2DFrameConverter converter = new Java2DFrameConverter();
            FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber(file);
            frameGrabber.start();
            frameGrabber.setFrameNumber(framePosition);
            BufferedImage extractedFrame = converter.convert(frameGrabber.grab());
            frameGrabber.stop();
            return extractedFrame;
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
public BufferedImage extractFrame ( File file , int framePosition ) { try { Java2DFrameConverter converter = new Java2DFrameConverter ( ) ; FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber ( file ) ; frameGrabber . start ( ) ; frameGrabber . setFrameNumber ( framePosition ) ; BufferedImage extractedFrame = converter . convert ( frameGrabber . grab ( ) ) ; frameGrabber . stop ( ) ; return extractedFrame ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return null ; }
@param file          video file to extract 3d frame
 @param framePosition position of frame to be extracted from video file
@param file video file to extract 3d frame @param framePosition position of frame to be extracted from video file