Files for 2.1b1 distribution.
[python/dscho.git] / Demo / sgi / video / video.doc
blob982c008f7e23617307a9fbf5ed2bc8dc39b4a48c
1         CMIF video tools
3 This document gives a quick introduction to some of the tools useful
4 for recording, editing and playing back video data in CMIF video
5 format. All the tools mentioned currently live in /ufs/guido/bin/sgi.
6 A description of the CMIF video file format can be found in
7 /ufs/jack/cmif-film.ms. 
9         Recording video
11 There are two tools to record video, Vrec and and Vrecb. Vrec does
12 continuous capture, but can capture at most 15 frames per second.
13 Vrecb uses burst capture, enabling it to capture all frames. It
14 captures to main memory, however, so it cannot handle long video
15 fragments. The following options are common to both programs:
17  -r rate        Capture one out of 'rate' frames. Default (and
18                 minimum) is 1 for Vrecb, 2 for Vrec. There are some
19                 caveats for recording PAL, see below.
20  -w width       Set initial window width (and height, implicitly).
21  -g bits        Create greyscale film in stead of 8-bit dithered color
22                 film. Allowable values for 'bits' are 2, 4 or 8.
23  -m             Create monochrome dithered film. These look horrible.
24  -M threshold   Create monochrome thresholded film with specified
25                 threshold (in range 0..255).
26  -G             Create 2-bit dithered greyscale film.
27  -f             Capture fields in stead of frames. The film is created
28                 in such a way that the picture will be suitably
29                 enlarged on playback, so aspect ratio, etc. are
30                 maintained.
31  -d             Drop fields if they would cause data from two video
32                 fields to be combined. See the section on PAL for more
33                 details. 
35 Options for Vrec:
36  -a             Record audio as well. You will have to twiddle audio
37                 and video later if you want lipsync playback.
38  -q queuesize   Set size of the video board circular buffer. A little
39                 experimentation with this may lead to more video being
40                 captured, but not always.
41  -P frames      Preallocate diskspace for 'frames' images. This may
42                 enable you to capture more frames.
44 Options for Vrecb:
45  -n number      Capture 'number' frames. Default is 60 (2 seconds).
47 Both programs accept a filename to store the video on (default
48 film.video) and Vrec also accepts an audio file name (default
49 film.aiff). When you want to record you press the left mouse button.
50 Vrec stops recording when you release the mouse button and Vrecb stops
51 after the predetermined number of frames have been recorded. During
52 recording the picture may look funny, but do not let this worry you,
53 the film will be ok.
55 After recording and saving, Vrec will print the deltas of the field
56 numbers recorded. A list of '4 4 4 4'... means that all possible
57 frames (one out of two) have been recorded. Vrecb will tell you how
58 many duplicate fields have been skipped. See below on PAL useage
59 again.
61         PAL caveats
63 The IndigoVideo board converts the incoming video signal to the 60Hz
64 (59.something, actually) display rate. All further operations,
65 including capture, are done with respect to display rate. This is
66 especially bothersome in the case of PAL video, since it means one out
67 of 5 frames will be duplicated. Together with the fact that, in
68 continuous capture, you can only capture every second frame this leads
69 to strange and wondrous effects. The frame numbers returned by the
70 video board (and displayed by Vrec) are display frame numbers, and so
71 bear only a very complicated (and probably non-deterministic) relation
72 to PAL frame numbers. For recording simple videos this is probably no
73 problem. You can use Vrec and try using -d to see which gives the best
74 result. On the other hand, if you need every frame and no duplicates
75 either you have to use Vrecb and supply the -d and -f option. This
76 will give you exactly the fields as they appeared on the PAL tape.
78         Video playback
80 The easiest way to play back a video is to use Vplay. Calling it with
81 an argument of -? will make it list all its options. A few options may
82 need a bit of explanation:
83  -M magnify     Magnify the images by the given factor. This still
84                 takes any magnification specified in the film (if it
85                 is a field film, for instance) in account.
86  -w width and
87  -h height      Normally the window will be the correct size for the
88                 film. You can set height and width, though, if you
89                 want the window to be bigger. This is especially
90                 useful if you want to record the film back to
91                 videotape, since you can playback in a window that is
92                 bigger than PAL size with a black background and you
93                 will have no distracting window-manager thingies on
94                 your videotape.
96         Video Editing
98 Vedit is a (very simple) video editor that allows you to select images
99 from the input movie and copy them to an output movie. Both input and
100 output films have a modest buffer that you can move around in.
102 Vaddcache takes a movie and adds a frame location cache to it. This
103 will make some other programs run faster.
105 rgb2video converts a set of SGI .rgb files to a movie.
107 There are a few programs that can do image format conversion on movies
108 (i.e. convert an 8-bit dithered RGB movie to a greyscale movie), but
109 nothing very complete yet. Look at Vcopy.py for more information.