Blame SOURCES/netpbm-manual-pages.patch

7d2009
diff -urNp old/userguide/libnetpbm_ug.html new/userguide/libnetpbm_ug.html
7d2009
--- old/userguide/libnetpbm_ug.html	2017-09-05 14:20:09.734743404 +0200
7d2009
+++ new/userguide/libnetpbm_ug.html	2017-09-05 14:47:30.496705483 +0200
7d2009
@@ -374,7 +374,7 @@ plain format.
7d2009
 

Reference

7d2009
 
7d2009
 

The Libnetpbm Netpbm Image

7d2009
-Processing Manual describes the the libnetpbm functions for
7d2009
+Processing Manual describes the libnetpbm functions for
7d2009
 processing image data.
7d2009
 
7d2009
 

The Libnetpbm Utility Manual

7d2009
diff -urNp old/userguide/pamfunc.html new/userguide/pamfunc.html
7d2009
--- old/userguide/pamfunc.html	2017-09-05 14:20:09.738743398 +0200
7d2009
+++ new/userguide/pamfunc.html	2017-09-05 14:47:41.760644848 +0200
7d2009
@@ -57,7 +57,7 @@ output image.
7d2009
 and bit string (such as and with 01001000).  For the arithmetic functions, the
7d2009
 function arguments and results are the fraction that a sample is of the
7d2009
 maxval, i.e. normal interpretation of PAM tuples.  But for the bit string
7d2009
-functions, the value is the the bit string whose value as a binary cipher is
7d2009
+functions, the value is the bit string whose value as a binary cipher is
7d2009
 the sample value, and the maxval indicates the width of the bit string.
7d2009
 
7d2009
 

Arithmetic functions

7d2009
diff -urNp old/userguide/pbmtextps.html new/userguide/pbmtextps.html
7d2009
--- old/userguide/pbmtextps.html	2017-09-05 14:20:09.736743401 +0200
7d2009
+++ new/userguide/pbmtextps.html	2017-09-05 14:47:58.840553598 +0200
7d2009
@@ -185,7 +185,7 @@ edge of the type.  See 
7d2009
 
-ascent=n
7d2009
 
-descent=n
7d2009
 
7d2009
-These options control the the margins added to the image, measured from
7d2009
+These options control the margins added to the image, measured from
7d2009
 the text baseline.  See Margins for details.
7d2009
 
7d2009
 

Sizes are in points, as a floating point number.

7d2009
diff -urNp old/userguide/pbmtog3.html new/userguide/pbmtog3.html
7d2009
--- old/userguide/pbmtog3.html	2017-09-05 14:20:09.735743403 +0200
7d2009
+++ new/userguide/pbmtog3.html	2017-09-05 14:48:55.648255793 +0200
7d2009
@@ -77,7 +77,7 @@ You cannot specify both.
7d2009
 

HISTORY

7d2009
 
7d2009
 

Before Netpbm 10.79 (June 2017), there was a different program by the same

7d2009
-name in Netpbm, which was written by by Paul Haeberli
7d2009
+name in Netpbm, which was written by Paul Haeberli
7d2009
 <paul@manray.sgi.com> in 1989
7d2009
 and then modified extensively by others.
7d2009
 
7d2009
diff -urNp old/userguide/ppmtompeg.html new/userguide/ppmtompeg.html
7d2009
--- old/userguide/ppmtompeg.html	2017-09-05 14:20:09.739743396 +0200
7d2009
+++ new/userguide/ppmtompeg.html	1970-01-01 01:00:00.000000000 +0100
7d2009
@@ -1,1291 +0,0 @@
7d2009
-
7d2009
-<HTML>
7d2009
-<HEAD>
7d2009
-<TITLE>Ppmtompeg User Manual</TITLE>
7d2009
-</HEAD>
7d2009
-<BODY>
7d2009
-

Ppmtompeg

7d2009
-Updated: 23 July 2006
7d2009
-
7d2009
-Table Of Contents
7d2009
-
7d2009
-

NAME

7d2009
-ppmtompeg - encode an MPEG-1 bitstream
7d2009
-
7d2009
-

SYNOPSIS

7d2009
-
7d2009
-ppmtompeg
7d2009
-[options]
7d2009
-parameter-file
7d2009
-
7d2009
-

DESCRIPTION

7d2009
-
7d2009
-

This program is part of Netpbm.

7d2009
-
7d2009
-

ppmtompeg produces an MPEG-1 video stream. MPEG-1 is the

7d2009
-first great video compression method, and is what is used in Video CDs
7d2009
-(VCD).  ppmtompeg originated in the year 1995.  DVD uses a more
7d2009
-advanced method, MPEG-2.  There is an even newer method called MPEG-4
7d2009
-which is also called Divx.  I don't know where one finds that used.
7d2009
-
7d2009
-

There's technically a difference between a compression method for

7d2009
-video and an actual file (stream) format for a movie, and I don't know
7d2009
-if it can be validly said that the format of the stream
7d2009
-ppmtompeg produces is MPEG-1.
7d2009
-
7d2009
-

Mencoder from the Mplayer

7d2009
-package is probably superior for most video format generation
7d2009
-needs, if for no other reason than that it is more popular.
7d2009
-
7d2009
-

The programming library PM2V

7d2009
-generates MPEG-2 streams.
7d2009
-
7d2009
-

Use Mplayer (not part of Netpbm)

7d2009
-to do the reverse conversion: to create a series of PNM files from an MPEG
7d2009
-stream.
7d2009
-
7d2009
-

param_file is a parameter file which includes a list of

7d2009
-input files and other parameters.  The file is described in detail
7d2009
-below.
7d2009
-
7d2009
-

To understand this program, you need to understand something about

7d2009
-the complex MPEG-1 format.  One source of information about this
7d2009
-standard format is the section Introduction to MPEG in the 
7d2009
-href="http://www.faqs.org/faqs/compression-faq">Compression FAQ.
7d2009
-
7d2009
-

OPTIONS

7d2009
-
7d2009
-

The -gop, -combine_gops, -frames, and

7d2009
--combine_frames options are all mutually exclusive.
7d2009
-
7d2009
-
7d2009
-
-stat stat_file
7d2009
-
7d2009
-
This option causes ppmtompeg to append the statistics that
7d2009
-it write to Standard Output to the file stat_file as well.  The
7d2009
-statistics use the following abbreviations: bits per block (bpb), bits
7d2009
-per frame (bpf), seconds per frame (spf), and bits per second (bps).
7d2009
-
7d2009
-

These statistics include how many I, P, and B frames there were,

7d2009
-and information about compression and quality.
7d2009
-
7d2009
-
7d2009
-
-quiet num_seconds
7d2009
-
7d2009
-
causes ppmtompeg not to report remaining time more often
7d2009
-than every num_seconds seconds (unless the time estimate rises,
7d2009
-which will happen near the beginning of the run).  A negative value
7d2009
-tells ppmtompeg not to report at all.  0 is the default
7d2009
-(reports once after each frame).  Note that the time remaining is an
7d2009
-estimate and does not take into account time to read in frames.
7d2009
-
7d2009
-
-realquiet
causes ppmtompeg to run silently,
7d2009
-with the only screen output being errors.  Particularly useful when
7d2009
-reading input from stdin.
7d2009
-
7d2009
-
7d2009
--no_frame_summary
7d2009
-
7d2009
-
This option prevents ppmtompeg from printing a summary
7d2009
-line for each frame
7d2009
-
7d2009
-
-float_dct
7d2009
-
7d2009
-
forces ppmtompeg to use a more accurate, yet more
7d2009
-computationally expensive version of the DCT.
7d2009
-
7d2009
-
-gop gop_num
7d2009
-
7d2009
-causes ppmtompeg to encode only the numbered GOP (first GOP is 0).  The
7d2009
-parameter file is the same as for normal usage.  The output file will be
7d2009
-the normal output file with the suffix .gop.gop_num.
7d2009
-ppmtompeg does not output any sequence information.
7d2009
-
7d2009
-
-combine_gops
7d2009
-
7d2009
-
causes ppmtompeg simply to combine some GOP files into a
7d2009
-single MPEG output stream.  ppmtompeg inserts a sequence header
7d2009
-and trailer.  In this case, the parameter file needs only to contain 
7d2009
-the SIZE value, an output file, and perhaps a list of input GOP
7d2009
-files (see below).
7d2009
-
7d2009
-If you don't supply a list of input GOP files is used, then
7d2009
-ppmtompeg assumes you're using the same parameter file you used
7d2009
-when you created the input (with the -gop option) and
7d2009
-calculates the corresponding gop filenames itself.  If this is not the
7d2009
-case, you can specify input GOP files in the same manner as normal
7d2009
-input files -- except instead of using INPUT_DIR, INPUT, and
7d2009
-END_INPUT, use GOP_INPUT_DIR, GOP_INPUT, and GOP_END_INPUT.  If no
7d2009
-input GOP files are specified, then the default is to use the output
7d2009
-file name with suffix .gop.gop_num, with gop_num
7d2009
-starting from 0, as the input files.
7d2009
-     
7d2009
-

Thus, unless you're mixing and matching GOP files from different

7d2009
-sources, you can simply use the same parameter file for creating the
7d2009
-GOP files (-gop) and for later turning them into an MPEG stream
7d2009
-(-combine_gops).
7d2009
-     
7d2009
-
7d2009
-
-frames first_frame last_frame
7d2009
-
7d2009
-
This option causes ppmtompeg to encode only the frames numbered
7d2009
-first_frame to last_frame, inclusive.  The parameter
7d2009
-file is the same as for normal usage.  The output will be placed in
7d2009
-separate files, one per frame, with the file names being the normal
7d2009
-output file name with the suffix .frame.frame_num.  No
7d2009
-GOP header information is output.  (Thus, the parameter file need not
7d2009
-include the GOP_SIZE value)
7d2009
-
7d2009
-

Use ppmtompeg -combine_frames to combine these frames later into

7d2009
-an MPEG stream.
7d2009
-
7d2009
-
7d2009
-
-combine_frames
7d2009
-
7d2009
-
This option causes ppmtompeg simply to combine some
7d2009
-individual MPEG frames (such as you might have created with an earlier
7d2009
-run of ppmtompeg -frames) into a single MPEG stream.  Sequence
7d2009
-and GOP headers are inserted appropriately.  In this case, the
7d2009
-parameter file needs to contain only the SIZE value, the GOP_SIZE
7d2009
-value, an output file, and perhaps a list of frame files (see below).
7d2009
-
7d2009
-

The parameter file may specify input frame files in the same manner

7d2009
-as normal input files -- except instead of using INPUT_DIR, INPUT, and
7d2009
-END_INPUT, use FRAME_INPUT_DIR, FRAME_INPUT, and FRAME_END_INPUT. If
7d2009
-no input frame files are specified, then the default is to use the
7d2009
-output file name with suffix .frame.frame_num, with
7d2009
-frame_num starting from 0, as the input files.
7d2009
-     
7d2009
-
7d2009
-
7d2009
-
-nice
7d2009
-
7d2009
-
This option causes ppmtompeg to run any remote processes
7d2009
-"nicely," i.e.  at low priority.  (This is relevant only if you are
7d2009
-running ppmtompeg in parallel mode.  Otherwise, there are no
7d2009
-remote processes).  See 'man nice.'
7d2009
-
7d2009
-
-max_machines num_machines
7d2009
-
7d2009
-
This option causes ppmtompeg to use no more than
7d2009
-num_machines machines as slaves for use in parallel encoding.
7d2009
-
7d2009
-
-snr
7d2009
-
7d2009
-
This option causes ppmtompeg to include the signal-to-noise
7d2009
-ratio in the reported statistics.  Prints SNR (Y U V) and peak SNR (Y
7d2009
-U V) for each frame.  In summary, prints averages of luminance only
7d2009
-(Y).  SNR is defined as 10*log(variance of original/variance of
7d2009
-error).  Peak SNR is defined as 20*log(255/RMSE).  Note that
7d2009
-ppmtompeg runs a little slower when you use this option.
7d2009
-
7d2009
-
-mse
7d2009
-
7d2009
-
This option causes ppmtompeg to report the mean squared
7d2009
-error per block.  It also automatically reports the quality of the
7d2009
-images, so there is no need to specify -snr then.
7d2009
-
7d2009
-
-bit_rate_info rate_file
7d2009
-
7d2009
-
This option makes ppmtompeg write bit rate information
7d2009
-into the file rate_file.  Bit rate information is bits per frame, and
7d2009
-also bits per I-frame-to-I-frame.
7d2009
-
7d2009
-
-mv_histogram
7d2009
-
7d2009
-
This option causes ppmtompeg to print a histogram of the
7d2009
-motion vectors as part of statistics.  There are three histograms --
7d2009
-one for P frame, one for forward B frame, and one for backward B frame
7d2009
-motion vectors.
7d2009
-
7d2009
-

The output is in the form of a matrix, each entry corresponding to one

7d2009
-motion vector in the search window. The center of the matrix
7d2009
-represents (0,0) motion vectors.
7d2009
-
7d2009
-
-debug_sockets
7d2009
-
7d2009
-
This option causes ppmtompeg to print to Standard Output
7d2009
-messages that narrate the communication between the machines when you run
7d2009
-ppmtompeg in parallel mode.
7d2009
-
7d2009
-
-debug_machines
7d2009
-
7d2009
-
This option causes ppmtompeg to print to Standard Output
7d2009
-messages that narrate the progress of the conversion on the various
7d2009
-machines when you run ppmtompeg in parallel
7d2009
-mode.
7d2009
-     
7d2009
-
7d2009
-
7d2009
-

PARAMETER FILE

7d2009
-
7d2009
-

The parameter file must contain the following

7d2009
-lines (except when using the -combine_gops or -combine_frames
7d2009
-options):
7d2009
-
7d2009
-
7d2009
-
7d2009
-
PATTERN pattern
7d2009
-
7d2009
-
This statement specifies the pattern (sequence) of I frames, P frames,
7d2009
-and B frames.  pattern is just a sequence of the letters I, P, and
7d2009
-B with nothing between.  Example:
7d2009
-
7d2009
-
7d2009
-    PATTERN IBBPBBPBBPBBPBB
7d2009
-     
7d2009
-
7d2009
-

See I Frames, P Frames, B Frames.

7d2009
-
7d2009
-
OUTPUT output file
7d2009
-
This names the file where the output MPEG stream goes.
7d2009
-     
7d2009
-
INPUT_DIR directory
7d2009
-
7d2009
-
This statement tells where the input images (frames) come from.
7d2009
-If each frame is in a separate file, directory is the directory
7d2009
-where they all are.  You may use . to refer to the current 
7d2009
-directory.  A null directory refers to the root directory of the
7d2009
-system file tree.
7d2009
-
7d2009
-

To have ppmtompeg read all the frames serially from Standard

7d2009
-Input, specify
7d2009
-
7d2009
-    INPUT_DIR stdin
7d2009
-
7d2009
-
7d2009
-
INPUT
7d2009
-
7d2009
-This line must be followed by a list of the input files (in display order)
7d2009
-and then the line END_INPUT.
7d2009
-
7d2009
-

There are three types of lines between INPUT and END_INPUT. First,

7d2009
-a line may simply be the name of an input file.  Second, the line
7d2009
-may be of the form single_star_expr
7d2009
-[x-y].
7d2009
-single_star_expr can have a single * in it.  It is
7d2009
-replaced by all the numbers between x and y inclusive.  So, for
7d2009
-example, the line tennis*.ppm [12-15] refers to the files
7d2009
-tennis12.ppm, tennis13.ppm, tennis14.ppm, tennis15.ppm.
7d2009
-
7d2009
-

Uniform zero-padding occurs, as well. For example, the line

7d2009
-football.*.ppm [001-130] refers to the files football.001.ppm,
7d2009
-football.002.ppm, ..., football.009.ppm, football.010.ppm, ...,
7d2009
-football.130.ppm.
7d2009
-
7d2009
-

The third type of line is: single_star_expr

7d2009
-[x-y+s], where the
7d2009
-line is treated exactly as above, except that we skip by s.  Thus, the
7d2009
-line football.*.ppm [001-130+4] refers to the files
7d2009
-football.001.ppm, football.005.ppm, football.009.ppm,
7d2009
-football.013.ppm, etc.
7d2009
-
7d2009
-

Furthermore, a line may specify a shell command to execute to

7d2009
-generate lines to be interpreted as described above, as if those lines
7d2009
-were in the parameter file instead.  Use back ticks, like in the
7d2009
-Bourne Shell, like this:
7d2009
-
7d2009
-
7d2009
-    `cat myfilelist`
7d2009
-
7d2009
-
7d2009
-

7d2009
-If input is from Standard Input (per the INPUT_DIR statement), 
7d2009
-ppmtompeg ignores the INPUT/END_INPUT block, but
7d2009
-it still must be present.
7d2009
-     
7d2009
-
BASE_FILE_FORMAT {PPM | PNM | YUV |
7d2009
-     JPEG | JMOVIE}
7d2009
-
7d2009
-
ppmtompeg must convert all input files to one of the
7d2009
-following formats as a first step of processing: PNM, YUV, JPEG(v4),
7d2009
-or JMOVIE.  (The conversion may be trivial if your input files are
7d2009
-already in one of these formats).  This line specifies which of the
7d2009
-four formats.  PPM is actually a subset of PNM.  The separate
7d2009
-specification is allowed for backward compatibility.  Use PNM instead
7d2009
-of PPM in new applications.
7d2009
-
7d2009
-
INPUT_CONVERT conversion_command
7d2009
-
7d2009
-
You must specify how to convert a file to the base file format.
7d2009
-If no conversion is necessary, then you would just say:
7d2009
-
7d2009
-     
7d2009
-     INPUT_CONVERT *
7d2009
-     
7d2009
-     
7d2009
-

Otherwise, conversion_command is a shell command that causes

7d2009
-an image in the format your specified with BASE_FILE_FORMAT to
7d2009
-be written to Standard Output.  ppmtompeg executes the command
7d2009
-once for each line between INPUT and END_INPUT (which is
7d2009
-normally, but not necessarily, a file name).  In the conversion
7d2009
-command, ppmtompeg replaces each '*' with the contents of that
7d2009
-line.
7d2009
-     
7d2009
-     If you had a bunch of gif files, you might say:
7d2009
-     
7d2009
-     INPUT_CONVERT giftopnm *
7d2009
-     
7d2009
-
7d2009
-     If you have a bunch of separate a.Y, a.U, and a.V files (where
7d2009
-     the U and V have already been subsampled), then you might say:
7d2009
-
7d2009
-     
7d2009
-     INPUT_CONVERT cat *.Y *.U *.V
7d2009
-     
7d2009
-
7d2009
-

Input conversion is not allowed with input from stdin, so use

7d2009
-
7d2009
-     
7d2009
-     INPUT_CONVERT *
7d2009
-     
7d2009
-
7d2009
-as described above.
7d2009
-     
7d2009
-
SIZE widthxheight
7d2009
-
7d2009
-
7d2009
-
7d2009
-

width and height are the width and height of each

7d2009
-frame in pixels.
7d2009
-
7d2009
-

When ppmtompeg can get this information from the input image

7d2009
-files, it ignores the SIZE parameter and you may omit it.
7d2009
-
7d2009
-

When the image files are in YUV format, the files don't contain

7d2009
-dimension information, so SIZE is required.
7d2009
-
7d2009
-

When ppmtompeg is running in parallel mode, not all of the

7d2009
-processes in the network have access to the image files, so
7d2009
-SIZE is required and must give the same dimensions as the
7d2009
-input image files.
7d2009
-
7d2009
-
YUV_SIZE widthxheight
7d2009
-
7d2009
-
This is an obsolete synonym of SIZE.
7d2009
-
7d2009
-
YUV_FORMAT {ABEKAS | PHILLIPS | UCB |
7d2009
-                      EYUV | pattern}
7d2009
-
7d2009
-
This is meaningful only when BASE_FILE_FORMAT specifies
7d2009
-YUV format, and then it is required.  It specifies the sub-format of
7d2009
-the YUV class.
7d2009
-
7d2009
-
7d2009
-
GOP_SIZE n
7d2009
-
7d2009
-
n is the number of frames in a Group of Pictures. Except that
7d2009
-because a GOP must start with an I frame, ppmtompeg makes a GOP as
7d2009
-much longer than n as it has to to make the next GOP start with an
7d2009
-I frame. 
7d2009
-
7d2009
-

Normally, it makes sense to make your GOP size a multiple of your

7d2009
-pattern length (the latter is determined by the PATTERN parameter file
7d2009
-statement).
7d2009
-
7d2009
-

See Group Of Pictures.

7d2009
-
7d2009
-
SLICES_PER_FRAME n
7d2009
-
n is roughly the number of slices per frame. Note, at
7d2009
-least one MPEG player may complain if slices do not start at the left
7d2009
-side of an image.  To ensure this does not happen, make sure the
7d2009
-number of rows is divisible by SLICES_PER_FRAME.
7d2009
-
7d2009
-
PIXEL {FULL | HALF}
7d2009
-
7d2009
-
use half-pixel motion vectors, or just full-pixel ones It is
7d2009
-usually important that you use half-pixel motion vectors, because it
7d2009
-results in both better quality and better compression.
7d2009
-     
7d2009
-
7d2009
-
RANGE n
7d2009
-
Use a search range of n pixels in each of the four directions
7d2009
-from a subject pixel.  (So the search window is a square n*2 pixels
7d2009
-on a side).
7d2009
-
7d2009
-
PSEARCH_ALG {EXHAUSTIVE | TWOLEVEL |
7d2009
-     SUBSAMPLE | LOGARITHMIC}
7d2009
-
7d2009
-
This statement tells ppmtompeg what kind of search
7d2009
-    technique (algorithm) to use for P frames.  You select the desired
7d2009
-    combination of speed and compression.  EXHAUSTIVE gives the
7d2009
-    best compression, but LOGARITHMIC is the fastest.
7d2009
-    TWOLEVEL is an exhaustive full-pixel search, followed by a
7d2009
-    local half- pixel search around the best full-pixel vector (the
7d2009
-    PIXEL option is ignored for this search technique).
7d2009
-
7d2009
-
BSEARCH_ALG {SIMPLE | CROSS2 | EXHAUSTIVE}
7d2009
-
7d2009
-
This statement tells ppmtompeg what kind of search
7d2009
-    technique (algorithm) to use for B frames.  SIMPLE means
7d2009
-    find best forward and backward vectors, then interpolate.
7d2009
-    CROSS2 means find those two vectors, then see what backward
7d2009
-    vector best matches the best forward vector, and vice versa.
7d2009
-    EXHAUSTIVE does an n-squared search and is
7d2009
-    extremely slow in relation to the others (CROSS2
7d2009
-    is about half as fast as SIMPLE).
7d2009
-
7d2009
-
IQSCALE n
7d2009
-
Use n as the qscale for I frames.
7d2009
-     See Qscale.
7d2009
-
7d2009
-
PQSCALE n
7d2009
-
Use n as the qscale for P frames.
7d2009
-     See Qscale.
7d2009
-
7d2009
-
BQSCALE n
7d2009
-
Use n as the qscale for B frames.
7d2009
-     See Qscale.
7d2009
-
7d2009
-
REFERENCE_FRAME {ORIGINAL | DECODED}
This
7d2009
-statement determines whether ppmtompeg uses the original images
7d2009
-or the decoded images when computing motion vectors.  Using decoded
7d2009
-images is more accurate and should increase the playback quality of
7d2009
-the output, but it makes the encoding take longer and seems to give
7d2009
-worse compression.  It also causes some complications with parallel
7d2009
-encoding. (see the section on parallel encoding).  One thing you can
7d2009
-do as a trade-off is select ORIGINAL here, and lower the
7d2009
-qscale (see QSCALE if the quality is not good enough.
7d2009
-
7d2009
-
7d2009
-summary="comparison of original to decoded">
7d2009
-  <caption>Original or Decoded? (Normalized)</caption>
7d2009
-
7d2009
-
7d2009
-  
7d2009
-    Reference
7d2009
-    Compression
7d2009
-    Speed
7d2009
-    Quality I
7d2009
-    Quality P
7d2009
-    Quality B
7d2009
-    
7d2009
-  
7d2009
-    Decoded
7d2009
-    1000
7d2009
-    1000
7d2009
-    1000
7d2009
-    969
7d2009
-    919
7d2009
-    
7d2009
-  
7d2009
-    Original
7d2009
-    885
7d2009
-    1373
7d2009
-    1000
7d2009
-    912
7d2009
-    884
7d2009
-    
7d2009
-  
7d2009
-
7d2009
-
7d2009
-
7d2009
-
7d2009
-     
7d2009
-

The following lines are optional:

7d2009
-
7d2009
-
7d2009
-
7d2009
-
FORCE_ENCODE_LAST_FRAME
7d2009
-
7d2009
-
This statement is obsolete. It does nothing.
7d2009
-
7d2009
-

Before Netpbm 10.26 (January 2005), ppmtompeg would drop

7d2009
-trailing B frames from your movie, since a movie can't end with a B
7d2009
-frame.  (See I Frames, P Frames, B Frames.
7d2009
-You would have to specify FORCE_ENCODE_LAST_FRAME to stop
7d2009
-that from happening and get the same function that ppmtompeg
7d2009
-has today.
7d2009
-
7d2009
-
7d2009
-
NIQTABLE
7d2009
-
7d2009
-
This statement specifies a custom non-intra quantization table.
7d2009
-If you don't specify this statement, ppmtompeg uses a default
7d2009
-non-intra quantization table.
7d2009
-
7d2009
-

7d2009
-The 8 lines immediately following NIQTABLE specify the quantization
7d2009
-table.  Each line defines a table row and consists of 8 integers,
7d2009
-whitespace-delimited, which define the table columns.
7d2009
-
7d2009
-
IQTABLE
7d2009
-
7d2009
-
This is analogous to NIQTABLE, but for the intra quantization table.
7d2009
-
7d2009
-
ASPECT_RATIO ratio
7d2009
-
7d2009
-
This statement specifies the aspect ratio for ppmtompeg to
7d2009
-specify in the MPEG output.  I'm not sure what this is used for.
7d2009
-
7d2009
-

ratio must be 1.0, 0.6735, 0.7031, 0.7615, 0.8055, 0.8437,

7d2009
-0.8935, 0.9157, 0.9815, 1.0255, 1.0695, 1.0950, 1.1575, or 1.2015.
7d2009
-
7d2009
-
FRAME_RATE rate
7d2009
-
This specifies the frame rate for ppmtompeg to specify in the
7d2009
-MPEG output.  Some players use this value to determine the playback rate.
7d2009
-
7d2009
-

rate must be 23.976, 24, 25, 29.97, 30, 50, 59.94, or 60.

7d2009
-
7d2009
-
BIT_RATE rate
7d2009
-
This specifies the bit rate for Constant Bit Rate (CBR) encoding.
7d2009
-
7d2009
-

rate must be an integer.

7d2009
-
7d2009
-
BUFFER_SIZE size
7d2009
-
7d2009
-
This specifies the value
7d2009
-ppmtompeg is to specify in the MPEG output for the Video
7d2009
-Buffering Verifier (VBV) buffer size needed to decode the sequence.
7d2009
-
7d2009
-

A Video Verifying Buffer is a buffer in which a decoder keeps the

7d2009
-decoded bits in order to match the uneven speed of the decoding with
7d2009
-the required constant playback speed.
7d2009
-
7d2009
-

As ppmtompeg encodes the image, it simulates the decoding

7d2009
-process in terms of how many bits would be in the VBV as each frame gets
7d2009
-decoded, assuming a VBV of the size you indicate.  
7d2009
-
7d2009
-

If you specify the WARN_VBV_UNDERFLOW statement,

7d2009
-ppmtompeg issues a warning each time the simulation underflows
7d2009
-the buffer, which suggests that an underflow would occur on playback,
7d2009
-which suggests the buffer is too small.
7d2009
-
7d2009
-

If you specify the WARN_VBV_OVERFLOW statement,

7d2009
-ppmtompeg issues a warning each time the simulation overflows
7d2009
-the buffer, which suggests that an overflow would occur on playback,
7d2009
-which suggests the buffer is too small.
7d2009
-
7d2009
-
WARN_VBV_UNDERFLOW
7d2009
-
WARN_VBV_OVERFLOW
7d2009
-
7d2009
-
See BUFFER_SIZE.
7d2009
-
7d2009
-

These options were new in Netpbm 10.26 (January 2005). Before that,

7d2009
-ppmtompeg issued the warnings always.
7d2009
-
7d2009
-
7d2009
-
7d2009
-
7d2009
-The following statements apply only to parallel operation:
7d2009
-
7d2009
-
7d2009
-
7d2009
-
PARALLEL
7d2009
-
7d2009
-
This statement, paired with END PARALLEL, is what causes
7d2009
-ppmtompeg to operate in parallel mode.  See 
7d2009
-href="#parallel">Parallel Operation.
7d2009
-
7d2009
-
END PARALLEL
7d2009
-
7d2009
-
This goes with PARALLEL.
7d2009
-
7d2009
-
PARALLEL_TEST_FRAMES n
7d2009
-
7d2009
-
The master starts off by measuring each slave's speed. It does
7d2009
-this by giving each slave n frames to encode and noting how
7d2009
-long the slave takes to finish.  These are not just test frames,
7d2009
-though -- they're real frames and the results become part of the
7d2009
-output.
7d2009
-ppmtompeg is old and measures time in undivided seconds, so
7d2009
-to get useful timings, specify enough frames that it will take at
7d2009
-least 5 seconds to process them.  The default is 10.
7d2009
-
7d2009
-

If you specify FORCE_I_ALIGN, ppmtompeg will increase

7d2009
-the test frames value enough to maintain the alignment.
7d2009
-
7d2009
-

If there aren't enough frames for every slave to have the indicated

7d2009
-number of test frames, ppmtompeg will give some slaves fewer.
7d2009
-
7d2009
-
7d2009
-
PARALLEL_TIME_CHUNKS t
7d2009
-
7d2009
-
When you specify this statement, the master attempts to feed work
7d2009
-to the slaves in chunks that take t seconds to process.  It uses
7d2009
-the speed measurement it made when it started up (see PARALLEL_TEST_FRAMES)
7d2009
-to decide how many frames to put in the chunk.  This statement obviously
7d2009
-doesn't affect the first batch of work sent to each slave, which is the
7d2009
-one used to measure the slave's speed.
7d2009
-
7d2009
-

Smaller values of t increase communication, but improve load

7d2009
-balancing.  The default is 30 seconds.
7d2009
-
7d2009
-

You may specify only one of PARALLEL_TIME_CHUNKS, PARALLEL_CHUNK_TAPER,

7d2009
-and PARALLEL_PERFECT.  PARALLEL_CHUNK_TAPER is usually best.
7d2009
-
7d2009
-
PARALLEL_CHUNK_TAPER
7d2009
-
7d2009
-
When you specify this statement, the master distributes work like
7d2009
-with PARALLEL_TIME_CHUNKS, except that the master chooses the number
7d2009
-of seconds for the chunks.  It starts with a large number and, as it
7d2009
-gets closer to finishing the job, reduces it.  That way, it reduces
7d2009
-scheduling overhead when precise scheduling isn't helpful, but still
7d2009
-prevents a slave from finishing early after all the work has already
7d2009
-been handed out to the other slaves, and then sitting idle while
7d2009
-there's still work to do.
7d2009
-
7d2009
-

You may specify only one of PARALLEL_TIME_CHUNKS, PARALLEL_CHUNK_TAPER,

7d2009
-and PARALLEL_PERFECT.  PARALLEL_CHUNK_TAPER is usually best.
7d2009
-
7d2009
-
7d2009
-
PARALLEL_PERFECT
7d2009
-
7d2009
-
If this statement is present, ppmtompeg schedules on the
7d2009
-assumption that each machine is about the same speed.  The master will
7d2009
-simply divide up the frames evenly between the slaves -- each
7d2009
-slave gets the same number of frames.  If some slaves are faster than
7d2009
-others, they will finish first and remain idle while the slower slaves
7d2009
-continue.  
7d2009
-
7d2009
-

This has the advantage of minimal scheduling overhead. Where slaves

7d2009
-have different speeds, though, it makes inefficient use of the fast
7d2009
-ones.  Where slaves are the same speed, it also has the disadvantage
7d2009
-that they all finish at the same time and feed their output to the
7d2009
-single Combine Server in a burst, which makes less efficient use of
7d2009
-the Combine Server and thus can increase the total elapsed time.
7d2009
-
7d2009
-

You may specify only one of PARALLEL_TIME_CHUNKS, PARALLEL_CHUNK_TAPER,

7d2009
-and PARALLEL_PERFECT.  PARALLEL_CHUNK_TAPER is usually best.
7d2009
-
7d2009
-
RSH remote_shell_command
7d2009
-
7d2009
-
ppmtompeg executes the shell command
7d2009
-remote_shell_command to start a process on another machine.
7d2009
-The default command is rsh, and whatever command you specify
7d2009
-must have compatible semantics.  ssh is usually compatible.
7d2009
-The command ppmtompeg uses is one like this:
7d2009
-ssh remote.host.com -l username shellcommand.
7d2009
-
7d2009
-

Be sure to set up .rhosts files or SSH key authorizations

7d2009
-where needed.  Otherwise, you'll have to type in passwords.
7d2009
-
7d2009
-

On some HP machines, rsh is the restricted shell, and you want

7d2009
-to specify remsh.
7d2009
-
7d2009
-
FORCE_I_ALIGN
7d2009
-
7d2009
-
This statement forces each slave to encode a chunk of frames which
7d2009
-is a multiple of the pattern length (see PATTERN).  Since the
7d2009
-first frame in any pattern is an I frame, this forces each chunk
7d2009
-encoded by a slave to begin with an I frame.
7d2009
-
7d2009
-

This document used to say there was an argument to

7d2009
-FORCE_I_ALIGN which was the number of frames ppmtompeg
7d2009
-would use (and was required to be a multiple of the pattern length).
7d2009
-But ppmtompeg has apparently always ignored that argument, and
7d2009
-it does now.
7d2009
-
7d2009
-
KEEP_TEMP_FILES
7d2009
-
7d2009
-
This statement causes ppmtompeg not to delete the temporary
7d2009
-files it uses to transmit encoded frames to the combine server.  This
7d2009
-means you will be left with a file for each frame, the same as you
7d2009
-would get with the -frames option.  
7d2009
-
7d2009
-

This is mostly useful for debugging.

7d2009
-
7d2009
-

This works only if you're using a shared filesystem to communicate

7d2009
-between the servers.
7d2009
-
7d2009
-

This option was new in Netpbm 10.26 (January 2005).

7d2009
-
7d2009
-
7d2009
-
7d2009
-
7d2009
-

Parameter File Notes

7d2009
-
7d2009
-

If you use the -combine_gops option, then you need to specify

7d2009
-only the SIZE and OUTPUT values in the parameter file.  In
7d2009
-addition, the parameter file may specify input GOP files in the same
7d2009
-manner as normal input files -- except instead of using INPUT_DIR,
7d2009
-INPUT, and END_INPUT, use GOP_INPUT_DIR, GOP_INPUT, and GOP_END_INPUT.
7d2009
-If you specify no input GOP files, then ppmtompeg uses by default the
7d2009
-output file name with suffix .gop.gop_num, with gop_num
7d2009
-starting from 0, as the input files. 
7d2009
-
7d2009
-

If you use the -combine_frames option, then you need to

7d2009
-specify only the SIZE, GOP_SIZE, and OUTPUT values in the
7d2009
-parameter file.  In addition, the parameter file may specify input
7d2009
-frame files in the same manner as normal input files -- except instead
7d2009
-of using INPUT_DIR, INPUT, and END_INPUT, use FRAME_INPUT_DIR,
7d2009
-FRAME_INPUT, and FRAME_END_INPUT.  If no input frame files are
7d2009
-specified, then the default is to use the output file name with suffix
7d2009
-.frame.frame_num, with frame_num starting from 0,
7d2009
-as the input files.
7d2009
-
7d2009
-

Any number of spaces and tabs may come between each option and value. Lines

7d2009
-beginning with # are ignored.  Any other lines are ignored except for
7d2009
-those between INPUT and END_INPUT.  This allows you to use the same
7d2009
-parameter file for normal usage and for -combine_gops and
7d2009
--combine_frames.
7d2009
-
7d2009
-

The file format is case-sensitive so all keywords should be in

7d2009
-upper case.
7d2009
-
7d2009
-

The statements may appear in any order, except that the order within

7d2009
-a block statement (such as INPUT ... END INPUT) is significant.
7d2009
-
7d2009
-

ppmtompeg is prepared to handle up to 16 B frames between

7d2009
-reference frames when encoding with input from stdin.  (To build a
7d2009
-modified ppmtompeg with a higher limit, change the constant
7d2009
-B_FRAME_RUN in frame.c and recompile).
7d2009
-
7d2009
-

GENERAL USAGE INFORMATION

7d2009
-
7d2009
-

Qscale

7d2009
-
7d2009
-

The quantization scale values (qscale) give a trade-off between

7d2009
-quality and compression.  Using different Qscale values has very little
7d2009
-effect on speed.  The qscale values can be set separately for I, P, and
7d2009
-B frames.
7d2009
-
7d2009
-

You select the qscale values with the IQSCALE,

7d2009
-PQSCALE, and BSCALE parameter file statements.
7d2009
-
7d2009
-

A qscale value is an integer from 1 to 31. Larger numbers give

7d2009
-better compression, but worse quality.  In the following, the quality
7d2009
-numbers are peak signal-to-noise ratio, defined as:
7d2009
-signal-to-noise formula
7d2009
-where MSE is the mean squared error.
7d2009
-     
7d2009
-
7d2009
-

Flower garden tests:

7d2009
-
7d2009
-
7d2009
-  <caption>Qscale vs Quality</caption>
7d2009
-
7d2009
-
7d2009
-  
7d2009
-    Qscale
7d2009
-    I Frames
7d2009
-    P Frames
7d2009
-    B Frames
7d2009
-    
7d2009
-  
7d2009
-    1
7d2009
-    43.2
7d2009
-    46.3
7d2009
-    46.5
7d2009
-    
7d2009
-  
7d2009
-    6
7d2009
-    32.6
7d2009
-    34.6
7d2009
-    34.3
7d2009
-    
7d2009
-  
7d2009
-    11
7d2009
-    28.6
7d2009
-    29.5
7d2009
-    30.0
7d2009
-    
7d2009
-  
7d2009
-    16
7d2009
-    26.3
7d2009
-    26.8
7d2009
-    28.6
7d2009
-    
7d2009
-  
7d2009
-    21
7d2009
-    24.7
7d2009
-    25.0
7d2009
-    27.9
7d2009
-    
7d2009
-  
7d2009
-    26
7d2009
-    23.5
7d2009
-    23.9
7d2009
-    27.5
7d2009
-    
7d2009
-  
7d2009
-    31
7d2009
-    22.6
7d2009
-    23.0
7d2009
-    27.3
7d2009
-    
7d2009
-
7d2009
-
7d2009
-
7d2009
-summary="Qscale vs Compression">
7d2009
-  <caption>Qscale vs Compression</caption>
7d2009
-
7d2009
-
7d2009
-  
7d2009
-    Qscale
7d2009
-    I Frames
7d2009
-    P Frames
7d2009
-    B Frames
7d2009
-    
7d2009
-  
7d2009
-    1
7d2009
-    2
7d2009
-    2
7d2009
-    2
7d2009
-    
7d2009
-  
7d2009
-    6
7d2009
-    7
7d2009
-    10
7d2009
-    15
7d2009
-    
7d2009
-  
7d2009
-    11
7d2009
-    11
7d2009
-    18
7d2009
-    43
7d2009
-    
7d2009
-  
7d2009
-    16
7d2009
-    15
7d2009
-    29
7d2009
-    97
7d2009
-    
7d2009
-  
7d2009
-    21
7d2009
-    19
7d2009
-    41
7d2009
-    173
7d2009
-    
7d2009
-  
7d2009
-    26
7d2009
-    24
7d2009
-    56
7d2009
-    256
7d2009
-    
7d2009
-  
7d2009
-    31
7d2009
-    28
7d2009
-    73
7d2009
-    330
7d2009
-    
7d2009
-
7d2009
-
7d2009
-
7d2009
-

Search Techniques

7d2009
-     
7d2009
-

There are several different motion vector search techniques

7d2009
-available.  There are different techniques available for P frame
7d2009
-search and B frame search. Using different search techniques present
7d2009
-little difference in quality, but a large difference in compression
7d2009
-and speed.
7d2009
-     
7d2009
-

There are 4 types of P frame search: Exhaustive, TwoLevel,

7d2009
-SubSample, and Logarithmic.
7d2009
-     
7d2009
-

There are 3 types of B frame search: Exhaustive, Cross2, and

7d2009
-Simple.
7d2009
-     
7d2009
-The recommended search techniques are TwoLevel and Logarithmic for
7d2009
-P frame search, and Cross2 and Simple for B frame search. Here are
7d2009
-some numbers comparing the different search methods:
7d2009
-     
7d2009
-
7d2009
-summary="P frame motion vector search">
7d2009
-  <caption>P frame Motion Vector Search (Normalized)</caption>
7d2009
-
7d2009
-
7d2009
-  
7d2009
-    Technique
7d2009
-    Compression<sup>1</sup>
7d2009
-    Speed      <sup>2</sup>
7d2009
-    Quality    <sup>3</sup>
7d2009
-    
7d2009
-  
7d2009
-    Exhaustive
7d2009
-    1000
7d2009
-    1000
7d2009
-    1000
7d2009
-    
7d2009
-  
7d2009
-    SubSample
7d2009
-    1008
7d2009
-    2456
7d2009
-    1000
7d2009
-    
7d2009
-  
7d2009
-    TwoLevel
7d2009
-    1009
7d2009
-    3237
7d2009
-    1000
7d2009
-    
7d2009
-  
7d2009
-    Logarithmic
7d2009
-    1085
7d2009
-    8229
7d2009
-    998
7d2009
-    
7d2009
-
7d2009
-
7d2009
-
7d2009
-summary="B frame motion vector search">
7d2009
-  <caption>B frame Motion Vector Search (Normalized)</caption>
7d2009
-
7d2009
-
7d2009
-  
7d2009
-    Technique
7d2009
-    Compression<sup>1</sup>
7d2009
-    Speed<sup>2</sup>
7d2009
-    Quality<sup>3</sup>
7d2009
-    
7d2009
-  
7d2009
-    Exhaustive
7d2009
-    1000
7d2009
-    1000
7d2009
-    1000
7d2009
-    
7d2009
-  
7d2009
-    Cross2
7d2009
-    975
7d2009
-    1000
7d2009
-    996
7d2009
-    
7d2009
-  
7d2009
-    Simple
7d2009
-    938
7d2009
-    1765
7d2009
-    991
7d2009
-    
7d2009
-
7d2009
-
7d2009
- <sup>1</sup>Smaller numbers are better
7d2009
-compression.
7d2009
-
7d2009
- <sup>2</sup>Larger numbers mean faster
7d2009
-execution.
7d2009
-
7d2009
- <sup>3</sup>Larger numbers mean better quality.
7d2009
-
7d2009
-

For some reason, Simple seems to give better compression, but it

7d2009
-depends on the image sequence.
7d2009
-
7d2009
-

Select the search techniques with the PSEARCH_ALG and

7d2009
-BSEARCH_ALG parameter file statements.
7d2009
-
7d2009
-
7d2009
-
7d2009
-

Group Of Pictures (GOP)

7d2009
-
7d2009
-

A Group of Pictures (GOP) is a roughly independently decodable

7d2009
-sequence of frames.  An MPEG video stream is made of one or more
7d2009
-GOP's.  You may specify how many frames should be in each GOP with the
7d2009
-GOP_SIZE parameter file statement.  A GOP always starts with an
7d2009
-I frame.
7d2009
-
7d2009
-

Instead of encoding an entire sequence, you can encode a single

7d2009
-GOP.  To do this, use the -gop command option.  You can later
7d2009
-join the resulting GOP files at any time by running ppmtompeg
7d2009
-with the -combine_gops command option.
7d2009
-     
7d2009
-     
7d2009
-

Slices

7d2009
-
7d2009
-

A slice is an independently decodable unit in a frame. It can be

7d2009
-as small as one macroblock, or it can be as big as the entire frame.
7d2009
-Barring transmission error, adding slices does not change quality or
7d2009
-speed; the only effect is slightly worse compression.  More slices are
7d2009
-used for noisy transmission so that errors are more recoverable. Since
7d2009
-usually errors are not such a problem, we usually just use one slice
7d2009
-per frame.
7d2009
-     
7d2009
-

Control the slice size with the SLICES_PER_FRAME parameter

7d2009
-file statement.
7d2009
-
7d2009
-

Some MPEG playback systems require that each slice consist of whole

7d2009
-rows of macroblocks.  If you are encoding for this kind of player, if
7d2009
-the height of the image is H pixels, then you should set the
7d2009
-SLICES_PER_FRAME to some number which divides H/16.  For example, if
7d2009
-the image is 240 pixels (15 macroblocks) high, then you should use
7d2009
-only 15, 5, 3, or 1 slices per frame.
7d2009
-     
7d2009
-

Note: these MPEG playback systems are really wrong, since the MPEG

7d2009
-standard says this doesn't have to be so.
7d2009
-
7d2009
-
7d2009
-
7d2009
-

Search Window

7d2009
-     
7d2009
-

The search window is the window in which ppmtompeg searches

7d2009
-for motion vectors.  The window is a square.  You can specify the size
7d2009
-of the square, and whether to allow half-pixel motion vectors or not,
7d2009
-with the RANGE and PIXEL parameter file statements.
7d2009
-
7d2009
-

I Frames, P Frames, B Frames

7d2009
-
7d2009
-

In MPEG-1, a movie is represented as a sequence of MPEG frames,

7d2009
-each of which is an I Frame, a P Frame, or a B Frame.  Each represents
7d2009
-an actual frame of the movie (don't get confused by the dual use of
7d2009
-the word "frame."  A movie frame is a graphical image.  An MPEG frame
7d2009
-is a set of data that describes a movie frame).
7d2009
-
7d2009
-

An I frame ("intra" frame) describes a movie frame in isolation --

7d2009
-without respect to any other frame in the movie.  A P frame
7d2009
-("predictive" frame) describes a movie frame by describing how it
7d2009
-differs from the movie frame described by the latest preceding I  or
7d2009
-P frame.  A B frame ("bidirectional" frame) describes a movie frame by
7d2009
-describing how it differs from the movie frames described by the
7d2009
-nearest I or P frame before and after it.
7d2009
-
7d2009
-

Note that the first frame of a movie must be described by an I

7d2009
-frame (because there is no previous movie frame) and the last movie
7d2009
-frame must be described by an I or P frame (because there is no
7d2009
-subsequent movie frame).
7d2009
-
7d2009
-

Beyond that, you can choose which frames are represented by which

7d2009
-types.  You specify a pattern, such as IBPBP and ppmtompeg
7d2009
-simply repeats it over and over throughout the movie.  The pattern
7d2009
-affects speed, quality, and stream size.  Here is a chart which shows
7d2009
-some of the trade-offs:
7d2009
-
7d2009
-
7d2009
-summary="Comparison of I/P/B Frames">
7d2009
-  <caption>Comparison of I/P/B Frames (Normalized)</caption>
7d2009
-
7d2009
-
7d2009
-  
7d2009
-    Frame Type
7d2009
-    Size
7d2009
-    Speed
7d2009
-    Quality
7d2009
-    
7d2009
-  
7d2009
-    I frames
7d2009
-    1000
7d2009
-    1000
7d2009
-    1000
7d2009
-    
7d2009
-  
7d2009
-    P frames
7d2009
-    409
7d2009
-    609
7d2009
-    969
7d2009
-    
7d2009
-  
7d2009
-    B frames
7d2009
-    72
7d2009
-    260
7d2009
-    919
7d2009
-    
7d2009
-  
7d2009
-
7d2009
-(this is with constant qscale)
7d2009
-     
7d2009
-

A standard sequence is IBBPBBPBBPBBPBB.

7d2009
-     
7d2009
-

Select the sequence with the PATTERN parameter file statement.

7d2009
-
7d2009
-

Since the last MPEG frame cannot be a B frame (see above), if the

7d2009
-pattern you specify indicates a B frame for the last movie frame of
7d2009
-the movie, ppmtompeg makes it an I frame instead.
7d2009
-
7d2009
-

Before Netpbm 10.26 (January 2005), ppmtompeg instead drops

7d2009
-the trailing B frames by default, and you need the
7d2009
-FORCE_ENCODE_LAST_FRAME parameter file statement to make it do
7d2009
-this.
7d2009
-
7d2009
-

The MPEG frames don't appear in the MPEG-1 stream in the same order that

7d2009
-the corresponding movie frames appear in the movie -- the B frames come after
7d2009
-the I and P frames on which they are based.  For example, if the movie is
7d2009
-4 frames that you will represent with the pattern IBBP, the MPEG-1 stream
7d2009
-will start with an I frame describing movie frame 0.  The next frame in
7d2009
-the MPEG-1 stream is a P frame describing movie frame 3.  The last two
7d2009
-frames in the MPEG-1 stream are B frames describing movie frames 1 and 2,
7d2009
-respectively.
7d2009
-
7d2009
-
7d2009
-

Specifying Input and Output Files

7d2009
-
7d2009
-

Specify the input frame images with the INPUT_DIR,

7d2009
-INPUT, END_INPUT, BASE_FILE_FORMAT,
7d2009
-SIZE, YUV_FORMAT and INPUT_CONVERT parameter
7d2009
-file statements.
7d2009
-
7d2009
-

Specify the output file with the OUTPUT parameter file statement.

7d2009
-
7d2009
-
7d2009
-

Statistics

7d2009
-
7d2009
-

ppmtompeg can generate a variety of statistics about the

7d2009
-encoding.  See the -stat, -snr, -mv_histogram,
7d2009
--quiet, -no_frame_summary, and -bit_rate_info
7d2009
-options.
7d2009
-     
7d2009
-
7d2009
-

PARALLEL OPERATION

7d2009
-
7d2009
-

You can run ppmtompeg on multiple machines at once, encoding

7d2009
-the same MPEG stream.  When you do, the machines are used as shown in
7d2009
-the following diagram.  We call this "parallel mode."
7d2009
-
7d2009
-

ppmtompeg-par.gif

7d2009
-
7d2009
-

To do parallel processing, put the statement

7d2009
-
7d2009
-
7d2009
-    PARALLEL
7d2009
-
7d2009
-
7d2009
-in the parameter file, followed by a listing of the machines, one
7d2009
-machine per line, then
7d2009
-
7d2009
-
7d2009
-    END_PARALLEL
7d2009
-
7d2009
-
7d2009
-Each of the machine lines must be in one of two forms.  If the machine
7d2009
-has filesystem access to the input files, then the line is:
7d2009
-
7d2009
-

7d2009
-machine user executable
7d2009
-
7d2009
-

The executable is normally ppmtompeg (you may need to give

7d2009
-the complete path if you've built for different architectures).  If
7d2009
-the machine does not have filesystem access to the input files, the line
7d2009
-is:
7d2009
-
7d2009
-

REMOTE machine user executable

7d2009
-parameter file
7d2009
-
7d2009
-

The -max_machines command option limits the number of

7d2009
-machines ppmtompeg will use.  If you specify more machines in
7d2009
-the parameter file than -max_machines allows, ppmtompeg
7d2009
-uses only the machines listed first.  This is handy if you want to
7d2009
-experiment with different amounts of parallelism.
7d2009
-
7d2009
-

In general, you should use full path file names when describing

7d2009
-executables and parameter files.  This includes the parameter
7d2009
-file argument on the original invocation of ppmtompeg.
7d2009
-
7d2009
-

All file names must be the same on all systems (so if e.g. you're

7d2009
-using an NFS filesystem, you must make sure it is mounted at the same
7d2009
-mountpoint on all systems).
7d2009
-
7d2009
-

Because not all of the processes involved in parallel operation

7d2009
-have easy access to the input files, you must specify the SIZE
7d2009
-parameter file statement when you do parallel operation.
7d2009
-
7d2009
-

The machine on which you originally invoke ppmtompeg is the

7d2009
-master machine.  It hosts a "combine server,", a
7d2009
-"decode server," and a number of "i/o servers,"
7d2009
-all as separate processes.  The other machines in the network (listed
7d2009
-in the parameter file) are slave machines.  Each hosts a single
7d2009
-process that continuously requests work from the master and does it.
7d2009
-The slave process does the computation to encode MPEG frames.  It
7d2009
-processes frames in batches identified by the master.
7d2009
-
7d2009
-

The master uses a remote shell command to start a process on a

7d2009
-slave machine.  By default, it uses an rsh shell command to do
7d2009
-this.  But use the RSH parameter file statement to control
7d2009
-this.  The shell command the master executes remotely is
7d2009
-ppmtompeg, but with options to indicate that it is to perform
7d2009
-slave functions.
7d2009
-
7d2009
-

The various machines talk to each other over TCP connections. Each

7d2009
-machine finds and binds to a free TCP port number and tells its
7d2009
-partners the port number.  These port numbers are at least 2048.
7d2009
-
7d2009
-

Use the PARALLEL_TEST_FRAMES, PARALLEL_TIME_CHUNKS, and

7d2009
-PARALLEL_PERFECT parameter file statements to control the way the
7d2009
-master divides up work among the slaves.
7d2009
-
7d2009
-

Use the -nice command option to cause all slave processes to run

7d2009
-"nicely," i.e. as low priority processes.  That way, this substantial and
7d2009
-long-running CPU load will have minimal impact on other, possibly
7d2009
-interactive, users of the systems.
7d2009
-
7d2009
- 
7d2009
-

SPEED

7d2009
-
7d2009
-

Here is a look at ppmtompeg speed, in single-node (not parallel)

7d2009
-operation:
7d2009
-
7d2009
-
7d2009
-  <caption>Compression Speed</caption>
7d2009
-
7d2009
-
7d2009
-  
7d2009
-    Machine Type
7d2009
-    Macroblocks per second<sup>1</sup>
7d2009
-    
7d2009
-  
7d2009
-    HP 9000/755
7d2009
-    280
7d2009
-    
7d2009
-  
7d2009
-    DEC 3000/400
7d2009
-    247
7d2009
-    
7d2009
-  
7d2009
-    HP 9000/750
7d2009
-    191
7d2009
-    
7d2009
-  
7d2009
-    Sparc 10
7d2009
-    104
7d2009
-    
7d2009
-  
7d2009
-    DEC 5000
7d2009
-    68
7d2009
-    
7d2009
-
7d2009
-<sup>1</sup>A macroblock is a 16x16 pixel square
7d2009
-
7d2009
-

The measurements in the table are with inputs and outputs via a

7d2009
-conventional locally attached filesystem.  If you are using a network
7d2009
-filesystem over a single 10 MB/s Ethernet, that constrains your speed more
7d2009
-than your CPU speed.  In that case, don't expect to get better than 4
7d2009
-or 5 frames per second no matter how fast your CPUs are.
7d2009
-
7d2009
-

Network speed is even more of a bottleneck when the slaves do not

7d2009
-have filesystem access to the input files -- i.e. you declare them
7d2009
-REMOTE.
7d2009
-
7d2009
-

Where I/O is the bottleneck, size of the input frames can make a big

7d2009
-difference.  So YUV input is better than PPM, and JPEG is better than
7d2009
-both.
7d2009
-
7d2009
-

When you're first trying to get parallel mode working, be sure to

7d2009
-use the -debug_machines option so you can see what's going on.
7d2009
-Also, -debug_sockets can help you diagnose communication
7d2009
-problems.
7d2009
-
7d2009
-
7d2009
-

AUTHORS

7d2009
-
7d2009
-
    7d2009
    -
    7d2009
    -
  • Kevin Gong - University of California, Berkeley,
  • 7d2009
    -HREF="mailto:keving@cs.berkeley.edu">keving@cs.berkeley.edu
    7d2009
    -
    7d2009
    -
  • Ketan Patel - University of California, Berkeley,
  • 7d2009
    -HREF="mailto:kpatel@cs.berkeley.edu">kpatel@cs.berkeley.edu
    7d2009
    -
    7d2009
    -
  • Dan Wallach - University of California, Berkeley,
  • 7d2009
    -HREF="mailto:dwallach@cs.berkeley.edu">dwallach@cs.berkeley.edu
    7d2009
    -
    7d2009
    -
  • Darryl Brown - University of California, Berkeley,
  • 7d2009
    -HREF="mailto:darryl@cs.berkeley.edu">darryl@cs.berkeley.edu
    7d2009
    -
    7d2009
    -
  • Eugene Hung - University of California, Berkeley,
  • 7d2009
    -HREF="mailto:eyhung@cs.berkeley.edu">eyhung@cs.berkeley.edu
    7d2009
    -
    7d2009
    -
  • Steve Smoot - University of California, Berkeley,
  • 7d2009
    -HREF="mailto:smoot@cs.berkeley.edu">smoot@cs.berkeley.edu
    7d2009
    -
    7d2009
    -
    7d2009
    -
    7d2009
    -
    7d2009
    - 
    7d2009
    -

    Table Of Contents

    7d2009
    -
      7d2009
      -
    • SYNOPSIS
    • 7d2009
      -
    • DESCRIPTION
    • 7d2009
      -
    • OPTIONS
    • 7d2009
      -
    • PARAMETER FILE
    • 7d2009
      -
    • GENERAL USAGE INFORMATION
    • 7d2009
      -
    • PARALLEL OPERATION
    • 7d2009
      -
    • SPEED
    • 7d2009
      -
    • AUTHORS
    • 7d2009
      -
      7d2009
      -</BODY>
      7d2009
      -</HTML>