MPEGCAT(1)

πŸ’– MPEGCAT(1) πŸ’–

okay bestie, welcome to mpegcat β€” that's the section-1 manual page for it, iykyk πŸ’…


✨ NAME ✨

mpegcat β€” Extracts structural information and PES streams from an MPEG2 video file


πŸŽ€ SYNOPSIS πŸŽ€

mpegcat { options } { file }

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, mpegcat dumps detailed textual information about an MPEG2 file. that's the whole vibe. it also has an option for writing out a particular Packetized Elementary Stream (PES) if you hand it the id. no cap. πŸ”₯

fun little origin story: the original purpose of mpegcat was debugging stream parsing issues in the gopchop cuts-only MPEG2 video editor. but like… it has more general utility. it grew. main character energy fr. πŸ‘‘


✨ OPTIONS ✨

πŸ’« GENERAL OPTIONS πŸ’«

  • -d, --debug β€” Report debug info. spill the tea, tell us everything πŸ«–
  • -D, --dvd-format β€” Enable DVD packet extensions. dvd mode: activated πŸ’Ώ
  • -h, -?, --help β€” Help. bestie needs a hand? here u go 🫢
  • -w, --write FILE,0xID[,0xSID] β€” Write PES with id ID (and subid SID) to FILE. Sub Picture Unit (SPU) streams such as overlays, subtitles and DVD menus extracted using this option can be displayed using the companion gtkspu utility. literally the glow-up pipeline 🌸

To find SPU streams in a .VOB ripped from a DVD:

                $ mpegcat -iDa VTS_01_0.VOB | grep SPU
                   131086: 0xBD:  DVD Audio 0x20 (SPU 0): 2028 bytes (next marker @ 133120)
                   133134: 0xBD:  DVD Audio 0x20 (SPU 0): 2028 bytes (next marker @ 135168)
                   137230: 0xBD:  DVD Audio 0x20 (SPU 0): 190 bytes (next marker @ 137426)
                   ...

To save a given stream:

                $ mpegcat -iDaw dump.spu,0xBD,0x20 VTS_01_0.VOB > /dev/null

(And to view the stream)

                $ gtkspu dump.spu 1
                $ gtkspu dump.spu 2
                $ gtkspu dump.spu 3
                ...

πŸ’« PROCESSING TOGGLES πŸ’«

  • -V, --enter-video β€” Process video packets (forced by -t option). like it or not, we're going in 🎬

πŸ’« GENERAL DISPLAY TOGGLES πŸ’«

  • -p, --pack β€” Toggle Pack packet start display
  • -v, --video β€” Toggle video ES packet start display
  • -a, --audio β€” Toggle audio ES packet start display
  • -o, --other β€” Toggle other stream display (only show video & audio)
  • -y, --system β€” Toggle system header display
  • -e, --errors β€” Toggle packet errors. we love a lil drama check πŸ’€
  • -i, --invert β€” Invert all display toggles. flip the whole vibe, periodt πŸ”„

πŸ’« VIDEO DISPLAY TOGGLES πŸ’«

  • -s, --slices β€” Toggle slice starts (default off)
  • -q, --sequence β€” Toggle sequence header display
  • -g, --GOPs β€” Toggle GOP header display
  • -f, --frames β€” Toggle Picture header display

πŸ’« SHORT CUTS πŸ’«

  • -F, --just-frames β€” Show only video frames (same as -Vepvaoyq). the lazy-girl shortcut, and honestly? iconic ⭐

πŸ’« FILE OFFSET OPTIONS πŸ’«

  • -b, --begin=NUM β€” Start reading at offset NUM
  • -n, --num=NUM β€” Stop after reading NUM bytes
  • -t, --scan-stream β€” Scan every byte of the stream instead of using PES offsets (this can show erroneous 'start code emulation' codes). thorough queen behavior πŸ‘‘

🌈 AUTHOR 🌈

Kees Cook, <kees@outflux.net>


πŸ’œ SEE ALSO πŸ’œ

gopchop(1), gtkspu(1)


okay that's the whole page bestie, go parse some streams πŸ’…βœ¨ this was the mpegcat(1) manual, dated 28 October 2006, and yeah that date is giving vintage but she still slays πŸ’–πŸ¦‹πŸŒΈ