r.out.mpeg(1grass)
โจ NAME โจ
ok so welcome to r.out.mpeg(1grass) โ your girl is here to turn a whole series of raster maps into one MPEG movie, no cap ๐
It Converts raster map series to MPEG movie.
๐ท๏ธ KEYWORDS ๐ท๏ธ
raster, export, output, animation โ that's the vibe check ๐ฆ
๐ธ SYNOPSIS ๐ธ
r.out.mpeg
r.out.mpeg --help
r.out.mpeg [-c] view1=name[,name,...] [view2=name[,name,...]]
[view3=name[,name,...]] [view4=name[,name,...]] output=name
[quality=integer] [--overwrite] [--help] [--verbose] [--quiet]
[--ui]
๐ Flags:
-cโ converts "on the fly", so it uses less disk space. Heads up bestie: this one Requiresr.out.ppmwith thestdoutoption.--overwriteโ lets output files overwrite files that already exist (yes, permission to be messy ๐).--helpโ prints the usage summary, aka the cheat sheet.--verboseโ verbose module output, it WILL overshare.--quietโ quiet module output, the introvert mode ๐คซ.--uiโ forces launching the GUI dialog.
๐ง Parameters:
view1=name[,name,...]โ [required]. Name of input raster map(s) for view no.1.view2=name[,name,...]โ Name of input raster map(s) for view no.2.view3=name[,name,...]โ Name of input raster map(s) for view no.3.view4=name[,name,...]โ Name of input raster map(s) for view no.4.output=nameโ [required]. Name for output file.quality=integerโ Quality factor (1 = highest quality, lowest compression). Options:1-5. Default:3.
๐ DESCRIPTION ๐
ok so r.out.mpeg is the tool that combines a whole series of GRASS raster maps into ONE single MPEG-1 (Motion Pictures Experts Group) format file. iconic behavior honestly ๐
But listen โ MPEG-1 is a "lossy" video compression format. That means the quality of every resulting frame of the animation will be much diminished from the original raster image. So it's giving glow-down, not glow-up ๐ญ. The resulting output file can then be viewed with your favorite mpeg-format viewing program. And girl, if you want better, MPEG-2 and MPEG-4 provide much better quality animations.
You can define up to four "views", aka sub-windows, to animate simultaneously. Like, example: 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. So extra โจ. A black border 2 pixels wide gets drawn around each view. There's an arbitrary limit of 400 files per view (that's 400 animation frames). Temporary files are created during the conversion process, so lacking adequate tmp space could ALSO limit the number of frames you're able to convert. Budget your disk, bestie ๐
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 & columns in the current GRASS region โ scaling if necessary to a default minimum size of 200 and maximum of 500. These size defaults get overridden when you use 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", which is why smaller dimensioned animations will give you higher frame rates and smoother animations. Math doing its thing ๐งฎ
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. Learn from my mistakes ๐
A quality value of quality=1 will yield higher quality images, but with less compression (aka a larger MPEG file size). Compression ratios will vary depending on the number of frames in the animation, but an MPEG produced using quality=5 will usually be about 60% the size of the MPEG produced using quality=1.
๐ EXAMPLES ๐
r.out.mpeg view1="rain[1-9]","rain1[0-2]" view2="temp*"
If the number of files differs for each view, the view with the fewest files will determine the number of frames in the animation. The smallest one sets the pace, periodt.
With the -c flag the module converts "on the fly", and uses less disk space by using r.out.ppm with the 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 CURRENTLY DEFINED GRASS REGION for the output size. So be careful to set region to a reasonable size prior to encoding โ that region is the main character and whatever it says goes ๐
๐ KNOWN ISSUES ๐
- MPEG images must be 16-pixel aligned for successful compression, so if the rows & 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 & right sides of the image. RIP to those pixels fr. - The MPEG format is optimized to recognize image MOTION, so abrupt changes from one frame to another will cause a "noisy" encoding. Smooth transitions only, please โจ
๐ NOTES ๐
This program requires the program mpeg_encode (aka ppmtompeg):
MPEG-1 Video Software Encoder
(Version 1.3; March 14, 1994)
Lawrence A. Rowe, Kevin Gong, Ketan Patel, and Dan Wallach Computer
Science Division-EECS, Univ. of Calif. at Berkeley
Available from Berkeley: http://biowiki.org/BerkeleyMpegEncoder (Wayback machine), or as part of the netpbm package (ppmtompeg): https://netpbm.sourceforge.net
Use of the -c flag requires the r.out.ppm GRASS module with the stdout option.
๐ SEE ALSO ๐
r.out.ppm
๐ AUTHOR ๐
Bill Brown, U.S. Army Construction Engineering Research Laboratories
๐ฅ SOURCE CODE ๐ฅ
Available at: r.out.mpeg source code (history)
Latest change: Friday Apr 17 01:04:26 2026 in commit: 32a143358df26b2e518b03c7e0d79541e8d1e5b1
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
ยฉ 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
ok that's the whole page bestie, you made it to the end ๐ซถ this was r.out.mpeg(1grass) from the GRASS 8.5.0 manual, last touched Friday Apr 17 01:04:26 2026 โ go make a movie, you've got this ๐๐ฌ๐ธ
๐ฆ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 ยท GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms