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 companiongtkspuutility. 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-toption). 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 π
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 ππ¦πΈ
π¦ where this page comes from
- debian bookworm: gopchop 1.1.8-7+b1 Β· GPL-2.0-or-later
- debian trixie: gopchop 1.1.8-7+b2 Β· GPL-2.0-or-later
- ubuntu jammy: gopchop 1.1.8-7build2 Β· GPL-2.0-or-later
- ubuntu noble: gopchop 1.1.8-7build4 Β· GPL-2.0-or-later
- ubuntu questing: gopchop 1.1.8-7build5
- ubuntu resolute: gopchop 1.1.8-7build6 Β· GPL-2.0-or-later
- ubuntu stonking: gopchop 1.1.8-7build6 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms