# HG changeset patch # User Robert McIntyre # Date 1322977754 21600 # Node ID 76581e11fb729f687ec2cb71b73eade6dfd3ae96 # Parent 42bbb176b90fb5e860ffff41912127eeecbe7a13 readme is UP diff -r 42bbb176b90f -r 76581e11fb72 README --- a/README Sat Dec 03 23:06:01 2011 -0600 +++ b/README Sat Dec 03 23:49:14 2011 -0600 @@ -1,5 +1,8 @@ ======Capture Audio/Video to a File====== +A/V recording is still in development. It works for all of jMonkeyEngine's test cases. If you experience any problems or +of something isn't clear, please let me know. -- bortreb + So you've made your cool new JMonkeyEngine3 game and you want to create a demo video to show off your hard work. Or maybe you want to make a cutscene for your game using the physics and characters in the @@ -8,14 +11,15 @@ audio as a result. A better way is to record video and audio directly from the game while it is running. +Combine this method with jMonkeyEngine's [[:jme3:advanced:Cinematics]] feature to record high-quality game trailers! ===== Simple Way ===== -If all you just want to record video at 30fps with no sound, then look +First off, if all you just want to record video at 30fps with no sound, then look no further then jMonkeyEngine3's build in ''VideoRecorderAppState'' class. -Add the following code to your simpleInitApp() method. +Add the following code to your ''simpleInitApp()'' method. stateManager.attach(new VideoRecorderAppState()); //start recording @@ -36,6 +40,7 @@ solution for doing this already made for you here: http://www.aurellem.com/releases/jmeCapture-latest.zip + http://www.aurellem.com/releases/jmeCapture-latest.tar.bz2 Download the archive in your preferred format, extract, @@ -46,8 +51,8 @@ To capture video and audio you use the ''com.aurellem.capture.Capture'' class, which has two methods, -''captureAudio'' and ''captureVideo'', and the -''com.aurellem.capture.IsoTimer class'', which sets the audio and +''captureAudio()'' and ''captureVideo()'', and the +''com.aurellem.capture.IsoTimer'' class, which sets the audio and video framerate. The steps are as simple as: @@ -73,27 +78,27 @@ video will be recorded according to the following rules: 1.) (Preferred) If you supply an empty directory as the file, then - the video will be saved as a sequence of .png files, one file per - frame. The files start at 0000000.png and increment from there. - You can then combine the frames into your preferred - container/codec. If the directory is not empty, then writing - video frames to it will fail, and nothing will be written. +the video will be saved as a sequence of .png files, one file per +frame. The files start at 0000000.png and increment from there. +You can then combine the frames into your preferred +container/codec. If the directory is not empty, then writing +video frames to it will fail, and nothing will be written. 2.) If the filename ends in ".avi" then the frames will be encoded as - a RAW stream inside an AVI 1.0 container. The resulting file - will be quite large and you will probably want to re-encode it to - your preferred container/codec format. Be advised that some - video payers cannot process AVI with a RAW stream, and that AVI - 1.0 files generated by this method that exceed 2.0GB are invalid - according to the AVI 1.0 spec (but many programs can still deal - with them.) Thanks to Werner Randelshofer for his excellent work - which made the AVI file writer option possible. +a RAW stream inside an AVI 1.0 container. The resulting file +will be quite large and you will probably want to re-encode it to +your preferred container/codec format. Be advised that some +video payers cannot process AVI with a RAW stream, and that AVI +1.0 files generated by this method that exceed 2.0GB are invalid +according to the AVI 1.0 spec (but many programs can still deal +with them.) Thanks to Werner Randelshofer for his excellent work +which made the AVI file writer option possible. 3.) Any non-directory file ending in anything other than ".avi" will - be processed through Xuggle. Xuggle provides the option to use - many codecs/containers, but you will have to install it on your - system yourself in order to use this option. Please visit - http://www.xuggle.com/ to learn how to do this. +be processed through Xuggle. Xuggle provides the option to use +many codecs/containers, but you will have to install it on your +system yourself in order to use this option. Please visit +http://www.xuggle.com/ to learn how to do this. Note that you will not hear any sound if you choose to record sound to a file. @@ -145,9 +150,9 @@ ==== How it works ==== -A standard JME3 application that extends =SimpleApplication= or -=Application= tries as hard as it can to keep in sync with -/user-time/. If a ball is rolling at 1 game-mile per game-hour in the +A standard JME3 application that extends ''SimpleApplication'' or +''Application'' tries as hard as it can to keep in sync with +//user-time//. If a ball is rolling at 1 game-mile per game-hour in the game, and you wait for one user-hour as measured by the clock on your wall, then the ball should have traveled exactly one game-mile. In order to keep sync with the real world, the game throttles its physics @@ -164,7 +169,7 @@ (video-time) syncs with user-time. To continue the analogy, if we recorded the ball rolling at 1 game-mile per game-hour and watched the video later, we would want to see 30 fps video of the ball rolling at -1 video-mile per /user-hour/. It doesn't matter how much user-time it +1 video-mile per //user-hour//. It doesn't matter how much user-time it took to simulate that hour of game-time to make the high-quality recording. @@ -497,10 +502,7 @@ } - +{{http://www.youtube.com/v/oCEfK0yhDrY?.swf?400×333}} ===== More Information ===== @@ -510,6 +512,7 @@ All source code can be found here: http://hg.bortreb.com/audio-send + http://hg.bortreb.com/jmeCapture More information on the modifications to OpenAL to support multiple