RandomEngy / VidCoder

A Blu-ray, DVD and video file transcoder for Windows.
http://vidcoder.net
GNU General Public License v2.0
686 stars 42 forks source link

is it possible to change the type of letters in the subs #175

Open MaDMAn0 opened 7 years ago

MaDMAn0 commented 7 years ago

is it possible to change the type of letters in the srt when it gets added to the movie?

RandomEngy commented 7 years ago

There's no way to pick the font. HandBrake does not expose that functionality.

Flitskikker commented 7 years ago

You can, actually, by editing the hb.dll file with a hex editor.

Look for the following string:

Style: Default,%s,%d,&H00FFFFFF,&H00FFFFFF,&H000F0F0F,&H000F0F0F,0,0,0,0,100,100,0,0.00,1,2,3,2,20,20,20,0

Then you'll find the SSA style that Handbrake uses for burning external SRTs.

You'll have to make sure you only edit the part between [Script Info] and hb_subtitle_add_ssa_header: malloc failed so that file size doesn't change. You can pad any remaining space with spaces or 0x00's.

For VidCoder 2.50 x64, it's 0x1266008 until 0x12661E7.

As an example, I changed the default config:

[Script Info]
ScriptType: v4.00+
Collisions: Normal
PlayResX: %d
PlayResY: %d
Timer: 100.0
WrapStyle: 0

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,%s,%d,&H00FFFFFF,&H00FFFFFF,&H000F0F0F,&H000F0F0F,0,0,0,0,100,100,0,0.00,1,2,3,2,20,20,20,0

Into this:

[Script Info]
ScriptType: v4.00+
Collisions: Normal
Timer: 100.0

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,HelveticaNeueLT Pro 67 MdCn,21,&H00ECECEC,&H00FF0000,&H00000000,&H00000000,0,0,0,0,100,100,0,0.00,1,0.9,0,2,30,30,18,1