andrew ruder :: rpl2mpg

Xmoto Replay to Mpeg Conversion (rpl2mpg) Tags: none

On Saturday, February 7th, my life would change forever. Why? One word: xmoto. My friends showed it to me, and I could play that game for hours.

Later that night, I was starting to get halfway decent, and I thought it might be nice to be able to display my awesome replays to other people. Lots of reading, hacking, and copy/pasting later, rpl2mpg was born. It can convert a saved replay to an mpeg file. Sample?

How to build rpl2mpg (only tested on Linux):

  • First, download a copy of Xmoto CVS and build/install this. Instructions for anonymous CVS access are here.
  • Next, download and install a fairly recent ffmpeg. Instructions for that are at their page.
  • Next, do a make clean. You need a clean copy of the source code.
  • Apply my patch. patch -p0 < rpl2mpg.patch should do the trick.
  • Remake the autoconf files. On my system, I use
    aclocal-1.7 -I config && automake-1.7 --gnu --add-missing --copy && autoconf
    to do this.
  • Run ./configure
  • make ( do not run make install )
  • Now, to convert a replay to an mpeg, simply type:
    src/xmoto  
    Like for example, I used:
    src/xmoto cow1 xmoto.mpg
  • The program will start and begin conversion. Please read the quirks section below for an important note about not covering up the window while it converted.

Quirks:

  • The conversion apparently picks up everything in the screen estate of the xmoto screen. In other words, you cover the screen with a web browser, and you'll get a mpeg of you browsing the web. Neat! ;)
  • This is a giant hack.

Have fun!

Posted on Feb 7, 2006 12:32

This website and content therein Copyright © 2008 by Andrew Ruder