Convert a replay to a video

From X-Moto
Revision as of 12:46, 22 January 2008 by Nadenislamarre (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.