Mercurial > jmeCapture
view src/com/aurellem/capture/examples/HelloVideoRecording.java @ 71:2c50a0c99715
remove xuggle, since I will never use it.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 10 Mar 2014 18:54:35 -0400 |
parents | afc437f637bd |
children |
line wrap: on
line source
1 package com.aurellem.capture.examples;3 import java.io.File;4 import java.io.IOException;6 import jme3test.helloworld.HelloLoop;8 import com.aurellem.capture.Capture;9 import com.aurellem.capture.IsoTimer;10 import com.jme3.app.Application;12 /** Recording Video from your Application is simple. If all you want13 * to do is record Video, then follow the following steps.14 *15 * 1.) Set the Application's timer to an IsoTimer. The framerate of16 * the IsoTimer will determine the framerate of the resulting video.17 *18 *19 *20 * 2.) Call Capture.captureVideo(yourApplication, target-file) before21 * calling yourApplication.start()22 *23 * That's it! If you have any comments/problems, please PM me on the24 * jMonkeyEngine forms. My username is bortreb.25 *26 * @author Robert McIntyre27 */28 public class HelloVideoRecording {30 public static void main(String[] ignore) throws IOException {31 Application app = new HelloLoop();32 File video = File.createTempFile("JME-simple-video", ".avi");33 app.setTimer(new IsoTimer(60));34 Capture.captureVideo(app, video);35 app.start();36 System.out.println(video.getCanonicalPath());37 }38 }