Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Subtitles

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th July 2020, 04:26   #1  |  Link
wswartzendruber
hlg-tools Maintainer
 
wswartzendruber's Avatar
 
Join Date: Feb 2008
Posts: 412
I Made a PGS Cropper

I got sick and tired of OCR'ing subtitles. It's error-prone and really only necessary (for most of us) because if we put the original PGS subtitles in, they'll appear crushed for anything that's not a perfect 16:9.

So I studied some kind of reverse-engineered spec sheet on PGS and created this:

https://github.com/wswartzendruber/pgsscale

So far, it's working wonders on Batman: The Animated Series.

It doesn't yet scale, but if there's interest, I can see about hosting binaries. (Or someone else can do so.)

Code:
PGSScale 0.1.0
Scales PGS subtitles

USAGE:
    pgsscale <INPUT-FILE> <OUTPUT-FILE> --crop-height <PIXELS> --crop-width <PIXELS>

FLAGS:
        --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -h, --crop-height <PIXELS>    Height to crop each subtitle frame to
    -w, --crop-width <PIXELS>     Width to crop each subtitle frame to

ARGS:
    <INPUT-FILE>     Input PGS file; use - for STDIN
    <OUTPUT-FILE>    Output PGS file; use - for STDOUT

This utility will crop PGS subtitles found in Blu-ray discs so that they can match any cropping that has been done to
the main video stream, thereby preventing the subtitles from appearing squished or distorted by the player.
EDIT: Updating usage.
Attached Images
 

Last edited by wswartzendruber; 2nd August 2020 at 17:21.
wswartzendruber is offline   Reply With Quote
Old 15th June 2023, 20:14   #2  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Would you please add the capability to individually cut borders too?

I am tired to manually edit time overlapping PGS on upper and lower part of the screen (such as anime ones).

My idea is to split the PGS in upper and lower parts, OCR them separately and them "join" them in a subtitle editor.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Reply

Tags
crop, ocr, pgs

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:58.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.