You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow subtitle position to be adjusted. (With Crop/Padding in mind) #2038
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)
1.2.2
Operating system and version (e.g., Ubuntu 18.04 LTS, macOS 10.14 Mojave, Windows 10 1809)
When burning in subtitles, HandBrake relocates any subtitles found in the cropped region. So if this isn't working there is a bug. An activity log and a sample to reproduce the problem with would help us fix it.
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.
@Synapto as I said here #2038 (comment), HandBrake relocates subtitles that are in the cropped region. If rendered subtitles are being dropped there is a bug.
But I have not been able to reproduce this with the few sources that I have that place subtitles in the crop region.
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: HB_Malformed_PGS_Test.zip
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.
Translated: "This problem has been bothering me. The logic of HandBrake is like this: after the subtitles are loaded and then cut, these filters are smooth and dead.
It is recommended to adjust the order of efficiency, such as loading subtitles after cutting."
Please note that we prefer English on the issue tracker, as it is the common language among HandBrake's developers.
Translated: "This problem has been bothering me. The logic of HandBrake is like this: after the subtitles are loaded and then cut, these filters are smooth and dead.
It is recommended to adjust the order of efficiency, such as loading subtitles after cutting."
Please note that we prefer English on the issue tracker, as it is the common language among HandBrake's developers.
ye,ye,ok,Use translation as much as possible. Thank you for your kind reply.
(HandBrake v1.3.3)
For me, when I crop, it looks like the subtitles keep the same distance from the top of the video (when they should be moved up to account for the top crop)
changed the title [-]Subtitle position too low when "burning in" and using auto cropping[/-][+]Allow subtitle position to be adjusted. (With Crop/Padding in mind)[/+]on Mar 28, 2024
Activity
sr55 commentedon Apr 13, 2019
Please provide the information requested in the post template, including the activity log (https://handbrake.fr/docs/en/latest/help/activity-log.html).
Thanks.
jstebbins commentedon Apr 13, 2019
When burning in subtitles, HandBrake relocates any subtitles found in the cropped region. So if this isn't working there is a bug. An activity log and a sample to reproduce the problem with would help us fix it.
falagar-fr commentedon Apr 13, 2019
Thank you. I would have given you a sample, but the file is nearly 40 Gb large. Far too large for my poor connection.
I will try to reproduce the bug on a small part of the file, and give you the log.
falagar-fr commentedon Apr 13, 2019
First, the screenshot of the original file, with subtitles on 1 line, then on 2 lines.
And then, the result with handbrake' encoding. The second comment is lost.
falagar-fr commentedon Apr 13, 2019
activity_log.txt
jstebbins commentedon Apr 13, 2019
Is it only subtitles at the top of the frame that are being chopped off?
falagar-fr commentedon Apr 13, 2019
No, same problem with "low" subtitles. Some of them disappaered.
Synapto commentedon Apr 25, 2019
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.
jstebbins commentedon Apr 25, 2019
@Synapto as I said here #2038 (comment), HandBrake relocates subtitles that are in the cropped region. If rendered subtitles are being dropped there is a bug.
But I have not been able to reproduce this with the few sources that I have that place subtitles in the crop region.
jstebbins commentedon Apr 25, 2019
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.
Synapto commentedon Apr 27, 2019
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:
HB_Malformed_PGS_Test.zip
SOURCE:



HB UNTOUCHED:
HB CROPPED (128 top/bottom):
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.
Synapto commentedon Apr 27, 2019
Ooops, I forgot to add a "full-frame" top-only/bottom-only test.
Here's the .SUP on it's own, with those two extra tests coming after the previous 7 (above).
PGS_Test.zip
Mux it into whatever video you want.
asxzwang commentedon Aug 23, 2019
这个问题一直困扰着我,HandBrake的逻辑这样的:加载字幕之后再剪切,这些滤镜效果顺利是固定死的。
建议可以调整效率的顺序,如在剪切之后再加载字幕。
bradleysepos commentedon Aug 23, 2019
Translated: "This problem has been bothering me. The logic of HandBrake is like this: after the subtitles are loaded and then cut, these filters are smooth and dead.
It is recommended to adjust the order of efficiency, such as loading subtitles after cutting."
Please note that we prefer English on the issue tracker, as it is the common language among HandBrake's developers.
asxzwang commentedon Aug 23, 2019
I am using translation, not necessarily accurate expression.
ye,ye,ok,Use translation as much as possible. Thank you for your kind reply.
BenWoodworth commentedon Aug 22, 2020
(HandBrake v1.3.3)
For me, when I crop, it looks like the subtitles keep the same distance from the top of the video (when they should be moved up to account for the top crop)
Top crop = 0:

Top crop = 65:

[-]Subtitle position too low when "burning in" and using auto cropping[/-][+]Allow subtitle position to be adjusted. (With Crop/Padding in mind)[/+]