yuvfps(1)

πŸ“¦
version 2.2.1 Β· 2 versions
, in debian bookworm, debian trixie, fedora 43, fedora 44, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– yuvfps β€” the MJPEG tools manual, bestie edition πŸ’–

okay so you're holding the yuvfps(1) page from the MJPEG tools manual and honestly? it's a whole vibe. it's about frame rates. it's about ✨changing✨ them. let's get into it πŸ¦‹


🌸 NAME 🌸

yuvfps β€” converts to a different frame rate. that's it. that's the girl. πŸ’…


✨ SYNOPSIS ✨

yuvfps [-r Num:Den] [-s Num:Den] [-i Interlacing] [-I Interlacing] [-c]
[-n] [-w] [-v 0-2] [-h]

like look at her. so many little flags. so much potential πŸŽ€


πŸ’œ DESCRIPTION πŸ’œ

yuvfps is a general resampling utility β€” and when we say general we mean it goes UP or DOWN, no cap β€” that exists so you can generate video streams with whatever frame rates each standard video format is asking for. she reads a YUV4MPEG stream from standard input and writes a YUV4MPEG stream to standard output, and in that stream frames from the original ones are either skipped (that's downsampling, sad but necessary πŸ’€) or duplicated (that's upsampling, slay). this lets all your other mjpegtools that demand a specific frame rate actually process the stream. teamwork fr fr 🫢

by default yuvfps uses Bresenham's algorithm to do the resampling, so the new video stream stays similar to the original one. but listen β€” downscaling is a non-reversible operation because frames get dropped. gone. never coming back. 😭 and also, the resulting video stream may not have the exact same duration as the original one if the new frame rate is not a whole multiple of the original rate. math is math, bestie.

as an alternative to just dropping or duplicating frames, each output frame/field can be produced as a weighted average of the two temporally closest input frames/fields. icon behaviour honestly. and in this mode, yuvfps can also change the interlacing mode of the stream πŸ‘‘

yuvfps can also "fix" the framerate specified in the YUV4MPEG header. this is the main character move that lets you generate effects like fast-forwarding and slow motion, and it's also here for when your source stream has a framerate that's very close to β€” but not exactly β€” the rate some standard video needs. for example, 24.9 vs 25. so close. so painful. we fix it. πŸ’…


πŸŽ€ OPTIONS πŸŽ€

  • -r Num:Den β€” specifies the resulting stream frame rate. this is the rate you want, the dream rate, the glow-up rate ✨
  • -s Num:Den β€” ignores the frame rate in the input stream and assumes this frame rate for the input stream. basically "no bestie, that's not what you are, this is what you are" πŸ™ˆ
  • -i Interlacing β€” specifies the interlacing mode of the resulting stream. and heads up: the interlacing mode can be changed only when using the weighted average resampling mode (that's the -w option, iykyk).

the values are:

  • p β€” progressive (non-interlaced)
  • t β€” top-field first
  • b β€” bottom-field first
  • -I Interlacing β€” ignores the interlacing mode information in the input stream and assumes this interlacing mode for the input stream. the possible values are the same as for the -i option. yes it's a capital I. yes that's confusing. we love her anyway πŸ’€
  • -c β€” changes the stream header frame rate and interlacing mode in the output stream but copies frames from the original stream without changes. so -r and -i specify the frame rate and interlacing mode for the output stream header. header-only glow up, body stays exactly as it was 🌈
  • -n β€” okay so by default yuvfps tries to find a normalized framerate. some programs create framerates like 29969909:1000000 which is actually the typical NTSC framerate of 30000:1001. yuvfps prints out the normalized values and the original when it starts. if you think the normalized value is not correct and you want yuvfps to use the original given number, you have to add that option. so yuvfps does not try to normalize the values. trust your gut, bestie 🫢
  • -w β€” produce each output frame/field as a weighted average of the two temporally closest input frames/fields instead of simply dropping or duplicating frames. the blending of two adjacent frames/fields reduces visible stepping compared to the default drop/duplicate algorithm, but as a drawback it makes fast moving objects appear blurred and it is much slower. gorgeous but she takes her time πŸ’…
  • -v [0,1,2] β€” set verbosity level.
    • 0 = warnings and error messages only.
    • 1 = add informative messages, like the framerate conversation information.
    • 2 = add chatty debugging message, too.

πŸ‘‘ AUTHOR πŸ‘‘

this man page was written by Alfonso GarcΓ­a-PatiΓ±o Barbolani.

Johannes Lehtinen added information about the weighted average resampling mode and the related options.

if you have questions, remarks, problems or you just want to contact the developers, the main mailing list for the MJPEG-tools is:

mjpeg-users@lists.sourceforge.net

for more info, see our website at

http://mjpeg.sourceforge.net/

🌟 SEE ALSO 🌟

yuvscaler(1), mjpegtools(1), lavpipe(1), lav2yuv(1) mpeg2enc(1)


and that's the whole page, bestie!! πŸ’– from the MJPEG Tools Team, dated 8 Jan 2006 β€” yeah she's an elder but she ate and left no crumbs πŸ“ go forth and resample responsibly, mwah 🧚✨

πŸ“¦ where this page comes from