Scroll to navigation

MPEGCAT(1) MPEGCAT(1)

NAME

mpegcat - Extracts structural information and PES streams from an MPEG2 video file

SYNOPSIS

mpegcat { options } { file }

DESCRIPTION

mpegcat dumps detailed textual information about an MPEG2 file. It also has an option for writing out a particular Packetized Elementary Stream (PES) given its id.

The original purpose of mpegcat was for debugging stream parsing issues in the gopchop cuts-only MPEG2 video editor, but it has more general utility.

OPTIONS

GENERAL OPTIONS

Report debug info
Enable DVD packet extensions
Help
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.

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

Process video packets (forced by -t option)

GENERAL DISPLAY TOGGLES

Toggle Pack packet start display
Toggle video ES packet start display
Toggle audio ES packet start display
Toggle other stream display (only show video & audio)
Toggle system header display
Toggle packet errors
Invert all display toggles

VIDEO DISPLAY TOGGLES

Toggle slice starts (default off)
Toggle sequence header display
Toggle GOP header display
Toggle Picture header display

SHORT CUTS

Show only video frames (same as '-Vepvaoyq')

FILE OFFSET OPTIONS

Start reading at offset NUM
Stop after reading NUM bytes
Scan every byte of the stream instead of using PES offsets (this can show erroneous 'start code emulation' codes)

AUTHOR

Kees Cook, <kees@outflux.net>

SEE ALSO

gopchop(1), gtkspu(1)

28 October 2006