png2yuv(1)

πŸ“¦
version 2.2.1 Β· 2 versions
, in arch rolling, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

✨ png2yuv(1) β€” the MJPEG tools manual, but make it make sense ✨

okay bestie, sit down, we're learning a manual page πŸ’– this one's png2yuv, from the MJPEG tools family, and it's here to turn your cute little PNG stills into a whole YUV4MPEG movie stream. no cap.


🌸 NAME 🌸

png2yuv β€” Convert PNG images to the YUV4MPEG stream format.

like literally, that's the whole job description 🫢


πŸŽ€ SYNOPSIS πŸŽ€

png2yuv [-b num] [-f num] [-I num] [-L num] [-n num] [-j filename]
heads up bestie: that's what the synopsis shows, but the OPTIONS section below has more flags than this β€” -S and -v are down there too. read the whole thing, i'm begging πŸ™ˆ

πŸ’… DESCRIPTION πŸ’…

So here's the tea β˜• png2yuv decompresses a sequence of PNG files and pipes the image data to stdout as a YUV4MPEG2 stream. Any 8bit/pixel PNG format supported by libpng can be read. periodt.

And the way stdout gets absolutely filled with the YUV4MPEG movie data stream? yeah, be prepared β€” you're gonna pipe it on to mpeg2enc or write it into a file. don't just let it spill onto your terminal, that's not the vibe πŸ’€

🚨 real talk: this tool is incomplete. The alternative utility you are probably looking for is ppmtoy4m(1), which is also included in MJPEGtools. not me warning you before you commit, but like, i'm warning you πŸ’–

✨ OPTIONS ✨

png2yuv accepts the following options:

  • -b num β€” Frame offset: skip output of the first num frames. (default: 0) ✨ bye bye first frames
  • -f num β€” Set the frame rate of stream β€” accepts the same numbers. Not default, this option has to be specified. πŸ‘‘ no default bestie, you MUST say it
  • -I num β€” interlacing mode:
    • p = none / progressive
    • t = top field first
    • b = bottom field first

No default, this option has to be specified. 😭 again, mandatory, no skipping

  • -L num β€”
    • 0 = non-interleaved (two successive fields per PNG file)
    • 1 = interleaved fields
  • -S samp_mode β€” chroma subsampling mode, only for professionals, for more info see ppmtoy4m and the YUV guide on http://www.mir.com/DMG/. default: 420_jpeg 🧚 professionals only, i don't make the rules
  • -n num β€” Specifies the nummber of frames to process. (default: all = -1) πŸ“ (yes, "nummber" β€” i'm keeping the typo, it's canon, it's iconic)
  • -j {1}%{2}d{3} β€” Read PNG frames with the name components as follows:
    • {1} PNG filename prefix (e g: picture_ )
    • {2} Counting placeholder (like in C, printf, eg 06 ))
    • {3} File extension. Something like this: .png A correct description of the files could look like this: picture_%06d.png
  • -v num β€” Verbosity level (0, 1 or 2) 🌈

πŸ’€ BUGS πŸ’€

The frame rate description does not seem to be up to date. The NTSC integer ratios are not supported (use floating point instead). As workaround specify a PAL (25) or native FILM (24) and set the right frame rate in mpeg2enc with the -F option. Interlaced handling is not implemented yet. πŸ™ˆ

like... it's giving workaround energy, but at least there's a workaround, yk?


🫢 AUTHOR 🫢

This man page was written by Gernot Ziegler.

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), ppmtoy4m(1), yuv2lav(1), yuvdenoise(1), yuvmedianfilter(1), yuvscaler(1)


okay that's the whole page bestie, you ate πŸ’…βœ¨ this lil manual dropped way back on 22 January 2020, brought to you by the MJPEG Tools Team β€” mwah, ty for your service πŸŽ€πŸ¦‹πŸ’–