Guido van Rossum | 7268c93 | 1992-08-18 21:11:18 +0000 | [diff] [blame] | 1 | CMIF video tools |
| 2 | ================ |
Guido van Rossum | e4bddea | 1991-10-30 11:52:48 +0000 | [diff] [blame] | 3 | |
Guido van Rossum | 7268c93 | 1992-08-18 21:11:18 +0000 | [diff] [blame] | 4 | This directory contains Python and C programs to manipulate files |
| 5 | containing digitized video in the "CMIF video format". |
| 6 | |
| 7 | |
| 8 | History |
| 9 | ------- |
Guido van Rossum | b2e8228 | 1992-08-18 16:01:19 +0000 | [diff] [blame] | 10 | |
| 11 | We started this in October 1991, when we had a large framegrabber |
Guido van Rossum | 7268c93 | 1992-08-18 21:11:18 +0000 | [diff] [blame] | 12 | board on loan from SGI for a few weeks: we developed a movie recording |
| 13 | program (camcorder.py) and added numerous features, including still |
| 14 | frame capture and synchronous sound recording using a second machine |
| 15 | (the machine holding the framegrabber board didn't have audio). |
Guido van Rossum | b2e8228 | 1992-08-18 16:01:19 +0000 | [diff] [blame] | 16 | |
Guido van Rossum | 7268c93 | 1992-08-18 21:11:18 +0000 | [diff] [blame] | 17 | During the following months, when we started using and processing the |
| 18 | recorded film fragments, the "CMIF video format" was revised several |
| 19 | times, and we eventually created an object-oriented interface for |
| 20 | reading and writing various incarnations of these files, called VFile. |
| 21 | (This module is also used by our flagship application, the CMIF |
| 22 | editor, not in this directory but in /ufs/guido/mm/.) |
Guido van Rossum | b2e8228 | 1992-08-18 16:01:19 +0000 | [diff] [blame] | 23 | |
Guido van Rossum | 7268c93 | 1992-08-18 21:11:18 +0000 | [diff] [blame] | 24 | When we got our own Indigo entry-level video board (in June 1992) and |
| 25 | a version of the Irix video library that supported capturing PAL |
| 26 | format (in August 1992), Sjoerd added an interface to the video |
Guido van Rossum | 815adc9 | 1992-08-20 11:54:00 +0000 | [diff] [blame] | 27 | library to Python (sv) and Guido wrote Vrec.py (based upon a |
Guido van Rossum | 7268c93 | 1992-08-18 21:11:18 +0000 | [diff] [blame] | 28 | still frame grabber by Sjoerd, in turn based upon SGI demo code in C) |
| 29 | to record a movie using it. |
Guido van Rossum | b2e8228 | 1992-08-18 16:01:19 +0000 | [diff] [blame] | 30 | |
Guido van Rossum | 7268c93 | 1992-08-18 21:11:18 +0000 | [diff] [blame] | 31 | Guido van Rossum |
| 32 | Jack Jansen |
| 33 | Sjoerd Mullender |
Guido van Rossum | e4bddea | 1991-10-30 11:52:48 +0000 | [diff] [blame] | 34 | |
Guido van Rossum | 96059b3 | 1991-11-04 14:31:31 +0000 | [diff] [blame] | 35 | |
Guido van Rossum | 7268c93 | 1992-08-18 21:11:18 +0000 | [diff] [blame] | 36 | Overview of files |
| 37 | ----------------- |
| 38 | |
Guido van Rossum | e4bddea | 1991-10-30 11:52:48 +0000 | [diff] [blame] | 39 | cam.py network real-time tv broadcast; see tv.py |
| 40 | usage: cam [packfactor [host]] |
| 41 | specifying 'all' for host broadcasts |
| 42 | |
| 43 | camcorder.py record video movies or make snapshots (in movie format) |
Guido van Rossum | 96059b3 | 1991-11-04 14:31:31 +0000 | [diff] [blame] | 44 | usage: camcorder [-c] [-a audiohost [-s]] [-p pf] [moviefile] |
| 45 | -c color (equivalent to -p 0) |
Guido van Rossum | e4bddea | 1991-10-30 11:52:48 +0000 | [diff] [blame] | 46 | -a audiohost syncaudio is running on audiohost |
| 47 | -s start syncaudio (on audiohost) |
Guido van Rossum | 96059b3 | 1991-11-04 14:31:31 +0000 | [diff] [blame] | 48 | -p packfactor packfactor (default 2; 0 records color) |
Guido van Rossum | e4bddea | 1991-10-30 11:52:48 +0000 | [diff] [blame] | 49 | moviefile (default film.video) |
| 50 | keyboard commands: |
| 51 | s stop grabbing (single step if already stopped) |
| 52 | c continuous grabbing |
| 53 | r start recording |
| 54 | p pause recording (record single frame if paused) |
| 55 | ESC quit |
| 56 | |
Guido van Rossum | 815adc9 | 1992-08-20 11:54:00 +0000 | [diff] [blame] | 57 | Vrec.py record video movies using the Indigo video library and |
Guido van Rossum | b2e8228 | 1992-08-18 16:01:19 +0000 | [diff] [blame] | 58 | board |
| 59 | |
Guido van Rossum | 815adc9 | 1992-08-20 11:54:00 +0000 | [diff] [blame] | 60 | colorsys.py color conversions, used by video |
| 61 | |
Guido van Rossum | e4bddea | 1991-10-30 11:52:48 +0000 | [diff] [blame] | 62 | statit.py various statistics operations on movie files |
| 63 | |
| 64 | syncaudio.py record audio synchronized with camcorder -a |
| 65 | usage: syncaudio videohost soundfile |
Guido van Rossum | 96059b3 | 1991-11-04 14:31:31 +0000 | [diff] [blame] | 66 | soundfile format: 16 bits/sample, 16000 samples/sec, 1 channel |
| 67 | (actually, you'd better set the sampling rate to 16000 |
| 68 | with the audio panel) |
Guido van Rossum | e4bddea | 1991-10-30 11:52:48 +0000 | [diff] [blame] | 69 | |
| 70 | tv.py receiver for transmissions from cam.py |
| 71 | |
Guido van Rossum | 7caf611 | 1991-11-04 15:55:01 +0000 | [diff] [blame] | 72 | vcopy.py selectively write frames from one movie file to another |
| 73 | usage: vcopy infile outfile |
| 74 | commands: 'n' gets next frame; 'w' writes current frame |
| 75 | |
Guido van Rossum | e4bddea | 1991-10-30 11:52:48 +0000 | [diff] [blame] | 76 | video.py player for movies recorded by camcorder.py |
Guido van Rossum | 7385d58 | 1991-11-22 14:03:57 +0000 | [diff] [blame] | 77 | usage: video [-l] [-p pf] [-m mag] [-F] |
| 78 | [moviefile [soundfile [skipbytes]]] |
Guido van Rossum | 228381e | 1991-11-04 18:04:47 +0000 | [diff] [blame] | 79 | -p pf override packfactor (to zoom) |
| 80 | -l looping -- restart movie when done |
Guido van Rossum | 7385d58 | 1991-11-22 14:03:57 +0000 | [diff] [blame] | 81 | -m mag magnification |
| 82 | -F run at max speed |
Guido van Rossum | 228381e | 1991-11-04 18:04:47 +0000 | [diff] [blame] | 83 | moviefile default is film.video |
| 84 | soundfile default is none (no sound) |
| 85 | skipbytes byte offset in soundfile where sound starts |
Guido van Rossum | e4bddea | 1991-10-30 11:52:48 +0000 | [diff] [blame] | 86 | |
Guido van Rossum | 7268c93 | 1992-08-18 21:11:18 +0000 | [diff] [blame] | 87 | Vplay.py similar but more modern, using VFile.py |
Guido van Rossum | b2e8228 | 1992-08-18 16:01:19 +0000 | [diff] [blame] | 88 | |
Guido van Rossum | eda5dfd | 1991-11-06 16:13:25 +0000 | [diff] [blame] | 89 | vinfo.py print summary of movie file(s) |
| 90 | usage: vinfo [-d] moviefile ... |
| 91 | -d print delta times (default: print abs times) |
Guido van Rossum | e4bddea | 1991-10-30 11:52:48 +0000 | [diff] [blame] | 92 | |
Guido van Rossum | 7268c93 | 1992-08-18 21:11:18 +0000 | [diff] [blame] | 93 | Vinfo.py similar but more modern, using VFile.py |
Guido van Rossum | b2e8228 | 1992-08-18 16:01:19 +0000 | [diff] [blame] | 94 | |
Guido van Rossum | 96059b3 | 1991-11-04 14:31:31 +0000 | [diff] [blame] | 95 | vpregs.py definition of VP registers |
| 96 | |
Guido van Rossum | e4bddea | 1991-10-30 11:52:48 +0000 | [diff] [blame] | 97 | vtime.py virtual time module imported by syncaudio.py and camcorder.py |
| 98 | |
Guido van Rossum | 815adc9 | 1992-08-20 11:54:00 +0000 | [diff] [blame] | 99 | Vtime.py (unrelated to vtime!!!) Copy a video file, |
| 100 | manipulating the time codes (e.g. faster/slower, or |
| 101 | regenerate time codes, or drop frames too close apart) |
| 102 | |
Guido van Rossum | e4bddea | 1991-10-30 11:52:48 +0000 | [diff] [blame] | 103 | |
Guido van Rossum | 7268c93 | 1992-08-18 21:11:18 +0000 | [diff] [blame] | 104 | The following are C programs, either for efficiency or because they |
| 105 | need to link with a C library: |
Guido van Rossum | e4bddea | 1991-10-30 11:52:48 +0000 | [diff] [blame] | 106 | |
| 107 | squash.c make a movie smaller by averaging pixels |
| 108 | usage: squash factor [bits] <moviefile >newmoviefile |
| 109 | factor x and y compression factor |
| 110 | bits #bits left per sample in result (default 8) |
| 111 | |
| 112 | squash2.c make a movie smaller by dropping pixels |
| 113 | usage: squash2 factor <moviefile >newmoviefile |
| 114 | factor x and y compression factor |
| 115 | |
| 116 | tomono.c like squash2 but outputs a monochrome movie |
| 117 | |
Guido van Rossum | 7caf611 | 1991-11-04 15:55:01 +0000 | [diff] [blame] | 118 | v2i.c convert the first frame of a movie file to SGI .rgb format |
Guido van Rossum | e4bddea | 1991-10-30 11:52:48 +0000 | [diff] [blame] | 119 | link with -limage |
Guido van Rossum | 7268c93 | 1992-08-18 21:11:18 +0000 | [diff] [blame] | 120 | |
| 121 | i2v.c convert an rgb file to "lrectwrite" format (this was |
| 122 | used one time by the CMIF editor) |