CRI Sofdec2  Last Updated: 2022-11-21 16:25 p
Subtitle Information Files
If you want to add subtitles to a movie, you will need to prepare a subtitle information file.
Subtitle information files are a text-format file that designates the timing at which the subtitle content (strings) should be displayed.

Subtitle Information File Format

  (a)  On the first line, write the time unit (integer value).
  (b)  From the second line onward, write the start time (INTIME), end time (OUTTIME), and the subtitle string, separated by commas. Each new subtitle must be on its own line.
  (c)  The start and end time values are divided by the time unit to determine the number of seconds.
  (d)  The end time is not included in the display time.
  (e)  The subtitle strings can contain commas.
  (f)  Lines that begin with a semicolon (;) are treated as comments.
  (g) The following character encodings are supported: ASCII, Shift-JIS, UTF-8, and UTF-16 with BOM (UTF-16LE).
The subtitles will be embedded into the movie with the character encoding used in the file.



Subtitle Information File Examples

[Example 1] Subtitle Information Based on Playback Time
In this example, the time unit is 1000. The subtitle strings are displayed between 0 to 2 seconds, 5 to 7.5 seconds, and 7.5 to 10 seconds.


;INTIME, OUTTIME, Subtitle, Comment
1000
0, 2000, First Message.
5000, 7500, Second Message.
7500, 10000, Third Message.


[Example 2] Subtitle Information Based on Frame Number
If the movie's frame rate is 29.97 fps, you can set the time unit to 29970 to represent 1 frame as 1000 for the display time. The number displayed in one second would be 29.97 * 1,000 = 29,970.
In this example, the subtitle strings will be displayed between frames 0 to 100, 150 to 200, and 200 to 250.


;INTIME, OUTTIME, Subtitle, Comment
29970
0, 100000, First Message.
150000, 200000, Second Message.
200000, 250000, Third Message.