---
name: "subp2pgm"
section: "1"
platform: "linux"
package: "ogmrip"
version: "1.0.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/subp2pgm"
---

# subp2pgm(1)

convert VobSub DVD subtitles into pgm files and xml description

## NAME

subp2pgm - convert VobSub DVD subtitles into pgm files and xml description

## SYNOPSIS

subp2pgm \[-hvf\] \[-o output\] \[-s sid\] vobsub

## DESCRIPTION

**subp2pgm** converts DVD subtitles from the VobSub format into an intermediate form suitable for OCR extraction.

**subp2pgm** takes two files as input, which should be named \<vobsub\>.idx and \<vobsub\>.sub, where *vobsub* is the basename of the files.

**subp2pgm** outputs one .pgm graphics file for each subtitle image, and a .xml description file with correct timing annotation, where each subtitle entry is replaced by the corresponding graphics file.

After OCR conversion, such a file can be transformed into a proper srt file by [**subptools**(1)](/subptools/1.md). The options are as follows:

- **-h, --help**

  Display usage and quit.

- **-v, --verbose**

  Increase verbosity level.

- **-f, --forced**

  Extract forced subtitles only.

- **-n, --normalize**

  Normalize the palette.

- **-o, --output** *output*

  Basename for all pgm output files and the xml description.

- **-s, --sid** *sid*

  Selects subtitle id from a vobsub file with several subtitle streams.  Defaults to 0.

## SEE ALSO

[**subptools**(1)](/subptools/1.md)

## AUTHORS

Manual page by Marc Espie, Olivier Rolland
