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, --list FILES... โ€” lowkey the "show me what's inside" command. It lists the content of the specified files ๐Ÿ“‹
  • -z, --recompress FILES... โ€” recompresses the specified files ๐Ÿ”
    • If -1, -2, or -3 is specified, it keeps the smaller of the two: the previous compressed data or the new compression. Smallest wins, no cap ๐Ÿ’–
    • If -0 is specified, the file is always rewritten without any compression.
  • -x, --extract FILES... โ€” extracts all the .png frames from the .mng clips ๐Ÿ–ผ๏ธ
    • You can use the --shrink options to control the compression ratio of the .png files.
    • The extracted images are always 24 bit images with an alpha channel.
    • You can remove the alpha channel with the -n option.
  • -a, --add RATE MNG_FILE PNG_FILES... โ€” compresses all the .png files on the command line into one .mng file ๐ŸŽฌ
    • All the .png files 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
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, --iter option ๐Ÿ”ฅ
  • -4, --shrink-insane โ€” sets the compression level to "insane" using the zopfli compressor. You can set the compressor iterations with the -i, --iter option ๐ŸŒˆ
  • -i, --iter N โ€” adds extra iterations for the 7z and zopfli compressors in modes -3 and -4. More iterations usually means better compression, but it can take a LOT more time. Try 10, 15, 20, and so on โณ
  • -s, --scroll HxV โ€” 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 16x0 or -s 0x16 ๐Ÿš€
  • -S, --scroll-square N โ€” 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 -n option.
  • -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

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