Emulator Resources / Making AVI / FCEUX / Linux
This page is part of the
Emulator resources / Making AVI page collection. Back to:
<<
Emulator Resources / Making AVI / FCEUX<<
Emulator Resources / Making AVI<<
Emulator Resources
This page explains how to take a FM2 file and convert it to a TASvideos.org quality AVI file suitable for publicaton.
The most part of this was written by
Bisqwit and updated for FCEUX by me, ShinyDoofy. There are certainly many ways to accomplish the same outcome.
Table of contents [
expand all] [
collapse all]
Common instructions
Acquiring and compiling FCEUX
- Download FCEUX source code from here: http://prdownloads.sourceforge.net/fceultra/fceux-2.1.0a.src.tar.bz2?download
- Extract source code in a directory of your choice.
- FCEUX does not use autotools (./configure && make), but SCons. So be sure to have it installed before expecting anything else to work.
- Compile FCEUX and activate avi creation support . (scons CREATE_AVI=1)
- If you've got a multiprocessor system, you can speed up compilation by adding "-j3"
- FCEUX usually should not need many non-standard dependencies. Support for Lua is optional and you won't need zenity for creating AVIs either.
- If it still complains about missing dependencies (such as libraries that were not found), fulfill those dependencies and try again.
FCEUX is supposed to work on both 32bit and 64bit systems.
Using this version of FCEUX
- Copy the FCEUX binary to the directory where you want to use FCEUX. Such as $HOME/nes/fceux.
- Create the script for running FCEUX for the initial encoding pass. Example below.
#!/bin/sh
#
EXE=~/nes/fceux/fceux
#
# Which file do you want to place your audio and video in.
VIDEO_RESULT="`pwd`/test0.avi"
#
SL="--slstart 0 --slend 239"
#
#
VIDEO="-ovc x264 -x264encopts crf=0:me=dia:turbo=2:frameref=4"
AUDIO="-oac mp3lame -lameopts mode=3:preset=60:aq=0"
VIDEO="$VIDEO -vf -nocache"
VIDEO="mencoder \
- -o '$VIDEO_RESULT' \
-mc 0 -aspect 4/3 \
NESVSETTINGS \
$VIDEO \
$AUDIO"
#
rm -f s.log
$EXE $SL --xscale 1 --yscale 1 --special 0 \
--pal 0 \
--soundq 1 --sound 1 --soundrate 48000 --volume 150 --trianglevol 256 --square1vol 256 --square2vol 256 --noisevol 256 --pcmvol 256 --mute 1 \
--nospritelim 1 \
--videolog "$VIDEO" \
$*
Call this script as
RUN. Needless to say, you only need to create it once. If you're curious as to what each option does, call your FCEUX binary from a terminal and read up on it. You might want to set --mute to 0. Otherwise, there will be no sound when recording the AVI file. You can toggle the sound by pressing the Del key to tune in on credits screens to check for repeating music and the like.
To create the initial encoding of the movie, simply execute this script like this:
./RUN --playmov moviefile.fm2 romfile.nes
The emulator will execute and produce a
test0.avi file. You can stop the emulator at the time of your choosing by closing its windows or pressing the Esc key; this terminates the recording.
The emulator window does not need to be "on top"; task switching is perfectly fine.
For the instructions of what to do after the initial encoding, read
the common Linux-specific instructions.
Encoding logo
This version of FCEUX uses the
nesvideos-piece mechanism for embedding the logo animation into the movie. It works by reading a sequence of PNG files from a predetermined location and overlaying them with the movie image.
For FCEUX recordings, which are of 256x224 resolution, it accesses the files from:
/home/you/yourlogo/logo_256_224_fXXX.png, where XXX is the frame number. (For PAL, the resolution is 256x240 instead of 256x224.)
The path
/home/you/yourlogo/ is hardcoded within the program. To change it, simply edit
src/drivers/videolog/nesvideos-piece.cpp and change the desired length of your logo (line 40) and your path (line 857). After changing everything the way you want it, recompile FCEUX with the same command you used to initially compile it.
The logo timing is determined by the following settings in
nesvideos-piece.cpp
#define LOGO_LENGTH_HEADER (1.0)
#define LOGO_LENGTH_OVERLAP (6.3-LOGO_LENGTH_HEADER)
This instructs the emulator that the total length of the logo animation is up to 6.3 seconds, and that the first 1.0 seconds of it will be displayed before the FCEUX movie even loads. The rest of it will be overlayed with the FCEUX movie.
EmulatorResources/MakingAVI/FCEUX/Linux last edited by
OmnipotentEntity on 2009-09-22 16:13:33
Page info and history | Latest diff | List referrers