FFMPEG-SCALER(1)

πŸ’… FFMPEG-SCALER(1) πŸ’…

okay bestie, welcome to the ffmpeg-scaler manual page β€” this is the whole vibe guide for FFmpeg's video scaling + pixel format converter ✨


πŸŽ€ NAME πŸŽ€

ffmpeg-scaler β€” FFmpeg's video scaling and pixel format converter πŸ¦‹


🌸 DESCRIPTION 🌸

So the FFmpeg rescaler is basically the glow-up machine for your images β€” it gives you a high-level interface to the libswscale library's image conversion utilities. In particular (iconic phrasing) it lets you perform image rescaling and pixel format conversion. That's the whole gig. Rescale it, convert it, slay πŸ’…


✨ SCALER OPTIONS ✨

The video scaler supports the following named options, and yes there are a lot of them β€” we're getting through all of them, no skipping 🫢

Options may be set by specifying -option value in the FFmpeg tools, with a few API-only exceptions noted below (iykyk). For programmatic use, they can be set explicitly in the SwsContext options or through the libavutil/opt.h API.

πŸŒ€ sws_flags

Set the scaler flags. This is also used to set the scaling algorithm. Only a single algorithm should be selected. Default value is bicubic.

It accepts the following values:

  • fast_bilinear β€” Select fast bilinear scaling algorithm.
  • bilinear β€” Select bilinear scaling algorithm.
  • bicubic β€” Select bicubic scaling algorithm.
  • experimental β€” Select experimental scaling algorithm.
  • neighbor β€” Select nearest neighbor rescaling algorithm.
  • area β€” Select averaging area rescaling algorithm.
  • bicublin β€” Select bicubic scaling algorithm for the luma component, bilinear for chroma components.
  • gauss β€” Select Gaussian rescaling algorithm.
  • sinc β€” Select sinc rescaling algorithm.
  • lanczos β€” Select Lanczos rescaling algorithm. The default width (alpha) is 3 and can be changed by setting "param0".
  • spline β€” Select natural bicubic spline rescaling algorithm.
  • print_info β€” Enable printing/debug logging.
  • accurate_rnd β€” Enable accurate rounding.
  • full_chroma_int β€” Enable full chroma interpolation.
  • full_chroma_inp β€” Select full chroma input.
  • bitexact β€” Enable bitexact output.
  • unstable β€” Allow the use of experimental new code. May subtly affect the output or even produce wrong results. For testing only.
⚠️ bestie read that unstable one again. wrong results!! it literally says so. testing only, for real for real πŸ’€

🧚 the size ones (API only πŸ™ˆ)

  • srcw (API only) β€” Set source width.
  • srch (API only) β€” Set source height.
  • dstw (API only) β€” Set destination width.
  • dsth (API only) β€” Set destination height.

🎨 the format ones (API only πŸ™ˆ)

  • src_format (API only) β€” Set source pixel format (must be expressed as an integer).
  • dst_format (API only) β€” Set destination pixel format (must be expressed as an integer).

🌈 src_range (boolean)

If value is set to 1, indicates source is full range. Default value is 0, which indicates source is limited range.

🌈 dst_range (boolean)

If value is set to 1, enable full range for destination. Default value is 0, which enables limited range.

⭐ gamma (boolean)

If value is set to 1, enable gamma correct scaling. Default value is 0.

πŸ“ param0, param1

Set scaling algorithm parameters. The specified values are specific of some scaling algorithms and ignored by others. The specified values are floating point number values.

πŸ¦‹ sws_dither

Set the dithering algorithm. Accepts one of the following values. Default value is auto.

  • auto β€” automatic choice
  • none β€” no dithering
  • bayer β€” bayer dither
  • ed β€” error diffusion dither
  • a_dither β€” arithmetic dither, based using addition
  • x_dither β€” arithmetic dither, based using xor (more random/less apparent patterning that a_dither).

πŸ‘‘ alphablend

Set the alpha blending to use when the input has alpha but the output does not. Default value is none.

  • uniform_color β€” Blend onto a uniform background color
  • checkerboard β€” Blend onto a checkerboard
  • none β€” No blending

πŸ’– SEE ALSO πŸ’–

ffmpeg(1), ffplay(1), ffprobe(1), libswscale(3)


🌟 AUTHORS 🌟

The FFmpeg developers. πŸ‘‘

For details about the authorship, see the Git history of the project (https://git.ffmpeg.org/ffmpeg), e.g. by typing the command git log in the FFmpeg source directory, or browsing the online repository at <https://git.ffmpeg.org/ffmpeg>.

Maintainers for the specific components are listed in the file MAINTAINERS in the source code tree.


and that's the tea, bestie β€” this page is literally titled FFMPEG-SCALER(1), top and bottom, so you can cite it in your group chat with confidence 🫢 stay scaley πŸ’…βœ¨

πŸ“¦ where this page comes from