y4munsharp(1)

y4munsharp πŸ’…βœ¨

okay bestie, so this is the manual page for y4munsharp, one of the MJPEG tools, and it's basically the glow-up filter for your video streams πŸŽ€


✨ NAME ✨

y4munsharp β€” the Unsharp filter for YUV4MPEG2 streams πŸ¦‹


🌸 SYNOPSIS 🌸

y4munsharp [options]

that's it. that's the whole vibe. options only, no positional args, we're low maintenance πŸ’…


πŸ’– DESCRIPTION πŸ’–

so y4munsharp is literally an implementation of the GIMP unsharp filter, except for YUV4MPEG2 streams instead of still images. iconic crossover moment fr 🫢

the usual 3 parameters for unsharp mask processing β€” radius, amount and threshold β€” get specified on the command line. no config files, no drama.

by default only the Y' (luma) component is processed. the CbCr (chroma) can be processed too, but ONLY if you ask for it with a command line option. she doesn't do it unprovoked πŸ’€

⚠️ output must be either to a pipe or a file. if you leave stdout as a terminal, that's an error and the program will exit. no cap. redirect it, bestie.

✨ OPTIONS ✨

y4munsharp accepts the following options:

  • -v num β€” set verbosity level (0 = quiet, 1 = normal, 2 = debug). default is 1, so normal-girl behaviour unless you say otherwise πŸ’–
  • -h β€” print a usage summary and exit. the classic "help me" button πŸŽ€
  • -L radius,amount,threshold β€” the Y' (luma) unsharp parameters. the radius and amount arguments are floating point numbers, and the threshold argument is an integer. default: 3.0,0.3,4 ✨
  • -C radius,amount,threshold β€” the CbCr (chroma) unsharp parameters. bestie listen: the chroma is not processed unless this option is given, so this is a whole opt-in situation. arguments are the same type as for the -L option above. default: none πŸ’œ
  • -N β€” filtering can produce output outside the 16 to 240 range for Y' and 16 to 235 for CbCr. by default, values outside the legal range get clipped/cored (so values over 240 for Y' are set to 240, for example). using -N uses the limits 0 and 255 instead πŸ”₯

πŸ¦‹ EXAMPLES πŸ¦‹

a mild setting, she's being gentle:

y4munsharp -L 2.0,0.3,0

an aggressive setting, she's in her main character era:

y4munsharp -L 5.0,0.5,0

🧚 NOTES 🧚

the radius, amount, threshold parameters mean the exact same thing as GIMP's unsharp plugin. which is actually so useful β€” it means you can open the GIMP on selected frame still images to figure out suitable settings for y4munsharp. test on a still, then run it on the stream. iykyk πŸ’…

the key thing to remember is to be subtle. you just barely want to notice the sharpening effect. if the effect is obvious (like, "jumps out at you" obvious πŸ‘€) then the parameters are set too aggressively. girl, dial it back.

the chroma is not processed for several reasons:

  1. the eye is much more sensitive to changes in brightness 🌟
  2. the chroma is usually subsampled and doesn't contribute much to the perceived sharpness of an image β€” so not processing the chroma gives you a boost in speed of processing the image πŸƒβ™€οΈ
  3. possible artifacting β€” changes in Y' just make an image brighter/darker, but changes in Cb or Cr can change colors and possibly lead to shifts in hue 😭

use the -C option to enable processing of the chroma planes. that's your permission slip πŸŽ€


πŸ’€ BUGS πŸ’€

  • only the 3 plane YUV4MPEG2 formats are supported. that's the whole list of supported formats, don't come for her.
  • only progressive, top field first or bottom field first interlaced streams are handled. the mixed interlaced stream format is not supported. periodt.

that's the whole page bestie 🫢 this one comes from the MJPEG Tools Team and it's dated 11 November 2004 β€” vintage manual, still slaying, no notes βœ¨πŸ’–πŸŒˆ