@Override
        public void update() {
            long time = System.currentTimeMillis();
            long difference = time - lastTime;
            lastTime = time;
            if (difference < (1.0f / this.framerate) * 1000.0f) {
                try {
                    Thread.sleep(difference);
                } catch (InterruptedException ex) {
                }
            }
            this.ticks++;
        }
Set the video image quality from 0(worst/smallest) to 1(best/largest).
@param quality the quality of the jpegs in the video stream (0.0 smallest file - 1.0 largest file)
jme3-desktop/src/main/java/com/jme3/app/state/VideoRecorderAppState.java