blob: 071ca9b4c96c14e6c6ca4f6cd2e5fbfcf8e67c92 [file] [log] [blame]
Guido van Rossum7268c931992-08-18 21:11:18 +00001CMIF video tools
2================
Guido van Rossume4bddea1991-10-30 11:52:48 +00003
Guido van Rossum7268c931992-08-18 21:11:18 +00004This directory contains Python and C programs to manipulate files
5containing digitized video in the "CMIF video format".
6
7
8History
9-------
Guido van Rossumb2e82281992-08-18 16:01:19 +000010
11We started this in October 1991, when we had a large framegrabber
Guido van Rossum7268c931992-08-18 21:11:18 +000012board on loan from SGI for a few weeks: we developed a movie recording
13program (camcorder.py) and added numerous features, including still
14frame capture and synchronous sound recording using a second machine
15(the machine holding the framegrabber board didn't have audio).
Guido van Rossumb2e82281992-08-18 16:01:19 +000016
Guido van Rossum7268c931992-08-18 21:11:18 +000017During the following months, when we started using and processing the
18recorded film fragments, the "CMIF video format" was revised several
19times, and we eventually created an object-oriented interface for
20reading and writing various incarnations of these files, called VFile.
21(This module is also used by our flagship application, the CMIF
22editor, not in this directory but in /ufs/guido/mm/.)
Guido van Rossumb2e82281992-08-18 16:01:19 +000023
Guido van Rossum7268c931992-08-18 21:11:18 +000024When we got our own Indigo entry-level video board (in June 1992) and
25a version of the Irix video library that supported capturing PAL
26format (in August 1992), Sjoerd added an interface to the video
Guido van Rossum9e3f3351992-09-29 13:40:47 +000027library to Python (sv) and Guido wrote Vrec.py (based upon a still
28frame grabber by Sjoerd, in turn based upon SGI demo code in C) to
29record a movie using it. Vrec was soon followed by modernized
Guido van Rossume1783321992-09-07 09:35:23 +000030versions of the other programs (Vinfo, Vplay, Vtime) and an
31interactive editor (Vedit). Finally, VFile was rewritten for more
Guido van Rossum9e3f3351992-09-29 13:40:47 +000032modularity, functionality and robustness, and various other tools were
33added as needed.
Guido van Rossumb2e82281992-08-18 16:01:19 +000034
Guido van Rossum7268c931992-08-18 21:11:18 +000035 Guido van Rossum
36 Jack Jansen
37 Sjoerd Mullender
Guido van Rossume4bddea1991-10-30 11:52:48 +000038
Guido van Rossum96059b31991-11-04 14:31:31 +000039
Guido van Rossum7268c931992-08-18 21:11:18 +000040Overview of files
41-----------------
42
Guido van Rossum9e3f3351992-09-29 13:40:47 +000043cmif-film.ms description of the CMIF video file format (a little
44 out of date)
Guido van Rossume1783321992-09-07 09:35:23 +000045
46
47These are programs with a command line interface:
48
49Vrec.py record video movies using the Indigo video library and
50 board
51
52Vplay.py play video movies
53
54Vinfo.py show statistics on movies
55
56Vtime.py (unrelated to vtime!!!) Copy a video file,
57 manipulating the time codes (e.g. faster/slower, or
58 regenerate time codes, or drop frames too close apart)
59
Guido van Rossum9e3f3351992-09-29 13:40:47 +000060Vmkjpeg.py compress an rgb or grey video file to jpeg[grey] format
61
62Vunjpeg.py expand a jpeg[grey] video file to rgb or grey format
63
Guido van Rossume1783321992-09-07 09:35:23 +000064Vedit.py interactive video editing program
65
Guido van Rossum67b48951992-09-24 12:54:35 +000066Vsend.py unicast or multicast live video as UDP packets
67
68Vreceive.py receive transmissions from Vsend
69
Guido van Rossume1783321992-09-07 09:35:23 +000070
71These modules are used by the above programs:
72
73VFile.py classes that read and write CMIF video files
74
75Viewer.py two viewer classes used by Vedit
76
Guido van Rossum67b48951992-09-24 12:54:35 +000077LiveVideoIn.py live video input class, used by Vsend
78
79LiveVideoOut.py live video output class, used by Vsend and Vreceive
80
Guido van Rossume1783321992-09-07 09:35:23 +000081
82The following are C programs, either for efficiency or because they
83need to link with a C library:
84
85squash.c make a movie smaller by averaging pixels
86 usage: squash factor [bits] <moviefile >newmoviefile
87 factor x and y compression factor
88 bits #bits left per sample in result (default 8)
89
90squash2.c make a movie smaller by dropping pixels
91 usage: squash2 factor <moviefile >newmoviefile
92 factor x and y compression factor
93
94tomono.c like squash2 but outputs a monochrome movie
95
96v2i.c convert the first frame of a movie file to SGI .rgb format
97 link with -limage
98
99i2v.c convert an rgb file to "lrectwrite" format (this was
100 used one time by the CMIF editor)
101
102
103These programs are obsolete, but kept around for sentimental reasons.
104Most either don't work any more because they don't use VFile and hence
105haven't followed the frequent changes in the CMIF video file format;
106or they are dependent upon hardware we don't have (SGI's previous
107generation framegrabber). Except for cam.py / tv.py, their
108functionality is present in the suite of programs whose name begins
109with 'V' listed above.
110
Guido van Rossume4bddea1991-10-30 11:52:48 +0000111cam.py network real-time tv broadcast; see tv.py
112 usage: cam [packfactor [host]]
113 specifying 'all' for host broadcasts
114
115camcorder.py record video movies or make snapshots (in movie format)
Guido van Rossum96059b31991-11-04 14:31:31 +0000116 usage: camcorder [-c] [-a audiohost [-s]] [-p pf] [moviefile]
117 -c color (equivalent to -p 0)
Guido van Rossume4bddea1991-10-30 11:52:48 +0000118 -a audiohost syncaudio is running on audiohost
119 -s start syncaudio (on audiohost)
Guido van Rossum96059b31991-11-04 14:31:31 +0000120 -p packfactor packfactor (default 2; 0 records color)
Guido van Rossume4bddea1991-10-30 11:52:48 +0000121 moviefile (default film.video)
122 keyboard commands:
123 s stop grabbing (single step if already stopped)
124 c continuous grabbing
125 r start recording
126 p pause recording (record single frame if paused)
127 ESC quit
128
129statit.py various statistics operations on movie files
130
131syncaudio.py record audio synchronized with camcorder -a
132 usage: syncaudio videohost soundfile
Guido van Rossum96059b31991-11-04 14:31:31 +0000133 soundfile format: 16 bits/sample, 16000 samples/sec, 1 channel
134 (actually, you'd better set the sampling rate to 16000
135 with the audio panel)
Guido van Rossume4bddea1991-10-30 11:52:48 +0000136
137tv.py receiver for transmissions from cam.py
138
Guido van Rossum7caf6111991-11-04 15:55:01 +0000139vcopy.py selectively write frames from one movie file to another
140 usage: vcopy infile outfile
141 commands: 'n' gets next frame; 'w' writes current frame
142
Guido van Rossume4bddea1991-10-30 11:52:48 +0000143video.py player for movies recorded by camcorder.py
Guido van Rossum7385d581991-11-22 14:03:57 +0000144 usage: video [-l] [-p pf] [-m mag] [-F]
145 [moviefile [soundfile [skipbytes]]]
Guido van Rossum228381e1991-11-04 18:04:47 +0000146 -p pf override packfactor (to zoom)
147 -l looping -- restart movie when done
Guido van Rossum7385d581991-11-22 14:03:57 +0000148 -m mag magnification
149 -F run at max speed
Guido van Rossum228381e1991-11-04 18:04:47 +0000150 moviefile default is film.video
151 soundfile default is none (no sound)
152 skipbytes byte offset in soundfile where sound starts
Guido van Rossume4bddea1991-10-30 11:52:48 +0000153
Guido van Rossumeda5dfd1991-11-06 16:13:25 +0000154vinfo.py print summary of movie file(s)
155 usage: vinfo [-d] moviefile ...
156 -d print delta times (default: print abs times)
Guido van Rossume4bddea1991-10-30 11:52:48 +0000157
Guido van Rossum96059b31991-11-04 14:31:31 +0000158vpregs.py definition of VP registers
159
Guido van Rossume4bddea1991-10-30 11:52:48 +0000160vtime.py virtual time module imported by syncaudio.py and camcorder.py
161
Guido van Rossume1783321992-09-07 09:35:23 +0000162colorsys.py color system conversions (now part of std python lib)