Chapter 6. Script Basics

     It was mentioned earlier that a script is an essential part of subtitling. So what exactly is a script? Simply, a script is a file that that contains all the lines of dialogue, the times which they appear on the screen, the colors they use, and all the other pertinent information needed to subtitle a show. Each different subtitling program uses itís own script format, but there are utilities that will convert between the different formats. JACOsub comes with itís own conversion utility called JSCovert. Similarly, SSA has its own file import utility. Another PC based conversion program called Sconv can handle many different script formats. Other subtitling programs such as SlothTitler for the PC have the ability to read and play back scripts from many different subtitling programs.

     For the purpose of this tutorial, I will describe the JACOSub script format briefly. Each line of the script can contain one of the following; a comment, a timed line of dialogue, or a directive definition. Comments are simply reminders or messages you leave for yourself and others in the script. Timed lines contain all the text that will eventually appear in your subtitle as well as a time stamp, directive, and name field. Directive definitions are setup fields that the subtitling program reads in order to determine fonts, colors, placement, etc.

     First letís take a look at a comment block. In JACOSub, this would look like:

# This is a free fan subtitle. You may use this script only in accordance
# with U.S. copyright regulations. This means if the title has been licensed
# for release in the U.S., you may ONLY use this script for PERSONAL viewing
# and MAY NOT distribute material using this script or translation.

     Comment lines always begin with a # symbol and a space before the text. Typically things you want to include in comments are the credits (who translated, who timed, etc.), the date and version of the script, and any important information the person who is actually running the script will need to know. One thing you should always put in your script is the synch point you used. A synch point is the point on the video source where you started timing the script from. Weíll get into this more in detail later.

     JACOSubís script format is extremely powerful. It allows you to replicate every function of the programís setup dialogues within your script. I like to call this ďinline configuration.Ē What this allows you to do is to specify the way you have your subtitle set up on your computer such that anyone can replicate your subtitle exactly on any other computer. You are allowed to specify all your fonts, font sizes, color palettes, and text directives in the script itself. I highly recommend using this method for anyone who intends to use JACOSub. If you want to have your friend use your script, it requires no extra configuration to use. All directives start with a # and a command, with no space. Hereís how it works:

#TIMERES 100

This line denotes your time resolution is set to divide seconds into 100 units of measurement. This means your script timing can be accurate to within 1/100th of a second!

#RAMP 0.000

Specifies a ramp timing, weíll explain this later.

#SHIFT 0

Specifies a time shift, weíll explain this later.

#H SUPERHIRES

This sets the resolution you wish to use. Values are HIRES and SUPERHIRES. I prefer using SUPERHIRES because the subtitles are much cleaner and clearer. Using this mode on an Amiga limits you to a four color palette, but you can use multiple palettes so itís not as bad as it sounds.


#p 0 0 0 0 COLOR 0 BLACK IN PALETTE 0 (DEFAULT)
#p 1 5 D E COLOR 1 BLUE IN PALETTE 0 (DEFAULT)
#p 2 0 0 0 COLOR 2 BLACK IN PALETTE 0 (DEFAULT)
#p 3 D D 8 COLOR 3 YELLOW IN PALETTE 0 (DEFAULT)
#p 0 0 0 0 1 COLOR 0 BLACK IN PALETTE 1
#p 1 E E E 1 COLOR 1 WHITE IN PALETTE 1
#p 2 0 0 0 1 COLOR 2 BLACK IN PALETTE 1
#p 3 D D 8 1 COLOR 3 YELLOW IN PALETTE 1

Here, two different 4-color palettes are defined. Palette 0 is the default that will be used if no palette is expressly specified. What palettes do for you is let you define the colors you wish to use for your subtitle up front, so theyíre always there when you need them, and if you wish to change a color across an entire script, itís very easy. This is preferable to using the color configuration in the JACOSub setup because it preserves your color choices across different computers. You can, however, use the color setup dialogue to determine the RGB values of the colors you like and then copy them into your script. The #p directive defines a palette. The first number is the color number in that palette (0-15 for HIRES, and 0-3 in SUPERHIRES). The next 3 alphanumeric digits are for an 8-bit (0-255) hexadecimal RGB color definition. For each of the three octets, 0 is minimum, and F is maximum. Therefore 0 0 F would be no red, no green, and all blue. F F F would be all red, all green and all blue, or white! 0 0 0 would be nothing, hence black. The last number specifies which palette the color belongs to. No number defaults to palette 0. Any additional text is considered a comment, so you can label each palette definition for easy access later. So, for example, the line:

#p 6 0 A 4 3 Bla bla bla

tells us weíre defining color #6 (obviously weíre in HIRES mode here) for palette 3, and the color will be no red, some green (A), very little blue (4) with a comment of ďBla bla blaĒ. This would be a greenish-blue color.

     You might ask why we have left two of our four available unused in each palette. There is a very good reason for this. These two colors are reserved by the system for key color and background color. You might wonder how the genlock knows what part of the computer screen to overlay on top of your video signal, and what part of the computer screen to make transparent. This color is the background color. While some genlocks require you to manually set the background color, Iíve yet to encounter an Amiga genlock that didnít do it automatically. You donít have to specify color 0 or color 2. I do, however because I find that by setting them to black, you get a much cleaner subtitle. If you leave them to their defaults, sometimes you will see a grey border around all your letters on the screen. By setting them to black (the same color as the shadow) the outline blends into the fontís shadow and looks much better, not to mention more professional. You might find this not to be true on your genlock, but it certain holds true if you are using a GVP like I do.

     The next things you can define inline for maximum portability are your font definitions. In JACOSub, you can use any Amiga bitmap font. A font declaration looks like:


#F 0 MemGillSansBold.font 45
#F 1 CivilianBold.font 45

This is really simple, #F tells us weíre defining a font, the first number is the font we are defining. The next value is the filename of the font, in this case MemFillSansBold.font and CivilianBold.font will be our 0th and 1st font. Again font 0 is the default used by JACOSub if no other directive has been made. The number following the font name is the font size. Easy, huh? Again you can use the JACOSub configuration menu to see each font and what sizes are available. You can use any size you like and the software will scale the font. There are additional attributes such as x/y aspect ratio scaling, but you should refer to the JACOSub manual for the more complex details. If youíre not happy with the fonts that come standard with the Amiga (and who is?) there are literally thousands of free fonts available for download from AmiNet, the largest Amiga software archive on the Internet. Fonts are located in the text/bfont directory.

     The last directive line weíre going to look at is one of the most important. This line allows you to define a set specification for a font, color, placement, alignment, palette, etc. It is called a font directive, and looks like this:


#D0 CF3 [Dialogue] 
#D1 VACF1 [Raised Dialogue] 
#D2 F1CF1CP1 [Music]

This may seem a little more complicated, but donít worry. There are numerous directives you can use when specifying a font style. This is one of the reasons JACOSub is so powerful. Again you want to use the inline font directives so that anyone who uses your script will see your subtitles exactly how you intended it to look.

     There are numerous font directives you should learn if you want to script with JACOSub. However, hitting the Amiga and D key at the same time will bring up the directive editor for the selected line. This will allow you to build the directives you want, and then you can apply them to your configuration. Letís take a look at what these directives do.

     The #D0 defines a text directive. 0, of course, is the default. Following the directive number is the directive itself. On the first line, we see CF3. This simply means change the face color of the font to 3. What is 3, you might ask. Good question! 3 is the color 3 in palette 0 that we defined earlier! Easy stuff, huh? The last bit is just a comment for you to remember what your directive does, so I called it [Dialogue]. The next line is just as simple. #D1 defines directive number 1. VA tells the program that the line of dialogue using this directive will be positioned vertically above any other lines on the screen. Hence the comment [Raised Dialogue]. The third line is a little more complicated, but youíll understand in a second! #D2 you know. F1CF1CP1? Huh? Weíll break it up a bit. You recognize the CF1 right? Change font color to 1. In what palette? Not the default this time. CP1 tells us to change palette to 1 (remember 0 is the default). Great, so now we have changed to color 1 in palette 1, which isÖ white. Right! So whatís left in this directive now? The F1 piece tells us to use font number 1. Remember 0 is the default, so weíre now using the CivilianBold.font. Nothing to it!

     Now you know everything you need to know about configuring your JACOSub the way you want. You can define colors, fonts, directives, comments, and more! I canít stress enough how important it is to use these powerful commands to configure your scripts. Itíll save you time in the long run and make it so incredibly easy for other people to view your script as you intended them to be. Additionally, once you have setup your configuration script the way you like it, you can copy and paste it into the top of each and every script you do for instant configuration!

     Youíre almost done learning the basics of the JACOSub script! The last, most important thing is, of course, the actual translation dialogue. Timed dialogue will compose the largest part of your script, sometimes up to 500 lines for a 20 minute TV episode! Timed text lines look like this:


0:06:26.46 0:06:28.21 D0 {Man1} He beat it!
0:06:27.50 0:06:28.70 D1 {Girl1} Ani-sama!

The first field indicates when the line of dialogue will start being displayed. Times are counted up from 0, where 0 is your chosen synch point - the start of the video. The second field indicates when the line is to disappear from the screen. The format for a timed line is hours:minutes:seconds.fractionalsecond, so 0:06:26.46 would mean the line appears on screen 0 hours, 6 minutes, 26 and 46/100th of a second after the synch point time 0. If you look closely youíll see that the second line of dialogue starts before the first line of dialogue ends. This means two different lines will be on screen at the same time. If you try and execute this script, youíll encounter an error message called a ďpixel collision.Ē This means two or more lines are trying to occupy the same space at the same time. Needless to say, this will look messy.

     How do we get around this mess? Easy, the third field in the timed dialogue line. D0. Where have you seen that before? Oh yeah, itís a directive! Thatís our [Dialogue] directive. D1? Hey, thatís our [Raised Dialogue] directive. So what does that mean? Looking back at our directive definition, it means that the second line of dialogue will be positioned vertically above the first line, and in color 1 of palette 0 which we defined as blue. Instantly youíve eradicated the pixel collision and added a bit of style to your subtitle by having 2 lines of dialogue on screen at once, one above the other, and in a different color.

     So whatís left. {Man1} and {Girl1} refer to the name of the character speaking. This field isnít really important, but itís nice to know whoís saying what when you come back to edit the script. You must include the curly braces { } but they can be empty if you decide not to add names. The rest of the line contains the actual text to be displayed on screen. Now you know everything you need to know about the JACOSub script format, but for more information, be sure to visit the JACOSub script format spec. Now you have the ability to set your script up and add lines of timed dialogue. Well, thatís great, but where do those times come from? Donít tell me I have to pause my LaserDisc every time someone starts or stops speaking and write down the times. Not even close!


<-- Chapter 5 | Chapter 7 -->
Contents of this Page Copyright © 2001 by Matthew R. Demicco.
You may not reproduce any part of this document
without the express written consent from the author.