@Override
    public void initialize(AppStateManager stateManager, Application app) {
        super.initialize(stateManager, app);
        this.app = app;
        this.oldTimer = app.getTimer();
        app.setTimer(new IsoTimer(framerate));
        if (file == null) {
            String filename = JmeSystem.getStorageFolder(JmeSystem.StorageFolderType.External) + File.separator + "jMonkey-" + System.currentTimeMillis() / 1000 + ".avi";
            logger.log(Level.INFO, "fileName: {0}", filename);
            file = new File(filename);
        }
        processor = new VideoProcessor();
        List<ViewPort> vps = app.getRenderManager().getPostViews();

        for (int i = vps.size() - 1; i >= 0; i-- ) {
            lastViewPort = vps.get(i);
            if (lastViewPort.isEnabled()) {
                break;
            }
        }
        lastViewPort.addProcessor(processor);
    }
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-android/src/main/java/com/jme3/app/state/VideoRecorderAppState.java