Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ::: {#page_content .content_body}
- ::: {.Section}
- []{#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-1028272}
- Creating an STL Format Subtitle File
- ====================================
- An easy and flexible way to create subtitle files is to use the STL
- format developed by Spruce Technologies. The STL format allows you to
- configure most subtitle settings, and change the settings on a subtitle
- by subtitle basis. It supports both the single file method and the
- graphics file method, and even allows you to use both methods in the
- same file.
- STL format files can be saved as either plain text files or as RTF files
- (as created with TextEdit). You must use RTF files if your text contains
- Unicode characters.
- ::: {.Section}
- []{#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-1028277}
- Basic STL Format
- ----------------
- There are three parts to an STL format subtitle file: commands,
- comments, and entries.
- - ::: {.ItemHeading}
- [Commands: ]{.Emphasis}These are preceded by the dollar sign (\$).
- It is these commands that allow you to configure the various aspects
- of the subtitles, such as their font and position. See [[STL
- Commands](chapter_19_section_13.html#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-1028301)]{.Cross-Ref_Gray}
- for more information.
- :::
- - ::: {.ItemHeading}
- [Comments: ]{.Emphasis}These are preceded by a double slash (//).
- These allow you to add text comments throughout the subtitle file
- without affecting its import.
- :::
- - ::: {.ItemHeading}
- [Entries: ]{.Emphasis}These include the start and end timecode
- values and the text or graphics file for that subtitle clip.
- :::
- Following is an example of a simple STL subtitle file.
- ::: {.CodeListing}
- ::: {.CodeLines}
- ::: {.CodeBlock}
- \$FontName = Arial
- :::
- ::: {.CodeBlock}
- \$FontSize = 65
- :::
- ::: {.CodeBlock}
- //The following subtitles are for scene one.
- :::
- ::: {.CodeBlock}
- 00:00:12:04 , 00:00:14:12 , Lemurs are the bullies of the wild.
- :::
- ::: {.CodeBlock}
- 00:00:16:14 , 00:00:19:08 , Here we see them bring down a moose.
- :::
- :::
- :::
- Commands, which are always preceded by a dollar sign, use the equal sign
- (=) to separate the command name from its value. The entries use commas
- to separate their fields. In both cases, you can add tab characters to
- align the fields and make the file easier to read.
- [Note: ]{.yNote}[If you add spaces between the comma and the text entry,
- they are considered part of the text and appear in the subtitle. You can
- use the tab character to provide space between the comma and the text
- entry without affecting the text.]{.Para}
- You can add a command multiple times within a file to change a setting
- for specific subtitles.
- ::: {.CodeListing}
- ::: {.CodeLines}
- ::: {.CodeBlock}
- \$FontName = Arial
- :::
- ::: {.CodeBlock}
- \$FontSize = 65
- :::
- ::: {.CodeBlock}
- 00:00:12:04 , 00:00:14:12 , Lemurs are the bullies of the wild.
- :::
- ::: {.CodeBlock}
- \$FontSize = 50
- :::
- ::: {.CodeBlock}
- 00:00:16:14 , 00:00:19:08 , Here we see them bring down a moose.
- :::
- :::
- :::
- In this case, both subtitles will use the same font, with the first one
- at a size of 65 and the second one at 50.
- :::
- ::: {.Section}
- []{#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-1028301}
- STL Commands
- ------------
- Following is a list of the commands supported by the STL format.
- [Note: ]{.yNote}[These commands override the settings in DVD Studio Pro
- Preferences, which provide the default settings for all settings that
- have not been overridden.]{.Para}
- ::: {.Section}
- []{#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-SW70}
- ### Font Commands
- The font commands set all commonly used font properties.
- - ::: {.ItemHeading}
- [\$FontName: ]{.Emphasis}Sets the name of the font the subtitles
- use. Use the family name as it appears in the Fonts window, which
- can be opened by clicking Show Fonts in the toolbar or choosing
- Format \> Fonts \> Show Fonts.
- :::
- - ::: {.ItemHeading}
- [\$FontSize: ]{.Emphasis}Sets the size of the font.
- :::
- - ::: {.ItemHeading}
- [\$Bold: ]{.Emphasis}Selects the bold version of the font (if
- available). Enter True to select the bold version and False to
- disable it.
- :::
- - ::: {.ItemHeading}
- [\$Italic: ]{.Emphasis}Selects the italic version of the font (if
- available). Enter True to select the italic version and False to
- disable it.
- :::
- - ::: {.ItemHeading}
- [\$Underlined: ]{.Emphasis}Adds an underline to the subtitle text.
- Enter True to turn on the underline and False to turn it off.
- :::
- :::
- ::: {.Section}
- []{#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-SW71}
- ### Color Commands
- The color commands choose the colors from the default subtitle Color
- Palette to apply to the subtitle. The values range from 0 to 15. You can
- assign the colors to the default Color Palette in DVD Studio Pro
- Preferences.
- - ::: {.ItemHeading}
- [\$ColorIndex1: ]{.Emphasis}Chooses the text color.
- :::
- - ::: {.ItemHeading}
- [\$ColorIndex2: ]{.Emphasis}Chooses the text's outline 1 color.
- :::
- - ::: {.ItemHeading}
- [\$ColorIndex3: ]{.Emphasis}Chooses the text's outline 2 color.
- :::
- - ::: {.ItemHeading}
- [\$ColorIndex4: ]{.Emphasis}Chooses the background color.
- :::
- :::
- ::: {.Section}
- []{#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-SW72}
- ### Contrast Commands
- The contrast commands set the opacity of the colors assigned to the
- subtitle. The values range from 0 (transparent) to 15 (opaque).
- - ::: {.ItemHeading}
- [\$TextContrast: ]{.Emphasis}Sets the opacity of the text color.
- :::
- - ::: {.ItemHeading}
- [\$Outline1Contrast: ]{.Emphasis}Sets the opacity of the text's
- outline 1 color.
- :::
- - ::: {.ItemHeading}
- [\$Outline2Contrast: ]{.Emphasis}Sets the opacity of the text's
- outline 2 color.
- :::
- - ::: {.ItemHeading}
- [\$BackgroundContrast: ]{.Emphasis}Sets the opacity of the
- background color. This is usually set to 0, unless you are using a
- graphic that does not use white as the background color.
- :::
- :::
- ::: {.Section}
- []{#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-SW73}
- ### Position Commands
- These commands control the subtitle's position.
- - ::: {.ItemHeading}
- [\$HorzAlign: ]{.Emphasis}Sets the subtitle's horizontal alignment.
- You can enter left, center, or right.
- :::
- - ::: {.ItemHeading}
- [\$VertAlign: ]{.Emphasis}Sets the subtitle's vertical alignment.
- You can enter top, center, or bottom.
- :::
- - ::: {.ItemHeading}
- [\$XOffset: ]{.Emphasis}Allows you to modify the subtitle's
- horizontal position from where the horizontal alignment placed it.
- The values you enter are in pixels, with positive values moving the
- subtitle to the right and negative values moving it to the left.
- :::
- - ::: {.ItemHeading}
- [\$YOffset: ]{.Emphasis}Allows you to modify the subtitle's vertical
- position from where the vertical alignment placed it. The values you
- enter are in pixels, with positive values moving the subtitle up and
- negative values moving it down.
- :::
- :::
- ::: {.Section}
- []{#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-SW74}
- ### Display Commands
- These commands control how a subtitle displays.
- - ::: {.ItemHeading}
- [\$ForceDisplay: ]{.Emphasis}Forces the subtitle to display
- regardless of whether subtitles are turned on by the DVD player. You
- can enter True (subtitles are forced to display) or False (subtitle
- display is controlled by the DVD player).
- :::
- - ::: {.ItemHeading}
- [\$FadeIn: ]{.Emphasis}Sets the fade time used to gradually dissolve
- the subtitles on. Enter a value in frames.
- :::
- - ::: {.ItemHeading}
- [\$FadeOut: ]{.Emphasis}Sets the fade time used to gradually
- dissolve the subtitles off. Enter a value in frames.
- :::
- :::
- ::: {.Section}
- []{#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-SW75}
- ### Graphics File Command
- Use this command if this subtitle file uses graphics files in addition
- to, or in place of, text entries.
- - ::: {.ItemHeading}
- [\$SetFilePathToken: ]{.Emphasis}Sets a token that you use on any
- subtitle entries that contain a graphics filename instead of
- subtitle text. The entry must be such that it never appears in
- normal text or filenames. The normal convention is to surround the
- text with dual angle brackets, making it easier to locate within an
- STL file. For example, you could use [\_Graphic\_]{.CodeBody}. See
- [[Referencing Graphics Files in STL Subtitle
- Files](chapter_19_section_13.html#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-1028390)]{.Cross-Ref_Gray}
- for details.
- :::
- :::
- ::: {.Section}
- []{#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-SW3}
- ### Timeline Command
- By default, the timecode values in an STL file are in reference to the
- video stream's zero-based time, which starts at 00:00:00:00. You can use
- this command to reference the file's timecode values to the video
- stream's asset-based timecode.
- - ::: {.ItemHeading}
- [\$TapeOffset: ]{.Emphasis}Controls how the timecode values in the
- STL file are referenced to the video stream. You can enter False to
- reference them to the stream's zero-based timecode (which begins at
- 00:00:00:00), or True (the default setting) to reference them to the
- asset-based timecode.
- :::
- [Note: ]{.yNote}[When referenced to the asset-based timecode, the Track
- Inspector's Track Offset setting is ignored---only the actual asset's
- timecode is used.]{.Para}
- :::
- :::
- ::: {.Section}
- []{#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-1028369}
- Controls Embedded in the Subtitle Text
- --------------------------------------
- You can embed several controls in the text part of the entries. These
- controls can force a line break and turn on and off the bold and italic
- font versions.
- ::: {.Section}
- []{#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-SW77}
- ### Line Breaks
- Subtitle text does not automatically wrap at the edges of the screen. To
- make it fit you must either reduce the font size or break it into
- multiple lines by inserting line breaks. To insert a line break, add the
- vertical pipe character (\|) to the text.
- ::: {.CodeListing}
- ::: {.CodeLines}
- ::: {.CodeBlock}
- 00:00:12:04 , 00:00:14:12 , Lemurs are the bullies \| of the wild.
- :::
- :::
- :::
- In the above example, the text will appear as two lines.
- :::
- ::: {.Section}
- []{#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-SW78}
- ### Bold, Italic, and Underlined Characters
- You can embed controls that change the state of the bold and italic
- attributes within the text part of an entry.
- To change the state of the bold setting, insert an up arrow followed by
- the letter "B" (\^B).
- ::: {.CodeListing}
- ::: {.CodeLines}
- ::: {.CodeBlock}
- 00:00:12:04 , 00:00:14:12 , Lemurs are \^Bbullies\^B.
- :::
- :::
- :::
- In the above example, the bold status changes for the word "bullies"
- only. If the bold attribute had not already been activated, "bullies"
- would change to bold. If the bold attribute had already been activated,
- "bullies" would not be bold.
- To change the state of the italic setting, insert an up arrow followed
- by the letter "I" (\^I). You can also use bold and italic together.
- ::: {.CodeListing}
- ::: {.CodeLines}
- ::: {.CodeBlock}
- 00:00:12:04 , 00:00:14:12 , Lemurs are \^B\^Ibullies\^B\^I.
- :::
- :::
- :::
- In the above example, the word "bullies" has both the bold and italic
- attributes change.
- To add an underline to portions of the text, insert an up arrow followed
- by the letter "U" (\^U). You can use the underline along with the bold
- and italic settings.
- :::
- :::
- ::: {.Section}
- []{#apple_ref:doc:uid:DVDStudioPro-UserManual-43664SUB-1028390}
- Referencing Graphics Files in STL Subtitle Files
- ------------------------------------------------
- An STL subtitle file can contain a mix of text subtitle entries and
- references to graphics files. You must use the \$SetFilePathToken
- command in the file before any lines that reference a graphics file.
- ::: {.CodeListing}
- ::: {.CodeLines}
- ::: {.CodeBlock}
- \$SetFilePathToken = \_Graphic\_
- :::
- ::: {.CodeBlock}
- 00:00:12:04 , 00:00:14:12 , \_Graphic\_RabidLemur.tif
- :::
- ::: {.CodeBlock}
- 00:00:16:14 , 00:00:19:08 , \_Graphic\_MooseLemur.tif
- :::
- :::
- :::
- [Important: ]{.yAlert}[Do not add spaces between the token
- ([\_Graphic\_]{.CodeBody} in this example) and the
- filename.]{.ImportantPara}
- The STL subtitle file and the graphics it references must be in the same
- folder. And, just like the other assets that you import into your
- project, the graphics files must not be moved, renamed, or deleted until
- after you build your project.
- :::
- :::
- ::: {.copyright}
- [Copyright © []{.CopyrightYear} Apple Inc. All rights
- reserved.](Copyright.html)
- :::
- :::
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement