Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 413e0bdb3c48563b2d8d9038d07d5533 > files > 2064

grass-6.3.0-15.fc13.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS: r.out.mpeg</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">

<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>

<h2>NAME</h2>
<em><b>r.out.mpeg</b></em>  - Raster File Series to MPEG Conversion Program.
<h2>KEYWORDS</h2>
raster
<h2>SYNOPSIS</h2>
<b>r.out.mpeg</b><br>
<b>r.out.mpeg help</b><br>
<b>r.out.mpeg</b> [-<b>qc</b>] <b>view1</b>=<em>string</em>[,<i>string</i>,...]  [<b>view2</b>=<em>string</em>[,<i>string</i>,...]]   [<b>view3</b>=<em>string</em>[,<i>string</i>,...]]   [<b>view4</b>=<em>string</em>[,<i>string</i>,...]]   [<b>output</b>=<em>string</em>]   [<b>qual</b>=<em>integer</em>]   [--<b>verbose</b>]  [--<b>quiet</b>] 

<h3>Flags:</h3>
<DL>
<DT><b>-q</b></DT>
<DD>Quiet - suppress progress report</DD>

<DT><b>-c</b></DT>
<DD>Convert on the fly, use less disk space
	(requires r.out.ppm with stdout option)</DD>

<DT><b>--verbose</b></DT>
<DD>Verbose module output</DD>
<DT><b>--quiet</b></DT>
<DD>Quiet module output</DD>
</DL>

<h3>Parameters:</h3>
<DL>
<DT><b>view1</b>=<em>string[,<i>string</i>,...]</em></DT>
<DD>Raster file(s) for View1</DD>

<DT><b>view2</b>=<em>string[,<i>string</i>,...]</em></DT>
<DD>Raster file(s) for View2</DD>

<DT><b>view3</b>=<em>string[,<i>string</i>,...]</em></DT>
<DD>Raster file(s) for View3</DD>

<DT><b>view4</b>=<em>string[,<i>string</i>,...]</em></DT>
<DD>Raster file(s) for View4</DD>

<DT><b>output</b>=<em>string</em></DT>
<DD>Name for output file</DD>
<DD>Default: <em>gmovie.mpg</em></DD>

<DT><b>qual</b>=<em>integer</em></DT>
<DD>Quality factor (1 = highest quality, lowest compression)</DD>
<DD>Options: <em>1-5</em></DD>
<DD>Default: <em>3</em></DD>

</DL>
<H2>DESCRIPTION</H2>

<EM>r.out.mpeg</EM> is a tool for combining a series of GRASS raster maps
into a single MPEG-1 (Motion Pictures Expert Group) format file.  MPEG-1 is
a "lossy" video compression format, so the quality of each resulting frame
of the animation will be much diminished from the original raster image. 
The resulting output file may then be viewed using your favorite mpeg-format
viewing program.
MPEG-2 and MPEG-4 provide much better quality animations.

<P>
The user may define up to four "views", or sub-windows, to animate
simultaneously.  e.g., View 1 could be rainfall, View 2 flooded areas, View
3 damage to bridges or levees, View 4 other economic damage, all animated as
a time series. A black border 2 pixels wide is drawn around each view. There
is an arbitrary limit of 400 files per view (400 animation frames). 
Temporary files are created in the conversion process, so lack of adequate
tmp space could also limit the number of frames you are able to convert.
<!-- flag to keep these to feed into another more modern encoder? -->

<P>
The environment variable GMPEG_SIZE is checked for a value to use as the
dimension, in pixels, of the longest dimension of the animation image.  If
GMPEG_SIZE is not set, the animation size defaults to the rows &amp; columns
in the current GRASS region, scaling if necessary to a default minimum size
of 200 and maximum of 500.  These size defaults are overridden when using
the -c flag (see below).  The resolution of the current GRASS region is
maintained, independent of image size.  Playback programs have to decode the
compressed data "on-the-fly", therefore smaller dimensioned animations will
provide higher frame rates and smoother animations.

<P>
UNIX - style wild cards may be used with the command line version in place
of a raster map name, but wild cards must be quoted.

<h2>Example:</h2>
<div class="code"><pre>
r.out.mpeg view1="rain[1-9]","rain1[0-2]" view2="temp*"
</pre></div>

<P>
If the number of files differs for each view, the view with the fewest files
will determine the number of frames in the animation.

<P>
With <B>-c</B> flag the module converts "on the fly", uses less disk space
by using <EM>r.out.ppm</EM> with stdout option to convert frames as needed
instead of converting all frames to ppm before encoding.  Only use when
encoding a single view.  Use of this option also overrides any size
defaults, using the <B>CURRENTLY DEFINED GRASS REGION for the output size</B>.
So be careful to set region to a reasonable size prior to encoding.

<P>
A quality value of <EM>qual=1</EM> will yield higher quality images, but
with less compression (larger MPEG file size).  Compression ratios will vary
depending on the number of frames in the animation, but an MPEG produced
using <EM>qual=5</EM> will usually be about 60% the size of the MPEG
produced using <EM>qual=1</EM>.

<H2>BUGS</H2>
MPEG images must be 16-pixel aligned for successful compression, so if the
rows &amp; columns of the calculated image size (scaled, with borders added)
are not evenly divisible by 16, a few rows/columns will be cut off the
bottom &amp; right sides of the image. The MPEG format is optimized to
recognize image MOTION, so abrupt changes from one frame to another will
cause a "noisy" encoding.

<H2>NOTES</H2>
This program requires the program <EM>mpeg_encode</EM> (aka <EM>ppmtompeg</EM>):
<P>
MPEG-1 Video Software Encoder<BR>
(Version 1.3; March 14, 1994)
<P>
Lawrence A. Rowe, Kevin Gong, Ketan Patel, and Dan Wallach Computer Science 
Division-EECS, <DD>Univ. of Calif. at Berkeley</DD>
<P>
Available from Berkeley: 
<a href="http://bmrc.berkeley.edu/frame/research/mpeg/mpeg_encode.html">http://bmrc.berkeley.edu/frame/research/mpeg/mpeg_encode.html</a>
<BR>or as part of the netpbm package (<em>ppmtompeg</em>):
<a href="http://netpbm.sourceforge.net">http://netpbm.sourceforge.net</a>

<P>
Playback may be done with many viewers; <em>mpeg_encode</em>'s official companion 
is <em>mpeg_play</em> available from Berkeley at 
<a href="ftp://mm-ftp.cs.berkeley.edu/pub/multimedia/mpeg/play/">ftp://mm-ftp.cs.berkeley.edu/pub/multimedia/mpeg/play/</a>
or a precompiled Debian package from 
<a href="http://packages.debian.org/ucbmpeg-play">http://packages.debian.org/ucbmpeg-play</a>
(includes maintained source code).

<P>
Use of the <EM>-c</EM> flag requires the <EM>r.out.ppm</EM> GRASS module 
with the <EM>stdout</EM> option.


<H2>SEE ALSO</H2>
<EM><A HREF="r.out.ppm.html">r.out.ppm</A></EM>
<br>


<H2>AUTHOR</H2>
Bill Brown,
U.S. Army Construction Engineering Research Laboratories

<p><i>Last changed: $Date: 2006-12-13 15:21:43 +0100 (Wed, 13 Dec 2006) $</i>
<HR>
<P><a href="index.html">Main index</a> - <a href="raster.html">raster index</a> - <a href="full_index.html">Full index</a></P>
<P>&copy; 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>