Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Subtitle position too low when "burning in" and using auto cropping #2038
Description of the problem
On a video with subtitles, some on 1 line, others on 2 lines, and black bands under and on the video, only the first line of subtitles is burned. On the two-lines subtitles, the second line disappears.
Ideally, "travelling" through subtitles before compressing job would be perfect.
HandBrake version (e.g., 1.0.0)
Operating system and version (e.g., Ubuntu 18.04 LTS, macOS 10.14 Mojave, Windows 10 1809)
Error message text or screenshot
No error message.
HandBrake Activity Log (see https://handbrake.fr/docs/en/latest/help/activity-log.html)
Please provide the information requested in the post template, including the activity log (https://handbrake.fr/docs/en/latest/help/activity-log.html).
You're using PGS bitmap subtitles which are formatted for 1920x1080 frame dimensions.
But what are you doing? You're cropping the frame size to 1674x720!
Thanks to your cropping, any subtitle info that's in the "oversized" 246 x 360 pixel area of the PGS bitmaps is ALSO cropped out.
I don't believe that HandBrake automatically rescales PGS to the output dimension. Happy to hear otherwise.
So, why don't you just leave the output dimensions at 1920x1080 and see what happens?
Otherwise, if you want to crop out the black bars and keep the original positioning, you'll need to either remux new PGS after manually resizing them to 720P, or remux ASS/SSA streams converted from the PGS and manually positioned.
One thought occurs to me. Normally the subtitle has a region defined around it that is just large enough for the enclosed text. We relocate the whole region box, i.e. we don't attempt to find the text within the box. It's possible that in this case they created a region box that fills the entire video frame. If this is the case, we would not be able to relocate the box because moving it anywhere would cut off some part of the it.
I would require a sample to verify if this is happening. But if this is the problem, the only solution for you would be to set cropping to 0. A sample would also be useful in testing an improvement to the current renderer that would scan the box for "visible" pixel boundaries and reduce it in cases such as this.
What's happened to the OP is very, very similar to what happens when you convert a "text grid" coded (advanced) SubStationAlpha into a .SUP.
Having had to reverse this fault in many fansub recodes, I was able to knock up this sample for you, which contains both constrained and full-frame regions:
This granular "text grid" method is only used by people who don't possess proper Bluray authoring software (where you can position subpictures with pixel accuracy anywhere you like).
Still, why the OP's source was like this remain unknown. Unless it's a fansub...? Or poorly authored.