Emulator Resources / Making AVI / Snes 9x / Linux
This page is part of the
Emulator resources / Making AVI page collection. Back to:
<<
Emulator Resources / Making AVI / Snes 9x<<
Emulator Resources / Making AVI<<
Emulator Resources
This page explains how to take a SMV file and convert it to a TASvideos.org quality AVI file suitable for publicaton.
This was written by me,
Bisqwit, and explains my method. There are certainly many ways to accomplish the same outcome.
Table of contents [
expand all] [
collapse all]
Common instructions
Acquiring and compiling Snes9x 1.43
- Download Snes9x 1.43 source code. (Direct link: http://www.lysator.liu.se/snes9x/1.43/snes9x-1.43-src.tar.gz)
- Extract source code in a directory of your choice.
- Patch the source code:
- Compile snes9x. (./configure; make)
- If it complains of missing dependencies (such as libraries that were not found), fulfill those dependencies and try again. I know it requires libgd2, for instance.
TODO: Add instructions and patch for snes9x 1.51 (doesn't differ much!)
Using this version of Snes9x
- Copy or symlink the Snes9x binary to the directory where you want to use Snes9x. Such as $HOME/nes/snes.
- Create the script for running Snes9x for the initial encoding pass. Example below.
#!/bin/sh
#
EXE=~/nes/snes/snes9x
#
# Which file do you want to place your audio and video in.
VIDEO_RESULT="`pwd`/test0.avi"
#
OPTS="-wip -stereo -r 7"
#
#
VIDEO="-ovc x264 -x264encopts crf=0:me=dia:turbo=2:frameref=4"
AUDIO="-oac mp3lame -lameopts mode=1:preset=64:aq=0"
VIDEO="$VIDEO -vf decimate=10:0:0:1 -nocache"
VIDEO="mencoder \
- -o '$VIDEO_RESULT' \
-mc 0 -aspect 4/3 \
NESVSETTINGS \
$VIDEO \
$AUDIO \
&> mencoder.log"
#
rm -f s.log
$EXE $OPTS \
-videologcmd "$VIDEO" \
-autodemo "$1" "$2"
Call this script as
RUN. Needless to say, you only need to create it once.
To create the initial encoding of the movie, simply execute this script like this:
./RUN moviefile.smv romfile.smc
The emulator will execute and produce a
test0.avi file. You can stop the emulator at the time of your choosing by hitting ESC; this terminates the recording.
The emulator window does not need to be "on top"; task switching is ok.
For the the instructions of what to do after the initial encoding, read
the common Linux-specific instructions.
Encoding logo
This version of the Snes9x patch 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 Snes9x recordings, which are of 256x224 resolution, it accesses the files from:
/home/bisqwit/povray/nesvlogov5/logo_256_224_fXXX.png, where XXX is the frame number. (For PAL, the resolution is 256x240 instead of 256x224.)
The path
/home/bisqwit/povray/nesvlogov5/ is hardcoded within the program. To change it, simply edit
nesvideos-piece.cc, find the setting, change it and recompile Dega.
The logo timing is determined by the following settings in
nesvideos-piece.cc
#define LOGO_LENGTH_OVERLAP (6.3-LOGO_LENGTH_HEADER)
#define LOGO_LENGTH_HEADER (1.0)
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 Snes9x movie even loads. The rest of it will be overlayed with the Snes9x movie.
EmulatorResources/MakingAVI/Snes9x/Linux last edited by
sgrunt on 2010-03-06 03:12:17
Page info and history | Latest diff | List referrers