Recording Animations To 3/4" U-matic Video Tape

A sequence of images that make up an animation can be recorded to the Sony U-matic Videocassette Recorder located in Room MS617. It is run off the Iris Indigo named ij which it sits beside. Note that you do not have to be on the console to record to or stripe tapes - both can be performed remotely. Since these tasks take up some amount of CPU, be sure that it will not be a problem to whomever is on the console. It is a good idea to schedule your recording sessions for overnight since they can easily take up several hours.


Switching things On

To get pictures from the indigo to the TV you must switch on the Lyon-Lamb box and the two video recorders. If you still do not get a picture check the VHS recorder is getting its input from line 1 (there should be a L1 on the right-hand side of the display - if not push the 'Input Select' button until L1 is displayed).

Recording Directly from the Screen

To record images directly from the screen for interactive demos use the videoout program to display the screen on the TV. So that the time code on the video is not lost the video must be 'inserted' onto the tape. Using the shuttle or jog nob to position the tape at the required place. Then push the preroll button, this will place the video in pause mode, press the 'Insert - Video' button and play and edit buttons. When you are ready to start recording press the pause button. The green light above the play button will light 5 seconds later when the video recorder starts to record.

Video Tapes

The Sony U-matic Videocassette Recorder uses standard 3/4" U-matic tapes and 3/4" U-matic SP tapes. The second is of a more professional quality, but also more expensive. The first can be bought from CommMedia on campus and is pretty good for most purposes.

Striping New Video Tapes

Before images can be recorded onto a video tape, it must be initialised with SMPTE time codes. These time codes are used by the software and hardware to determine exactly where images should be recorded. The process of placing these codes is called striping the tape.

To begin the striping, make sure that the Sony recorder switches are set as follows:

The settings of all other switches should not matter. Then insert your U-matic video tape and set it to the position that you want to start striping from. Usually you will just want to make sure the tape is completely rewound. Then run the program nstripe (found in ~jungle/iris/bin). If given an integer as a command line parameter, the program will first record (approximately) that many seconds of colorbars then switch to a black screen. The striping process begins writing at a negative time code so that in the future you can begin recording at time 0 and there will be room for a pre-roll. Since this is basically a normal record process (with the addition of time code writing), it will take the same number of minutes to stripe a tape as the duration of the tape. I see no reason not to stripe an entire tape. If you wish to abort the striping, flip the REMOTE/LOCAL switch to LOCAL and hit STOP.

When the striping process has finished and the tape has been fully rewound (done automatically if the whole tape is striped), you can set the REMOTE/LOCAL switch to LOCAL, eject your tape, and shut off all harware.

Image Formats and Sizes

Before you begin to record an actual animation, the images that make up the frames of the animation must be created. They may be in SGI RGB format (note: the GraphicsLand RAS is not yet supported). The recommended size for each image is 640x480 (NTSC size). If your images are of a larger size, they will be cut off in the recording - only an NTSC sized portion will be recorded. If your images are smaller, they will be centred.

Galileo Board Setup

As a general rule, the video signal generated by the Galileo Board should be okay. However, if images appear greyscale or uncentred on the TV, the following procedure will have to performed:

Previewing Images

To see what your images will look like recorder, you can use the vpaste command. It takes a single SGI RGB image as a parameter and displays it on the TV (make sure the Mini Vas, U-matic VCR, and VHS VCR are turned on). The optional -f command line parameter may be given before the image name and it will cause the image to be filtered for NTSC (see NTSC Filtering).

Video Scripts

The video recording software is told what images to record in what order at what position on the video tape by means of a script. This script is a simple text file with a sequence of new-line separated directives to the recording software. The directive are ``executed'' one by one in the order in which they are encountered. The different directives are as follows:

This code indicates what type of image file is being used. The only possible value at this time is RGB for SGI RGB (the code for GraphicsLand RAS is RAS, but that format is not yet supported). The value is set by a simple assignment: file_format = RGB. The default is RGB.
This directive indicates what frame number to start recording at. It is set with a simple assignment: start = "100". The value must be in quotes and may either be a number of frames (from the start of the tape) or a SMPTE code, such as "00:20:19:05 (hours:minutes:seconds:frames). A complete SMPTE need not be specified (ie: just the seconds and frames may be listed, in which case the hours and minutes are assumed to be 0). This directive may be specified multiple times to change the location of recording.
This code indicates the directory in which the images are located. The directory name must be enclosed in quotes: scene = "/home/anim/myanim".
This directive states how many video frames each animation image should be recorded for. The statement: clicks = 2 indicates that each images should be recorded for two frames. There are 30 frames per second.
Record a black image for clicks frames.
Record colorbars for clicks frames.
image name
A single quoted image name such as "title.rgb" tells the video software to record that image from the scene directory for clicks frames.
image name loop start until end step stepsize
This is the loop construct. It will record a set of numbered images in sequence. The start value is the start image number, the end value is the end image number, and the stepsize value is the step by which the counter should be incremented. The stepsize is optional and may be negative to record a sequence of image whose image numbers decrease in size. The image name is a quoted file name using C program format codes to include the number. Therfore "image.%d loop 1 until 3 will record the images image.1, image.2, and image.3 from the scene directory for clicks frames. "image.%02d" loop 1 until 5 step 2 will record the images image.01, image.03, and image.05.
This directive indicates that a certain number of frames on the tape should be skipped. The statement: skip = 60 indicates that 60 frames or 2 seconds should be skipped and recording should continue after that point.
A # at the start of a line indicates that this line is a comment and therefore should be ignore by the video software.

Since the sequence of directive are ``executed'' in order, one can set up a complex script which records various sequences of images with differing clicks values at different positions. Here is a sample script:

# Start recording at SMPTE code 00:03:20:00 (this is frame #6000)
start = "3:20:00"

# Record each image for 2 frames (the animation will seem to run at 15
# frames/sec. instead of the regular 30 frames/sec.)
clicks = 2

# Set the directory in which to look for the title image.
scene = "/home/anim/myanim/title"

# record an inidividual frame

# Set the directory in which to look for the animation images.
scene = "/home/anim/myanim/frames"

# Record a series of images.
# This will record the files: scene1.01.rgb, scene1.02.rgb ... scene1.10.rgb
"scene1.%02d.rgb" loop 1 until 10 step 1

Note: The images files themselves may be compressed (using the compress or gzip programs), and the fact that the files have a .Z or .gz extention should be ignored by the script. The video software is smart enough to look for the extension and uncompress the files automatically.

Recording an Animation

The program which reads your script and causes your images to be recorded on tape is called nvideo and is located in ~jungle/iris/bin. Before actually beginning the recording, some setup is required. The switches on the Sony recorder should be set as follows:

The only difference between this and the setup for striping is the value of MODE SELECT, and therefore, there is no reason to ever change any of the other switches (except for REMOTE/LOCAL, of course).

Now, place your video tape in the recorder. There is no need to advance or rewind the tape to the location in which recording should begin, since nvideo will use the time codes on the tape and the start directive to position the tape correctly. Then execute the following command:

% nvideo script

Where script is the name of your script file. nvideo read in the script and perform the recording. While recording, nvideo will print out status information. When the recording is finished, simply set the REMOTE/LOCAL switch to LOCAL and you can view your recorded animation. With the current setup, approximately 400 individual frames can be recorded per hour.

The nvideo command must be run on ij, but it is not necessessary to be logged onto the console. It is also not necessary to remain logged in while the recording is in process. Although nvideo currently eats up quite a few cpus, it is better to log out so that another console is available for other's use.

The following command line options are supported (list them before the name of the script file when executing):

Display a long help message describing command line arguements and the script file format
Run the NTSC filter on each SGI RGB image before recording. See NTSC Filtering.
-s timecode
Tell the program to ignore all record commands which would start recording before the given time code (SMPT or frames)
-e timecode
Tell the program to ignore all record commands which would start recording after the given time code (SMPT or frames)

The last two arguement are useful for re-recording particular frames from a scriptfile. Fixes can be performed without editing the file.

Remember to turn off all equipment when finished recording.

NTSC Filtering

Computer RGB images do not always look good when converted to NTSC. This has to do with the differnt formats of the signals. To help fix this problem, a filter have been built into the vpaste and nvideo programs (see entries on each for enabling instructions). Note that this does not always make the image look better or is always necessary. Although the filtering will tend to reduce the ``flickering'' of the images, this can usually only be seen when there are large areas of colour. Also, the filtering will tend to bleed the images somewhat, reducing sharp edges. Finally, it will take the programs a few seconds to perform the actual filtering, so a recording session will take longer with filtering than without. Use the vpaste program to compare your images with and without the filtering to decide what will look best.

Recovering from System Upgrades

Whenever the operating system on ij is upgraded, there are generally two things that must be done to restore the machine to its previous state in regards to video recording. The first is that it must be set up so that the X server is not reset when a user logs off of the console. If the X server is reset, it re-initialises the video hardware causing any nvideo program to crash. Second, the permissions on /dev/ttyd1 must be set for both reading and writing in order to enable commands to be sent to and responses to be received from the video recorder. Both of these tasks must be performed by a system administrator (ie: someone logged in as root)

Switches Under the Control Panel

There are four switches behind the Sony recorder control panel. They should NEVER be changed. The proper settings are:

Last updated on August 12, 1996 by Mark Hammel (