ADVMNG(1)
๐ advmng(1): the MNG compression bestie ๐
okay so advmng is the AdvanceCOMP MNG Compression Utility, and bestie, it's literally all about making MNG files as tiny as possible โจ
โจ NAME โจ
advmng - AdvanceCOMP MNG Compression Utility ๐ฆ
๐ SYNOPSIS ๐
advmng [-l, --list] [-z, --recompress]
[-x, --extract] [-a, --add RATE MNG_FILE PNG_FILES...]
[-0, --shrink-store] [-1, --shrink-fast] [-2, --shrink-normal]
[-3, --shrink-extra] [-4, --shrink-insane] [-i, --iter N]
[-s, --scroll HxV] [-S, --scroll-square]
[-e, --expand] [-r, --reduce]
[-c, --lc] [-C, --vlc] [-f, --force] [-q, --quiet] [-v, --verbose]
[-h, --help] [-V, --version] FILES...
๐ธ DESCRIPTION ๐ธ
okay so the main goal here is to recompress MNG files so they come out the smallest possible size ๐
Heads up: this utility can't read just any file. It's only built to read files generated by the AdvanceMAME emulator, so don't try feeding it random stuff ๐
To make the files smaller, advmng uses these strategies:
- Removes all ancillary chunks.
- Uses the MNG Delta feature to compress video clips with only small changes between frames.
- Uses the MNG Move feature to compress video clips with a scrolling background (option
-s). - Reduces the color depth to 8 bit (option
-r). - Uses the 7zip Deflate implementation.
๐ COMMANDS ๐
-l,--listFILES...โ lowkey the "show me what's inside" command. It lists the content of the specified files ๐-z,--recompressFILES...โ recompresses the specified files ๐- If
-1,-2, or-3is specified, it keeps the smaller of the two: the previous compressed data or the new compression. Smallest wins, no cap ๐ - If
-0is specified, the file is always rewritten without any compression.
- If
-x,--extractFILES...โ extracts all the.pngframes from the.mngclips ๐ผ๏ธ- You can use the
--shrinkoptions to control the compression ratio of the.pngfiles. - The extracted images are always 24 bit images with an alpha channel.
- You can remove the alpha channel with the
-noption.
- You can use the
-a,--addRATE MNG_FILE PNG_FILES...โ compresses all the.pngfiles on the command line into one.mngfile ๐ฌ- All the
.pngfiles must have the same size and the same bit depth, bestie, no exceptions. - You also have to specify an integer frame rate to use in the
- All the
Oops, the original page cuts off right there, so that's all the info we get for this one ๐
๐ง OPTIONS ๐ง
-0,--shrink-storeโ turns compression off entirely. The file is only stored, not compressed. It always gets rewritten, even if the result ends up bigger ๐ญ-1,--shrink-fastโ sets the compression level to "fast" using the zlib compressor โก-2,--shrink-normalโ sets the compression level to "normal" using the libdeflate compressor. This is the default level, so it's giving classic ๐-3,--shrink-extraโ sets the compression level to "extra" using the 7z compressor. You can set the compressor iterations with the-i,--iteroption ๐ฅ-4,--shrink-insaneโ sets the compression level to "insane" using the zopfli compressor. You can set the compressor iterations with the-i,--iteroption ๐-i,--iterNโ adds extra iterations for the 7z and zopfli compressors in modes-3and-4. More iterations usually means better compression, but it can take a LOT more time. Try 10, 15, 20, and so on โณ-s,--scrollHxVโ sets the size of the pattern (H width x V height) used to check for a scrolling background ๐- The size is in pixels, and it has to be bigger than or equal to the scrolling speed of the background.
- Okay example: the game 1942 scrolls vertically by 1 pixel every frame. If you recorded with an interleave factor of 2, the vertical scrolling speed is 1*2 = 2. So the minimum pattern is
-s 0x2. - Generally you can use
-s 8x8, and only go bigger for games that scroll faster. - If a game only scrolls horizontally or vertically, you can speed up compression a lot with one-directional patterns like
-s 16x0or-s 0x16๐
-S,--scroll-squareNโ this is like-s NxN, but it leaves out big movement in both directions, so it cuts down on computation time. Specifically, the check it does is X+Y<=N ๐งฎ-r,--reduceโ forces the color reduction to 8 bit ๐จ- The reduction only actually happens if any frame has fewer than 256 colors and there's no alpha channel.
- To force the reduction even when an alpha channel is present, use the
-noption.
-e,--expandโ forces the color expansion to 24 bit ๐-n,--noalphaโ removes the alpha channel, if there is one ๐ซง-c,--lcโ forces the use of the MNG LC (Low Complexity) specifications. This turns off delta compression. The file always gets rewritten, even if it's bigger ๐-C,--vlcโ forces the use of the MNG VLC (Very Low Complexity) specifications. This turns off delta compression AND precise timing.
Warning! You may lose the correct timing information, because the VLC format only supports integer frequency. The file always gets rewritten, even if it's bigger. Be careful, bestie ๐ญ
-f,--forceโ uses the new file even if it's bigger ๐-q,--quietโ doesn't print the filenames ๐คซ-v,--verboseโ prints more info about the compression process ๐ฃ
๐ EXAMPLES ๐
A good tradeoff between recompression and time is this command:
advmng -z -r -S 16 *.mng
To create a .mng file from a series of .png files, use this command:
advmng -a 30 video.mng video*.png
To extract all the images in a .mng file, use this command:
advmng -x video.mng
๐ซถ COPYRIGHT ๐ซถ
This file is Copyright (C) 2003 Andrea Mazzoleni, Filipe Estima ๐
๐ SEE ALSO ๐
advzip(1), advpng(1), advdef(1) ๐ฆ
That's the whole page, bestie! ๐ง The footer says AdvanceCOM...ion Utility(1), so it's from the AdvanceCOMP toolkit, and it's giving โจ iconic utility energy โจ Slay forever ๐๐
๐ฆ where this page comes from
- alpine 3.24: advancecomp-doc 2.6-r0 ยท GPL-3.0-or-later
- debian bookworm: advancecomp 2.5-1
- debian trixie: advancecomp 2.5-1
- epel 10: advancecomp 2.6-8.el10_0 ยท GPL-3.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later
- epel 9: advancecomp 2.6-4.el9 ยท GPL-3.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 43: advancecomp 2.6-13.fc43 ยท GPL-3.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 44: advancecomp 2.6-16.fc44 ยท GPL-3.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later
- nixos 26.05: advancecomp 2.6
- nixpkgs unstable: advancecomp 2.6
- ubuntu jammy: advancecomp 2.1-2.1ubuntu2
- ubuntu jammy: advancecomp 2.1-2.1ubuntu2.1
- ubuntu noble: advancecomp 2.5-1build1
- ubuntu resolute: advancecomp 2.5-1build2
- ubuntu stonking: advancecomp 2.5-1build2
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms