Difference between revisions of "Convert a replay to a video"

From X-Moto
Jump to: navigation, search
Line 1: Line 1:
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://axufizyfe.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]=
 +
----
 +
=[http://axufizyfe.co.cc CLICK HERE]=
 +
----
 +
</div>
 
=== Extract pictures ===
 
=== Extract pictures ===
 
Since X-Moto 0.4.0, you can extract screenshots while playing/replaying.
 
Since X-Moto 0.4.0, you can extract screenshots while playing/replaying.
Line 35: Line 43:
 
* Turn it into an avi file:
 
* Turn it into an avi file:
  
mencoder "mf://DirNameForPics/*.jpg" -fps 20 -of avi -o output.avi -ovc lavc
+
mencoder &quot;mf://DirNameForPics/*.jpg&quot; -fps 20 -of avi -o output.avi -ovc lavc
  
 
* Glue several .avi files together:
 
* Glue several .avi files together:

Revision as of 03:07, 24 November 2010



This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page


CLICK HERE


Extract pictures

Since X-Moto 0.4.0, you can extract screenshots while playing/replaying.

At command line (or in a .bat) you can use the following options:

  • --videoRecording : enable video recording
  • --videoRecordingSizeDivision DIVISION : Change video size (1=full, 2=50%, 4=25%)
  • --videoRecordingSizeFramerate FRAMERATE : change framerate

Example:

xmoto --videoRecording myvideo1
or
xmoto -r replay_555.rpl --videoRecording myvideo1 --benchmark

Note that in this example, -r is used so that the game directly starts the replay and --benchmark make X-Moto close automatically once the replay is ended. You don't need these options, you can choose to start xmoto normally, then go into the replay tab, and choose a replay. X-Moto will start to record the video only when the replay will be started. You can even close the X-Moto window when you want (the end of the replay will not be recorded).

This creates a directory called ~/.xmoto/Video/myvideo1 where you can find all the pictures taken according to the framerate and size. The is a pictures.lst file which lists all the files.

Convert frames to a video

To convert the frames, just read xmoto.log : you can find in it the command you've to run to convert the frames to the video.

Example:

transcode -i ~/.xmoto/Video/myvideo1 -x imlist,null -y xvid,null -f 20 -g 800x600 \
--use_rgb -z -o ~/.xmoto/Video/myvideo1.avi -H 0 # -w 500
  • transcode is required to run this command, but you can use any video tool to build the video
  • -w can be used to change the bitrate, and then, make a smaller video.

Using Mplayer/mencoder

to make my youtube video I did the following:

  • Dump a replay to jpegs:

xmoto -r ~/.xmoto/Replays/replayname.rpl --videoRecording DirNameForPics --videoRecordingSizeDivision 1

  • Turn it into an avi file:

mencoder "mf://DirNameForPics/*.jpg" -fps 20 -of avi -o output.avi -ovc lavc

  • Glue several .avi files together:

mencoder -oac copy -ovc copy -o output.avi input1.avi input2.avi

  • Add sound:

mencoder -oac copy -ovc copy -o output.avi -audiofile /Path/to/the/file/file.mp3 input.avi