1r.out.mpeg(1) Grass User's Manual r.out.mpeg(1)
2
3
4
6 r.out.mpeg - Converts raster map series to MPEG movie.
7
9 raster, export, output, animation
10
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
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
65 favorite 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
69 simultaneously. 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
79 image. If GMPEG_SIZE is not set, the animation size defaults to the
80 rows & columns in the current GRASS region, scaling if necessary to a
81 default minimum size of 200 and maximum of 500. These size defaults
82 are overridden when using the -c flag (see below). The resolution of
83 the current GRASS region is maintained, independent of image size.
84 Playback programs have to decode the compressed data "on-the-fly",
85 therefore smaller dimensioned animations will provide higher frame
86 rates and 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
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
107 defaults, 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
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
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
135 r.out.ppm
136
138 Bill Brown, U.S. Army Construction Engineering Research Laboratories
139
141 Available at: r.out.mpeg source code (history)
142
143 Main index | Raster index | Topics index | Keywords index | Graphical
144 index | Full index
145
146 © 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual
147
148
149
150GRASS 7.8.2 r.out.mpeg(1)