Deleted Pages / Emulator Resources / Making AVI / Famtasia / Linux
This page is deleted and archived - not a part of the current site.
Use the “page info and history” feature to peer into past versions of the page.
See
DeletedPages for details.
This page is part of the
Emulator resources / Making AVI page collection. Back to:
<<
Deleted Pages / Emulator Resources / Making AVI / Famtasia<<
Deleted Pages / Emulator Resources / Making AVI<<
Deleted Pages / Emulator Resources<<
Deleted Pages
This page explains how to create AVI files from Famtasia movies
when you have a GNU/Linux operating system (any flavor will do).
Table of contents [
expand all] [
collapse all]
Program requirements
- You need Famtasia.
- See Famtasia.
And of course, you need Wine to run Famtasia. Installing Wine is not in the scope of this document.
- You need MEncoder.
- You can find it at: http://mplayerhq.hu/ or install from a package usually called "mplayer".
Standard MPlayer versions (non-CVS) always include libavcodec. If you want to use xvid, you need to install it separately and ensure MPlayer will support it.
- You need LAME.
- You can download it at: http://lame.sourceforge.net/ or install from a package usually called "lame".
- You need xgetimage-xpatch.
- You can download it from: http://bisqwit.iki.fi/source/xgetimagexpatch.html
The Famtasia version you need MUST have these patches:
It must NOT have these patches:
- Windows fix
- AVI recording
All the other settings, including "240 scanlines", are up to you to decide.
Configuring Famtasia
These settings are vital for Famtasia recording to work correctly:
[Speed]
DrawFrame=1
ExecSpeed=100
Occupation=1
AutoFrame=0
[Sound]
SamplingRate=44100
NoReverb=1
You can set them via the GUI or by editing the configuration file directly.
Ensure that the window is
not scaled.
Stop the emulation and select "x1" from the Display submenu under the Config menu.
Configuring xgetimage-xpatch
The
xgetimage.cfg file I use when recording
from Famtasia looks like this:
# XGETIMAGE CONFIGURATION FILE
#
[rate]
BITRATE = 240000
FPS = 60
DELAY = 80%
LAVCOPTS = "vcodec=mpeg4:dia=-3:predia=-3:preme=2:v4mv:vb_strategy=1:keyint=900:vqscale=1"
[source]
WINDOW=""
XOFFSET=0
YOFFSET=0
[target]
# Where to place the result
OUTPUTFILE = "test0.avi"
[dummy]
dummy=1
Use it as-is or edit it to suit your needs / preferences.
Besides mpeg4, you can try other codecs such as ffv1 or huffyuv.
Read the MPlayer manual for details.
Creating the script to run it all
For running Famtasia, I use this kind of shell script:
RUNFAM
#!/bin/sh
# P = the directory where xpatch.so can be found in
P="`pwd`/xgetimage"
# Where is your Famtasia executable?
#EXE=fam/FAMBLIP.EXE
#EXE=fam/FAM60.EXE
#EXE=fam/famdump.exe
EXE=fam/famdump_60.exe
# Where is your Wine?
#WINE=/usr/lib/wine/bin/wine-pthread
WINE=wine
# Which file do you want to place your audio in.
AUDIO_RESULT=audiolog.mp3
# Do some preparing for running Wine.
rm -rf /tmp/.wine-*
export __MSVCRT_HEAP_SELECT=__GLOBAL_HEAP_SELECTED,2
#export LD_LIBRARY_PATH=/usr/lib/wine/lib
#export WINEDLLPATH="$LD_LIBRARY_PATH"
export LD_PRELOAD="$P/xpatch.so"
# Initialize the pipe where audio will come from
rm -f s.log
mkfifo s.log
mkfifo s2.log
bufferprog < s.log | resample mb m > s2.log &
lame -rx -m m -b 128 -q 2 s2.log "$AUDIO_RESULT" &
$WINE $EXE $*
rm -f s.log s2.log
# Fix the ownership of the files - doesn't matter if it fails.
chown bisqwit test0.avi "$AUDIO_RESULT"
I call the script
RUNFAM.
Again, you can edit it to suit your setup and needs.
Running Famtasia
To run Famtasia, start your newly created shell script.
Example:
./RUNFAM rockman.nes
I prefer to do this as root, but I can not recommend
it to others due to security reasons.
When Famtasia starts up, immediately open the Edit menu and
select Play movie and load the movie you want to play.
(Immediately because the video recording starts as soon
as the emulator window appears.)
When Famtasia is done playing the movie, exit Famtasia by normal
means.
Now you should have
test0.avi and
audiolog.mp3 on your disk.
Names may vary if you have changed the script/config files.
Note that the patched Famtasia is lag-tolerant.
It doesn't matter if you watch anime while recording the movie.
The sound may chop and Famtasia may complain something
about wave headers, but it does not affect the recording.
The encoding environment
The rest of this documentation is at the
Linux AVI scripts
page, because it's common in all the different emulators.
Author