SRT import - how do you size and position the text?

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
peterh337
Posts: 12
Joined: Sun Sep 25, 2016 8:23 am

SRT import - how do you size and position the text?

Post by peterh337 »

Currently I am doing SRT import using Vegasaur and Vegas Pro 13.

The size and font are specified in the template used to import the SRT data. The position is done by using the Track Motion feature, which moves the whole video track (the titles are placed on a separate track).

If one uses Handbrake's SRT import, how is this done?
Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: SRT import - how do you size and position the text?

Post by Woodstock »

It isn't. Handbrake does not have any mechanism for changing fonts, colors, or positions from what is in the SRT file.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5725
Joined: Sat Feb 09, 2008 7:21 pm

Re: SRT import - how do you size and position the text?

Post by JohnAStebbins »

In general, the SRT "specification" has no mechanism for specifying the size and position of text. I quote "specification" because the closest thing to a specification is the functionality of the original application that implemented SRT, SubRip. No official written specification exists. There are various extensions that have been added over time that are supported by some players and not others. See SubRip (.SRT) subtitles support in players.

A common type of extension that is used is to simply add SSA tags to the SRT file. SSA supports changes to font characteristics and text positioning. And HandBrake happens to support this type of extension to SRT. Unfortunately, there is no way to globally set a setting this way. It only works line by line.
peterh337
Posts: 12
Joined: Sun Sep 25, 2016 8:23 am

Re: SRT import - how do you size and position the text?

Post by peterh337 »

OK; thank you. That appears quite difficult to use.

I did see the Matroska SRT spec and that was used to write the custom converter which converts Oziexplorer GPS track log into an SRT file. I would need to modify this to do the SSA tags as well, plus add some means of specifying the content on the command line.

One issue is that this process generates approximately 1 subtitle per 3 seconds and it almost hangs Vegas. The program becomes basically unresponsive so all one can do at that point is to render out the project. It works well enough though e.g.
https://vimeo.com/180135440
but that video took about 3 days to render with the subtitles! I was hoping Handbrake would be much faster.
markog
Posts: 5
Joined: Thu Oct 02, 2014 12:31 am

Re: SRT import - how do you size and position the text?

Post by markog »

I've used positioning in SRT files for years and it worked great, but recent version(s?) of Handbrake don't support it anymore, it seems.
Or am I doing something wrong?

The format I always used was:
1
00:00:09,830 --> 00:00:11,927
{\pos(960,1000)}This is a subtitle text
for burning onto files using Handbrake.

Can you bring this back to Handbrake, please?
tlindgren
Bright Spark User
Posts: 260
Joined: Sun May 03, 2009 2:14 pm

Re: SRT import - how do you size and position the text?

Post by tlindgren »

peterh337 wrote: Mon Sep 26, 2016 4:26 pmI did see the Matroska SRT spec and that was used to write the custom converter which converts Oziexplorer GPS track log into an SRT file. I would need to modify this to do the SSA tags as well, plus add some means of specifying the content on the command line.
It might be worth trying using the ASS (Advanced Substation Alpha) subtitle format instead, this is a much more modern subtitle format that is both well documented and includes lots of feature. Or the precursor, SSA (SubStation Alpha, it was basically renamed ASS for v4.0 and up).

I'm not sure how much of the ASS specification is actually implemented, I saw some really funky stuff in online descriptions like multiple subtitle layers! animations! rotations! alpha blends! and even using pictures/sound/movies as subtitles?! (WTF). But hopefully the basics are well-supported (scaling, placing, fonts, colors and so on) and may provide what you need in a format that is defined and thus less likely to change.
User avatar
Ritsuka
HandBrake Team
Posts: 1655
Joined: Fri Jan 12, 2007 11:29 am

Re: SRT import - how do you size and position the text?

Post by Ritsuka »

HandBrake uses libass ( https://github.com/libass/libass ), so almost all the crazy things will work.
Post Reply