SUBP2PGM(1)

✨ SUBP2PGM(1) ✨

okay bestie, welcome to the subp2pgm page from the User Manuals section πŸ’– this is the one that turns your DVD subtitles into something an OCR can actually chew on. sit down, grab a boba, let's go πŸ§‹


🌸 NAME 🌸

subp2pgm β€” convert VobSub DVD subtitles into pgm files and xml description, no cap πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

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

πŸ¦‹ DESCRIPTION πŸ¦‹

so like. subp2pgm converts DVD subtitles from the VobSub format into an intermediate form suitable for OCR extraction. it's giving ✨middle manager✨ of subtitle formats β€” not the final boss, but the one who makes the handoff happen 🫢

subp2pgm takes two files as input, and they should be named <vobsub>.idx and <vobsub>.sub, where vobsub is the basename of the files. yes, the basename. like the shared part. iykyk 😌

subp2pgm outputs one .pgm graphics file for each subtitle image, plus a .xml description file with correct timing annotation, where each subtitle entry is replaced by the corresponding graphics file. literally one pic per line of dialogue, iconic πŸ’–

after OCR conversion, such a file can be transformed into a proper srt file by subptools(1). so it's a whole pipeline moment, we're just the first step bestie 🌈

the options are as follows:


πŸ’… OPTIONS πŸ’…

  • -h, --help β€” display usage and quit. the classic "what does anything do" button πŸ™ˆ
  • -v, --verbose β€” increase verbosity level. more yapping, more info πŸ“’
  • -f, --forced β€” extract forced subtitles only. just the mandatory ones, the ones that were always gonna show up πŸ’€
  • -n, --normalize β€” normalize the palette. color correction era 🎨
  • -o, --output output β€” basename for all pgm output files and the xml description. you pick the name, she does the rest πŸ‘‘
  • -s, --sid sid β€” selects subtitle id from a vobsub file with several subtitle streams. defaults to 0. so if your file is a whole friend group of subtitle streams, this is how you point at the right one 🫢

⭐ SEE ALSO ⭐

subptools(1) β€” go look at her next, she finishes the job πŸ’œ


🌈 AUTHORS 🌈

manual page by Marc Espie, Olivier Rolland πŸŽ€


ok that's the whole page, you ate it, periodt πŸ’…βœ¨

this was brought to you by the Linux release, dated January 20, 2007 β€” yes she's an elder but she's still slaying πŸ¦‹πŸ’–

πŸ“¦ where this page comes from