page collection. Back to:
This page lists common requirements for making AVIs on Linux systems.
, and explains my method. There are certainly many ways to accomplish the same outcome.
The overall procedure for encoding a movie goes like this:
Step 0: Locate the ROM necessary for the playback of the movie, and download the movie file.
Create initial encoding
Step 1: Run a script that launches the emulator and runs the movie.
The script will instruct the emulator to launch MEncoder, to create an
initial encoding of the movie. That initial encoding is labelled as
test0.avi, and it is at a nearly lossless quality. It is not distributed or uploaded to the TASvideos site, but it is the basis for further encoding passes.
Create subtitles for the movie
Step 2: Run a script that reads the movie file and creates a template for the subtitles of this particular movie.
The script will read the frame count and authorship information from the movie file specified, and output a subtitle file (
test0.sub) in which that information is denoted.
Step 3: Edit the subtitles.
Adjust the timings of the subtitles, and correct the game name and authorship, as necessary.
For example, for
this particular movie, the subtitles created by the script are as follows:
{60}{180}{\c&HA0A0A0}Adelikat, Deign, Cardboard, JXQ|{\c&HA0FFA0}Played by ?|{\c&HA0FFA0}Playing time: 0:47:33.52|{\c&HA0A0A0}Rerecord count: 78061
{192}{312}{\c&HA0FFA0}This is a tool-assisted recording, played on an emulator.|For details, see {\c&HFF9955}http://TASvideos.org/
I changed them as follows:
{120}{240}{\c&HA0A0A0}Super Mario Bros 3 without flutes|{\c&HA0FFA0}Played by Adelikat, Deign, Cardboard, JXQ|{\c&HA0FFA0}Playing time: 0:47:33.52|{\c&HA0A0A0}Rerecord count: 78061
{252}{372}{\c&HA0FFA0}This is a tool-assisted recording, played on an emulator.|For details, see {\c&HFF9955}http://TASvideos.org/
The list of changes I did are:
- Made the subtitles appear 1 second later so they won't pathologically overlap with the encoding logo / game title.
- Moved the author names after the "Played by " text
- Added the movie description.
Adjusting the encoding script for the movie
Step 4: Specify encoding parameters
My actual encoding script (after the initial encoding) consists of two components:
- nesvideos.cfg, which configures the encoding
- ENCODE, a shell script that does the actual bulk of the encoding work.
A sample script looks like this:
BR=240
QSCALE=32
FILES="test0.avi"
OTHER="$OTHER -endpos 49:49"
FINAL="supermariobros3-tas-warpless-adelikat,deign,cardboard,jxq.avi"
In this file, I have determined that the target bitrate for the video will be about 240 kbit/s, and that only the first 49:49 of the movie will be encoded, discarding the rest.
Run the encoding
Step 5: Launch the encoding
After steps 0-4 are done, it is time to launch the encoder.
It is done by executing the
ENCODE script.
Do not click it open from some desktop icon. Instead, use your terminal (all of this so far should have been done in one terminal), go to the directory where your
nesvideos.cfg and
test0.avi files are, and execute the
ENCODE script by giving its relative path.
In my system the paths work as follows:
- $HOME/nes/fceu: This is the directory where the initial encoding takes place. It contains the ROM, the movie file, and the RUNEMU script.
- $HOME/nes/xgetimage: This is the directory where the subtitle generator (GENSUB) and encoder (ENCODE) scripts reside.
- $HOME/nes/xgetimage/smb3: This the directory where the bulk encoding work happens. After the initial encoding, I have moved the test0.avi into this directory.
So the work so far is like this:
cd ~/nes/fceu
## Acquire movie file:
wget http://tasvideos.org/fcm/123456.zip
unzip 123456.zip
rm 123456.zip
## Change the filename to be easier to handle
mv 'Weirdly named movie file.fcm' smb3u.fcm
## Run initial encoding
./RUN smb3u.fcm smb3u.nes
## Initial encoding done, start actual work
mv test0.avi ~/nes/xgetimage/smb3/
cd ~/nes/xgetimage/smb3
## Generate subtitles (note the relative path):
../GENSUB ~/nes/fceu/smb3u.fcm
joe test0.sub # Note: joe is an editor.
## Check encoding settings:
joe nesvideos.cfg # Use nano/joe/vi/emacs/whatever.
## Start encoding. Note the relative path.
../ENCODE
## Done!
After this work, check out the working directory. The newest AVI file in that directory should be your produced AVI file.
- If errors happened, diagnose and fix them and try again.
- If the AVI quality is unsatisfying, remedy the problem and try again.


EmulatorResources/MakingAVI/Common/Linux last edited by
Omega on 2008-05-11 23:18:56
Page info and history | Latest diff | List referrers