y4mcolorbars(1)

✨ y4mcolorbars β€” the MJPEG tools manual ✨

okay so bestie, welcome to the y4mcolorbars(1) page πŸ’– this one lives in the MJPEG tools manual and it's genuinely so fun, no cap.

🌈 NAME

y4mcolorbars β€” make a YUV4MPEG2 stream that's literally just a colorbar test pattern, over and over πŸŽ€

πŸ“Ό SYNOPSIS

y4mcolorbars [options]

πŸ’… DESCRIPTION

y4mcolorbars creates a YUV4MPEG2 stream where every single frame is a colorbar test pattern. Nothing else, just vibes and bars πŸ¦‹

The pattern is out here trying to reproduce the standard SMPTE EG-1-1990 colorbar test signal as faithfully as it possibly can, given the constraints of the Y'CbCr colorspace. It's giving "doing my best under capitalism," honestly.

Output goes to stdout, specifically so you can pipe it into other MJPEG tools. Pipeline main character energy, periodt.


✨ OPTIONS ✨

y4mcolorbars accepts the following options, and yes, we're going through all of them:

  • -n num β€” Output a total of num output frames. [default: 1]
  • -F n:d β€” Set the framerate encoded in the output stream, as an exact integer ratio. The common rates are:
    • 24000:1001 β€” NTSC 3:2 pulldown converted film
    • 24:1 β€” native film
    • 25:1 β€” PAL/SECAM
    • 30000:1001 β€” NTSC video [default]
    • 50:1 β€” PAL field rate
    • 60000:1001 β€” NTSC field rate
  • -W w β€” Set frame width. [default: 720]
  • -H h β€” Set frame height. [default: 480]
  • -A n:d β€” Set the pixel aspect ratio encoded in the output stream, as an exact integer ratio. The common ratios are:
    • 1:1 β€” square pixels (e.g. computer graphics)
    • 10:11 β€” CCIR-601 NTSC [default]
    • 59:54 β€” CCIR-601 PAL
  • -I x β€” Set the interlacing mode, which is used to interpret the PPM image(s) and is also encoded in the output stream.
    • p β€” progressive, non-interlaced [default]
    • t β€” top/upper-field-first interlaced
    • b β€” bottom/lower-field-first interlaced
  • -Q n β€” The data to place in the -I/+Q patches in the bottom row of the pattern:
    • 0 β€” -I and +Q at 20% (20IRE) [default]
    • 1 β€” -I and +Q at 50% (50IRE)
    • 2 β€” +Cb and +Cr at 100%
  • -S mode β€” Set the chroma subsampling mode.
    • 444 β€” 4:4:4 (no subsampling) [default]
    • 420jpeg β€” 4:2:0 JPEG/MPEG-1, interstitial cositing
    • 420mpeg2 β€” 4:2:0 MPEG-2, horizontal cositing
ngl the supported subsampled modes use a lousy subsampling filter 😭 better results will be achieved by passing the default 4:4:4 output to a scaler which supports subsampling, such as y4mscaler(1). that's the move.
  • -v [0,1,2] β€” Set the verbosity level.
    • 0 β€” warnings and errors only.
    • 1 β€” add informative messages, too. [default]
    • 2 β€” add chatty debugging message, too.

πŸŽ€ EXAMPLES

Wanna create and display 200 frames of colorbars that match a top-field-first interlaced 4:3 NTSC source? Say less:

y4mcolorbars -n 200 -It -S 420jpeg | yuvplay

And for 200 frames of colorbars matching a bottom-field-first interlaced 4:3 PAL source:

y4mcolorbars -n 200 -H 576 -F 25:1 -A 59:54 -Ib | yuvplay

ate. no crumbs. πŸ”₯


πŸ’€ BUGS

okay so, first thing: it's genuinely not clear to the author (who has, and I cannot stress this enough, never actually seen the SMPTE EG-1-1990 document itself πŸ™ˆ) what the absolute excursion of the -I and +Q regions is supposed to be. However, the phase is correct, and that should be the critical feature. so like, we ball.

Second thing: the PLUGE bars, of -4 and +4 IRE, can never be precisely synthesized. Why? Because the Y' digital space maps [16,235] over the full luma excursion, but the full luma excursion in analog space depends on whether or not 7.5 IRE NTSC setup is being used by whatever device eventually produces the analog output. 😭 The good news though: the difference is within 1-bit of Y' accuracy anyway, so it's lowkey fine.


πŸ‘‘ AUTHOR

This man page was written by Matt Marjanovic.

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

mjpegtools(1), mpeg2enc(1), y4mscaler(1), yuv2lav(1), yuvplay(1)


and that's the whole page bestie πŸ’œ huge thanks to the MJPEG Tools Team for this one, dated 28 April 2004 β€” iconic behavior from start to finish, and y4mcolorbars(1) will always be that girl 🌸✨