User Tools

Site Tools


ffmpeg:subtitles:styling_the_subtitles

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
ffmpeg:subtitles:styling_the_subtitles [2024/12/30 20:37] – created peterffmpeg:subtitles:styling_the_subtitles [2024/12/30 20:46] (current) peter
Line 2: Line 2:
  
 Set the Style in the Subtitle File Itself. Set the Style in the Subtitle File Itself.
 +
 +===== SRT Files =====
  
 For SRT files, the options for the subtitle styles are limited.  For SRT files, the options for the subtitle styles are limited. 
  
-Basic styling can be set using HTML markups like <b>, <i>, <u>, and <font>.+  * Basic styling can be set using HTML markups like <b>, <i>, <u>, and <font>.
  
  
Line 26: Line 28:
  
 </file> </file>
 +
 +----
 +
 +===== ASS Files =====
 +
 +For ASS files, there are many more options for the subtitle styles.
 +
 +These are the styles options that can be set in an ASS file:
 +
 +<code>
 +[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,Arial,16,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
 +</code>
 +
 +----
 +
 +==== Example ====
 +
 +To change the font style to Futura and font color to “&HFF00” (green):
 +
 +<file bash subtitle.ass>
 +[Script Info]
 +; Script generated by FFmpeg/Lavc60.31.102
 +ScriptType: v4.00+
 +PlayResX: 384
 +PlayResY: 288
 +ScaledBorderAndShadow: yes
 +YCbCr Matrix: None
 +
 +[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,Futura,16,&Hff00,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,1
 +
 +[Events]
 +Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
 +Dialogue: 0,0:00:00.00,0:00:02.00,Default,,0,0,0,,This is the first sentence
 +Dialogue: 0,0:00:02.00,0:00:04.00,Default,,0,0,0,,This is the second sentence
 +Dialogue: 0,0:00:04.00,0:00:07.00,Default,,0,0,0,,This is the third sentence
 +Dialogue: 0,0:00:07.00,0:00:10.00,Default,,0,0,0,,This is the forth sentence
 +</file>
 +
 +
 +<WRAP info>
 +**NOTE:**  See the **Style** line.
 +
 +  * **Futura** is the Fontname.
 +  * **&Hff00** is the PrimaryColour.
 +
 +PrimaryColour is in hexadecimal in Blue Green Red (BGR) order.
 +
 +  * This is the opposite order of HTML color codes.
 +  * They must always start with **&H**.
 +
 +</WRAP>
 +
ffmpeg/subtitles/styling_the_subtitles.1735591022.txt.gz · Last modified: 2024/12/30 20:37 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki