Mercurial > jmeCapture
diff README @ 61:76581e11fb72
readme is UP
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Dec 2011 23:49:14 -0600 |
parents | 42bbb176b90f |
children |
line wrap: on
line diff
1.1 --- a/README Sat Dec 03 23:06:01 2011 -0600 1.2 +++ b/README Sat Dec 03 23:49:14 2011 -0600 1.3 @@ -1,5 +1,8 @@ 1.4 ======Capture Audio/Video to a File====== 1.5 1.6 +<note>A/V recording is still in development. It works for all of jMonkeyEngine's test cases. If you experience any problems or 1.7 +of something isn't clear, please let me know. -- bortreb</note> 1.8 + 1.9 So you've made your cool new JMonkeyEngine3 game and you want to 1.10 create a demo video to show off your hard work. Or maybe you want to 1.11 make a cutscene for your game using the physics and characters in the 1.12 @@ -8,14 +11,15 @@ 1.13 audio as a result. A better way is to record video and audio directly 1.14 from the game while it is running. 1.15 1.16 +<note tip>Combine this method with jMonkeyEngine's [[:jme3:advanced:Cinematics]] feature to record high-quality game trailers!</note> 1.17 1.18 ===== Simple Way ===== 1.19 1.20 -If all you just want to record video at 30fps with no sound, then look 1.21 +First off, if all you just want to record video at 30fps with no sound, then look 1.22 no further then jMonkeyEngine3's build in ''VideoRecorderAppState'' 1.23 class. 1.24 1.25 -Add the following code to your simpleInitApp() method. 1.26 +Add the following code to your ''simpleInitApp()'' method. 1.27 1.28 <code java> 1.29 stateManager.attach(new VideoRecorderAppState()); //start recording 1.30 @@ -36,6 +40,7 @@ 1.31 solution for doing this already made for you here: 1.32 1.33 http://www.aurellem.com/releases/jmeCapture-latest.zip 1.34 + 1.35 http://www.aurellem.com/releases/jmeCapture-latest.tar.bz2 1.36 1.37 Download the archive in your preferred format, extract, 1.38 @@ -46,8 +51,8 @@ 1.39 1.40 To capture video and audio you use the 1.41 ''com.aurellem.capture.Capture'' class, which has two methods, 1.42 -''captureAudio'' and ''captureVideo'', and the 1.43 -''com.aurellem.capture.IsoTimer class'', which sets the audio and 1.44 +''captureAudio()'' and ''captureVideo()'', and the 1.45 +''com.aurellem.capture.IsoTimer'' class, which sets the audio and 1.46 video framerate. 1.47 1.48 The steps are as simple as: 1.49 @@ -73,27 +78,27 @@ 1.50 video will be recorded according to the following rules: 1.51 1.52 1.) (Preferred) If you supply an empty directory as the file, then 1.53 - the video will be saved as a sequence of .png files, one file per 1.54 - frame. The files start at 0000000.png and increment from there. 1.55 - You can then combine the frames into your preferred 1.56 - container/codec. If the directory is not empty, then writing 1.57 - video frames to it will fail, and nothing will be written. 1.58 +the video will be saved as a sequence of .png files, one file per 1.59 +frame. The files start at 0000000.png and increment from there. 1.60 +You can then combine the frames into your preferred 1.61 +container/codec. If the directory is not empty, then writing 1.62 +video frames to it will fail, and nothing will be written. 1.63 1.64 2.) If the filename ends in ".avi" then the frames will be encoded as 1.65 - a RAW stream inside an AVI 1.0 container. The resulting file 1.66 - will be quite large and you will probably want to re-encode it to 1.67 - your preferred container/codec format. Be advised that some 1.68 - video payers cannot process AVI with a RAW stream, and that AVI 1.69 - 1.0 files generated by this method that exceed 2.0GB are invalid 1.70 - according to the AVI 1.0 spec (but many programs can still deal 1.71 - with them.) Thanks to Werner Randelshofer for his excellent work 1.72 - which made the AVI file writer option possible. 1.73 +a RAW stream inside an AVI 1.0 container. The resulting file 1.74 +will be quite large and you will probably want to re-encode it to 1.75 +your preferred container/codec format. Be advised that some 1.76 +video payers cannot process AVI with a RAW stream, and that AVI 1.77 +1.0 files generated by this method that exceed 2.0GB are invalid 1.78 +according to the AVI 1.0 spec (but many programs can still deal 1.79 +with them.) Thanks to Werner Randelshofer for his excellent work 1.80 +which made the AVI file writer option possible. 1.81 1.82 3.) Any non-directory file ending in anything other than ".avi" will 1.83 - be processed through Xuggle. Xuggle provides the option to use 1.84 - many codecs/containers, but you will have to install it on your 1.85 - system yourself in order to use this option. Please visit 1.86 - http://www.xuggle.com/ to learn how to do this. 1.87 +be processed through Xuggle. Xuggle provides the option to use 1.88 +many codecs/containers, but you will have to install it on your 1.89 +system yourself in order to use this option. Please visit 1.90 +http://www.xuggle.com/ to learn how to do this. 1.91 1.92 Note that you will not hear any sound if you choose to record sound to 1.93 a file. 1.94 @@ -145,9 +150,9 @@ 1.95 1.96 ==== How it works ==== 1.97 1.98 -A standard JME3 application that extends =SimpleApplication= or 1.99 -=Application= tries as hard as it can to keep in sync with 1.100 -/user-time/. If a ball is rolling at 1 game-mile per game-hour in the 1.101 +A standard JME3 application that extends ''SimpleApplication'' or 1.102 +''Application'' tries as hard as it can to keep in sync with 1.103 +//user-time//. If a ball is rolling at 1 game-mile per game-hour in the 1.104 game, and you wait for one user-hour as measured by the clock on your 1.105 wall, then the ball should have traveled exactly one game-mile. In 1.106 order to keep sync with the real world, the game throttles its physics 1.107 @@ -164,7 +169,7 @@ 1.108 (video-time) syncs with user-time. To continue the analogy, if we 1.109 recorded the ball rolling at 1 game-mile per game-hour and watched the 1.110 video later, we would want to see 30 fps video of the ball rolling at 1.111 -1 video-mile per /user-hour/. It doesn't matter how much user-time it 1.112 +1 video-mile per //user-hour//. It doesn't matter how much user-time it 1.113 took to simulate that hour of game-time to make the high-quality 1.114 recording. 1.115 1.116 @@ -497,10 +502,7 @@ 1.117 } 1.118 </code> 1.119 1.120 -<iframe width="420" height="315" 1.121 - src="http://www.youtube.com/embed/oCEfK0yhDrY" 1.122 - frameborder="0" allowfullscreen> 1.123 -</iframe> 1.124 +{{http://www.youtube.com/v/oCEfK0yhDrY?.swf?400×333}} 1.125 1.126 ===== More Information ===== 1.127 1.128 @@ -510,6 +512,7 @@ 1.129 All source code can be found here: 1.130 1.131 http://hg.bortreb.com/audio-send 1.132 + 1.133 http://hg.bortreb.com/jmeCapture 1.134 1.135 More information on the modifications to OpenAL to support multiple