1r.out.mpeg(1)               GRASS GIS User's Manual              r.out.mpeg(1)
2
3
4

NAME

6       r.out.mpeg  - Converts raster map series to MPEG movie.
7

KEYWORDS

9       raster, export, output, animation
10

SYNOPSIS

12       r.out.mpeg
13       r.out.mpeg --help
14       r.out.mpeg    [-c]    view1=name[,name,...]     [view2=name[,name,...]]
15       [view3=name[,name,...]]   [view4=name[,name,...]]  output=name   [qual‐
16       ity=integer]   [--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]
17
18   Flags:
19       -c
20           Convert on the fly, uses less disk space
21           Requires r.out.ppm with stdout option
22
23       --overwrite
24           Allow output files to overwrite existing files
25
26       --help
27           Print usage summary
28
29       --verbose
30           Verbose module output
31
32       --quiet
33           Quiet module output
34
35       --ui
36           Force launching GUI dialog
37
38   Parameters:
39       view1=name[,name,...] [required]
40           Name of input raster map(s) for view no.1
41
42       view2=name[,name,...]
43           Name of input raster map(s) for view no.2
44
45       view3=name[,name,...]
46           Name of input raster map(s) for view no.3
47
48       view4=name[,name,...]
49           Name of input raster map(s) for view no.4
50
51       output=name [required]
52           Name for output file
53
54       quality=integer
55           Quality factor (1 = highest quality, lowest compression)
56           Options: 1-5
57           Default: 3
58

DESCRIPTION

60       r.out.mpeg is a tool for combining a series of GRASS raster maps into a
61       single MPEG-1 (Motion Pictures Experts Group) format file.  MPEG-1 is a
62       "lossy"  video  compression  format,  so  the quality of each resulting
63       frame of the animation will be much diminished from the original raster
64       image.   The  resulting  output  file may then be viewed using your fa‐
65       vorite mpeg-format viewing program.  MPEG-2  and  MPEG-4  provide  much
66       better quality animations.
67
68       The  user may define up to four "views", or sub-windows, to animate si‐
69       multaneously.  e.g., View 1 could be rainfall, View  2  flooded  areas,
70       View  3  damage to bridges or levees, View 4 other economic damage, all
71       animated as a time series. A black border 2 pixels wide is drawn around
72       each  view. There is an arbitrary limit of 400 files per view (400 ani‐
73       mation frames).  Temporary files are created in the conversion process,
74       so lack of adequate tmp space could also limit the number of frames you
75       are able to convert.
76
77       The environment variable GMPEG_SIZE is checked for a value  to  use  as
78       the dimension, in pixels, of the longest dimension of the animation im‐
79       age.  If GMPEG_SIZE is not set, the animation size defaults to the rows
80       &  columns  in  the current GRASS region, scaling if necessary to a de‐
81       fault minimum size of 200 and maximum of 500.  These size defaults  are
82       overridden  when  using  the -c flag (see below). The resolution of the
83       current GRASS region is maintained, independent of image  size.   Play‐
84       back  programs  have to decode the compressed data "on-the-fly", there‐
85       fore smaller dimensioned animations will provide higher frame rates and
86       smoother animations.
87
88       UNIX  -  style  wild cards may be used with the command line version in
89       place of a raster map name, but wild cards must be quoted.
90
91       A quality value of quality=1 will yield higher quality images, but with
92       less  compression (larger MPEG file size). Compression ratios will vary
93       depending on the number of frames in the animation, but  an  MPEG  pro‐
94       duced  using  quality=5  will usually be about 60% the size of the MPEG
95       produced using quality=1.
96

EXAMPLES

98       r.out.mpeg view1="rain[1-9]","rain1[0-2]" view2="temp*"
99
100       If the number of files differs for each view, the view with the  fewest
101       files will determine the number of frames in the animation.
102
103       With  -c flag the module converts "on the fly", uses less disk space by
104       using r.out.ppm with stdout option to convert frames as needed  instead
105       of  converting all frames to ppm before encoding.  Only use when encod‐
106       ing a single view.  Use of this option  also  overrides  any  size  de‐
107       faults,  using  the CURRENTLY DEFINED GRASS REGION for the output size.
108       So be careful to set region to a reasonable size prior to encoding.
109

KNOWN ISSUES

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

NOTES

119       This program requires the program mpeg_encode (aka ppmtompeg):
120
121       MPEG-1 Video Software Encoder
122       (Version 1.3; March 14, 1994)
123
124       Lawrence  A.  Rowe,  Kevin  Gong, Ketan Patel, and Dan Wallach Computer
125       Science Division-EECS, Univ. of Calif. at Berkeley
126
127       Available from Berkeley: http://biowiki.org/BerkeleyMpegEncoder
128       or as part of the  netpbm  package  (ppmtompeg):  http://netpbm.source
129       forge.net
130
131       Use  of the -c flag requires the r.out.ppm GRASS module with the stdout
132       option.
133

SEE ALSO

135       r.out.ppm
136

AUTHOR

138       Bill Brown, U.S. Army Construction Engineering Research Laboratories
139

SOURCE CODE

141       Available at: r.out.mpeg source code (history)
142
143       Accessed: Mon Jun 20 16:46:15 2022
144
145       Main index | Raster index | Topics index | Keywords index  |  Graphical
146       index | Full index
147
148       © 2003-2022 GRASS Development Team, GRASS GIS 8.2.0 Reference Manual
149
150
151
152GRASS 8.2.0                                                      r.out.mpeg(1)
Impressum