subtitles vertical position

Archive of historical feature requests.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
nicolajbroe
Posts: 1
Joined: Wed Nov 12, 2014 6:47 pm

subtitles vertical position

Post by nicolajbroe » Wed Nov 12, 2014 6:56 pm

Hi,

in the future i could be great, if handbrake had opportunity to control vertical offset of the subtitles position

/nicolajbroe

aram1376
Posts: 8
Joined: Fri Dec 26, 2014 3:42 pm

Re: subtitles vertical position

Post by aram1376 » Fri Dec 26, 2014 3:46 pm

i agree. it's really needed.

Please add the option to change the subtitles vertical position

User avatar
JohnAStebbins
HandBrake Team
Posts: 5441
Joined: Sat Feb 09, 2008 7:21 pm

Re: subtitles vertical position

Post by JohnAStebbins » Fri Dec 26, 2014 4:29 pm

Could you describe the use case for this in more detail please.

All the subtitle formats supported by HandBrake except tx3g have built in positioning information. This position information that is in the subtitle stream is preserved if you are encoding to mkv or burning the subtitles into the video. Specifying a global "vertical position" in these cases would override the position in the stream and result in difficult to read subtitles in some cases.

If you are encoding to mp4, text subtitles are translated to tx3g which has no positioning capability at all. So there is no way for HandBrake to specify a vertical position in this case. Bitmap subtitles can only be burned into the video when encoding to mp4, and here the positioning information from the subtitle stream is preserved and shouldn't be overridden IMO.

So I just don't see any use case where this would be both possible and desirable. Thus the reason I ask for more details.

aram1376
Posts: 8
Joined: Fri Dec 26, 2014 3:42 pm

Re: subtitles vertical position

Post by aram1376 » Fri Dec 26, 2014 5:25 pm

This feature is useful when posting subtitles like watermarks. When hardsubbing .srt files to a video using HandBrake, no matter how many Line Breaks are in the subtitle, the final hardsubbed video deletes the lines and a simple sub is shown at the bottom. For example I've made a subtitle containing my website's address and want to hardcode it on the videos I post in my site, so if anybody copies it, the members could simply see where it's been downloaded. In addition they can watch the video with their desired subtitle without my watermark disturbing them.

Look at this screenshot please. This video is encoded by another software:
http://www.pixentral.com/pics/1Zi1lc6yu ... trq8Q1.jpg

Plus another suggestion. Hardcoded subtitles using Handbrake don't support formatting like font size or font name. Here's a screenshot of one of Handbrake hardsubbed videos. You can see that the position and the formattings are not correct:
http://www.pixentral.com/pics/1XVozyKz8 ... KBSlyG.jpg

User avatar
JohnAStebbins
HandBrake Team
Posts: 5441
Joined: Sat Feb 09, 2008 7:21 pm

Re: subtitles vertical position

Post by JohnAStebbins » Fri Dec 26, 2014 6:39 pm

aram1376 wrote:This feature is useful when posting subtitles like watermarks. When hardsubbing .srt files to a video using HandBrake, no matter how many Line Breaks are in the subtitle, the final hardsubbed video deletes the lines and a simple sub is shown at the bottom. For example I've made a subtitle containing my website's address and want to hardcode it on the videos I post in my site, so if anybody copies it, the members could simply see where it's been downloaded. In addition they can watch the video with their desired subtitle without my watermark disturbing them.

Look at this screenshot please. This video is encoded by another software:
http://www.pixentral.com/pics/1Zi1lc6yu ... trq8Q1.jpg
Need to see an activity log please to be sure I understand what you are doing. But as far as I know, what you are attempting should already work if you are using "{\pos(x,y)}" notation in your SRT file. This is SSA syntax that is being used by some SRT files I've seen. So I added support for it in HandBrake. With this notation, you can exactly position the subtitle and have different lines in different locations around the window.
Plus another suggestion. Hardcoded subtitles using Handbrake don't support formatting like font size or font name. Here's a screenshot of one of Handbrake hardsubbed videos. You can see that the position and the formattings are not correct:
http://www.pixentral.com/pics/1XVozyKz8 ... KBSlyG.jpg
Yes, we can add this. The SRT "spec" I was working from did not include "font face". But that's SRT for you. There isn't a definitive spec *shrug*. If you know of a more complete reference, that would help me fill in the gaps.

User avatar
JohnAStebbins
HandBrake Team
Posts: 5441
Joined: Sat Feb 09, 2008 7:21 pm

Re: subtitles vertical position

Post by JohnAStebbins » Fri Dec 26, 2014 6:44 pm

hehe, I haven't tested this, but the way our SRT support is coded, it converts SRT markup to SSA and passes everything that isn't interpreted as SRT to the next stage, which is SSA renderer. So you *should* be able to embed *any* SSA markup in the SRT. Kind of a hacky way to get things done, but it should work for you since you are creating your own custom SRT file :mrgreen:

aram1376
Posts: 8
Joined: Fri Dec 26, 2014 3:42 pm

Re: subtitles vertical position

Post by aram1376 » Sat Dec 27, 2014 11:57 am

JohnAStebbins wrote: Need to see an activity log please to be sure I understand what you are doing. But as far as I know, what you are attempting should already work if you are using "{\pos(x,y)}" notation in your SRT file. This is SSA syntax that is being used by some SRT files I've seen. So I added support for it in HandBrake. With this notation, you can exactly position the subtitle and have different lines in different locations around the window.
I think sending the .srt file to you is the best way to show you my activity log. Well sent it using PM. I would appreciate it if you could put an example of SSA position Syntax which work that way in my subtitle. If you have to change for the whole lines, just do one of them so I'll know how to do the rest.
JohnAStebbins wrote: Hehe, I haven't tested this, but the way our SRT support is coded, it converts SRT markup to SSA and passes everything that isn't interpreted as SRT to the next stage, which is SSA renderer. So you *should* be able to embed *any* SSA markup in the SRT. Kind of a hacky way to get things done, but it should work for you since you are creating your own custom SRT file :mrgreen:
I tried a lot of ways to set the subtitle formatting. Changed the format to SSA and also sent that you (You may need the codes), put the SSA start code in the srt file with nothing else changed (in a lot of ways), but couldn't do the way you mentioned. I don't know how to do that trick.

By the way that would be great if you could add the option to import SSA files directly to HandBrake and hardsub the video with the formattings done.

aram1376
Posts: 8
Joined: Fri Dec 26, 2014 3:42 pm

Re: subtitles vertical position

Post by aram1376 » Sat Dec 27, 2014 11:59 am

By the way, I need the subtitle to be at the top of the video screen, please...

aram1376
Posts: 8
Joined: Fri Dec 26, 2014 3:42 pm

Re: subtitles vertical position

Post by aram1376 » Sat Dec 27, 2014 1:21 pm

Well, I found the answer. You can add "ANY" code from ASS and SSA subtitles to the srt file. A tip for the ones who don't know how to do this.
"You should add a small code to the beginning of all of the lines of the SRT file. Like {\fnTahoma} or {\fnTahoma\fs28} or {\fnTahoma\fs28\an8} etc. You can find the codes which you need to write between { and } in this webpage: http://docs.aegisub.org/3.2/ASS_Tags/"

Thanks John for you help and everyone else.

markog
Posts: 2
Joined: Thu Oct 02, 2014 12:31 am

Re: subtitles vertical position

Post by markog » Wed Jan 21, 2015 8:45 am

Hello,

Is it possible to implement subtitle hard coding options like in some other software solutions (like AnyVideoConverter, for example)? The way they do it is by setting subtitle position, font type and size from within software, not from the subtitle file itself. Everything is set in AVC Options menu. I haven't tried fiddling with ASS/SSA tags yet, but will soon. AVC way seems easier though because you don't have to touch the SRT file at all and everything is set in couple of clicks. Why am I not using AVC then, you may ask. Because burnt-in subtitles look better with Handbrake! Thank you for that, guys. I really appreciate it. Keep up the fantastic work!

markog
Posts: 2
Joined: Thu Oct 02, 2014 12:31 am

Re: subtitles vertical position

Post by markog » Tue May 05, 2015 5:58 pm

@aram1376:
Thanks, I've followed your advice and got the ASS tags working. HOWEVER, default settings for subtitles seem like they're outside of the safe area. Is there a solution for this? I'd like to have subtitles shown a bit higher than they appear by default (say, 30 pixels higher vertically). Is there a tag for this? Thanks in advance!

WhosAsking
Posts: 45
Joined: Fri Jul 03, 2009 1:40 pm

Re: subtitles vertical position

Post by WhosAsking » Fri Jun 26, 2015 7:11 pm

I wish to provide a corollary to this request, this time in regards to PGS/SUP subtitles. Now, many BluRay titles letterbox their feature because it's not in 16:9 aspect (it's like 2.35:1, for example). Now, most BluRay subtitles keep their subtitles out of the letterbox, but some (particularly WB) put their subtitles in the letterbox. This creates a difficulty when you auto-crop the feature. The PGS subtitles end up still going into the letterbox area. If you're not playing the resulting encode full-screen, most players will cut off the subtitle, taking it out of view (when viewed full-screen, it'll show up again, as it originally did in the now-cropped lettterbox area). For situations such as this, it might be useful to include an Advanced Option to shift the subtitle vertically by a specified number of lines to move them into the main frame (if the title has super- and subtitles, we're out of luck, but I haven't seen one to date).

User avatar
Rodeo
HandBrake Team
Posts: 12160
Joined: Tue Mar 03, 2009 8:55 pm

Re: subtitles vertical position

Post by Rodeo » Fri Jun 26, 2015 8:09 pm

This is done automatically when burning the subtitles in; when passing them through, it should be the responsibility of the player, as we don't re-encode the subtitles (the positioning is specified in the subtitle bitstream).

Post Reply