Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
5fd96965
Commit
5fd96965
authored
Aug 18, 1992
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor improvements, comments; fix Vinfo -d.
parent
49ed4527
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
25 deletions
+59
-25
Demo/sgi/video/README
Demo/sgi/video/README
+37
-17
Demo/sgi/video/VFile.py
Demo/sgi/video/VFile.py
+3
-2
Demo/sgi/video/Vinfo.py
Demo/sgi/video/Vinfo.py
+18
-5
Demo/sgi/video/makemovie.py
Demo/sgi/video/makemovie.py
+1
-1
No files found.
Demo/sgi/video/README
View file @
5fd96965
This directory contains Python and C code for video stuff.
CMIF video tools
================
History:
This directory contains Python and C programs to manipulate files
containing digitized video in the "CMIF video format".
We started this in October 1991, when we had a large framegrabber
board on loan from SGI for a few weeks.
Later, when we started processing the recorded film fragments, the
"CMIF video format" was revised several times, and we finally created
an object-oriented interface for reading and writing various
incarnations of these files, called VFile.
History
-------
When we finally got our own Indigo entry-level video board (in June
1992) and a version of the Irix video library that supported capturing
PAL format (August 1992) Sjoerd added an interface to the video
We started this in October 1991, when we had a large framegrabber
board on loan from SGI for a few weeks: we developed a movie recording
program (camcorder.py) and added numerous features, including still
frame capture and synchronous sound recording using a second machine
(the machine holding the framegrabber board didn't have audio).
During the following months, when we started using and processing the
recorded film fragments, the "CMIF video format" was revised several
times, and we eventually created an object-oriented interface for
reading and writing various incarnations of these files, called VFile.
(This module is also used by our flagship application, the CMIF
editor, not in this directory but in /ufs/guido/mm/.)
When we got our own Indigo entry-level video board (in June 1992) and
a version of the Irix video library that supported capturing PAL
format (in August 1992), Sjoerd added an interface to the video
library to Python (sv) and Guido wrote makemovie.py (based upon a
still frame grabber by Sjoerd) to record a movie using it.
still frame grabber by Sjoerd, in turn based upon SGI demo code in C)
to record a movie using it.
--Guido, Jack and Sjoerd
Guido van Rossum
Jack Jansen
Sjoerd Mullender
Overview of files
-----------------
cam.py network real-time tv broadcast; see tv.py
usage: cam [packfactor [host]]
specifying 'all' for host broadcasts
...
...
@@ -67,21 +84,21 @@ video.py player for movies recorded by camcorder.py
soundfile default is none (no sound)
skipbytes byte offset in soundfile where sound starts
Vplay.py s
ame but
using VFile.py
Vplay.py s
imilar but more modern,
using VFile.py
vinfo.py print summary of movie file(s)
usage: vinfo [-d] moviefile ...
-d print delta times (default: print abs times)
Vinfo.py s
ame but
using VFile.py
Vinfo.py s
imilar but more modern,
using VFile.py
vpregs.py definition of VP registers
vtime.py virtual time module imported by syncaudio.py and camcorder.py
The
se are C programs, either for efficiency or because they need to
link with a C library.
The
following are C programs, either for efficiency or because they
need to link with a C library:
squash.c make a movie smaller by averaging pixels
usage: squash factor [bits] <moviefile >newmoviefile
...
...
@@ -96,3 +113,6 @@ tomono.c like squash2 but outputs a monochrome movie
v2i.c convert the first frame of a movie file to SGI .rgb format
link with -limage
i2v.c convert an rgb file to "lrectwrite" format (this was
used one time by the CMIF editor)
Demo/sgi/video/VFile.py
View file @
5fd96965
...
...
@@ -33,8 +33,9 @@ def conv_rgb8(rgb,d1,d2):
# init(filename)
# initfp(fp, filename)
# rewind()
# getframe()
# skipframe()
# getnextframe()
# skipnextframe()
# (and many more)
#
# The following read-only data members provide public information:
# version
...
...
Demo/sgi/video/Vinfo.py
View file @
5fd96965
...
...
@@ -26,19 +26,19 @@ import getopt
short
=
0
quick
=
0
d
iffs
=
0
d
elta
=
0
# Main program -- mostly command line parsing
def
main
():
global
short
,
quick
,
d
iffs
global
short
,
quick
,
d
elta
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'dqs'
)
for
opt
,
arg
in
opts
:
if
opt
==
'-q'
:
quick
=
1
elif
opt
==
'-d'
:
d
iffs
=
1
d
elta
=
1
elif
opt
==
'-s'
:
short
=
1
if
not
args
:
...
...
@@ -50,7 +50,17 @@ def main():
# Process one file
def
process
(
filename
):
vin
=
VFile
.
VinFile
().
init
(
filename
)
try
:
vin
=
VFile
.
VinFile
().
init
(
filename
)
except
IOError
,
msg
:
sys
.
stderr
.
write
(
filename
+
': I/O error: '
+
`msg`
+
'
\
n
'
)
return
except
VFile
.
Error
,
msg
:
sys
.
stderr
.
write
(
msg
+
'
\
n
'
)
return
except
EOFError
:
sys
.
stderr
.
write
(
filename
+
': EOF in video file
\
n
'
)
return
print
'File: '
,
filename
print
'Version: '
,
vin
.
version
print
'Size: '
,
vin
.
width
,
'x'
,
vin
.
height
...
...
@@ -62,7 +72,10 @@ def process(filename):
vin
.
close
()
return
if
not
short
:
print
'Frame times:'
,
if
delta
:
print
'Frame time deltas:'
,
else
:
print
'Frame times:'
,
n
=
0
t
=
0
told
=
0
...
...
Demo/sgi/video/makemovie.py
View file @
5fd96965
#! /ufs/guido/bin/sgi/python
#! /ufs/guido/src/video/py
# XXX for now, you need this special version of Python
# Capture a CMIF movie using the Indigo video library and board
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment