AfterDawn Blu-ray Encoding Tutorial Lesson 8
Convert Text Subtitles To Images
In addition to video and audio, there is another common type of content commonly found on Blu-ray discs. Although often referred to as subtitles, which does describe what these streams are normally used for, in reality these streams are subpictures. A subpicture is a still image which can be displayed over the top of the video. And just like video or audio, subpictures are stored in streams.
But of course subtitles naturally start out life as text files, not images, and outside the world of disc-based formats (Blu-ray and DVD) that's how they stay. Whether your subtitles are extracted from an existing video file or you create them for yourself, chances are good they are in a text format such as SRT or SSA. In this lesson you will learn how to convert those text-based subtitle files to a subpicture stream suitable for Blu-ray authoring.
The Complete AfterDawn Blu-ray Encoding Tutorial
Creating assets for Blu-ray authoring is relatively easy, but not necessarily simple. To make it easier to learn we have divided this tutorial into several individual lessons, each of which addresses a single step in the process. At the top and bottom of each lesson is a navigation menu where you can jump to any other lesson in the series. You can easily return to a previous section for review or skip over any future section. It is recommended that you read the entire series at least the first time through.
Official AfterDawn Blu-ray Encoding Tutorial feedback thread
We have created a dedicated discussion in our forums (open in new window) for feedback on this tutorial. We would love to hear your whatever thoughts you have. Tell us what you liked or what you didn't like. Let us know if there was something you didn't understand or even something that was just plain wrong. We strive for 100 percent accuracy in our guides, but nobody's perfect. Any help you can give us in getting a little closer to that goal is appreciated. Our goal is to help you out, and anything we can change to do a better job of that is an improvement.
Unlike video or audio, still images (by definition) are not normally found in streams. While the contents of a video frame or audio sample is directly related to both the frames/samples which came before and the ones which follow, a subpicture is related only to content in other (video and/or audio) streams. In fact, a subtitle stream does not even need to contain more than one image.
As a result there are multiple ways subpicture streams may be formatted. The two most common, and the ones this lesson will focus on, are SUP and BDN-XML. The majority of Blu-ray authoring programs will accept subpictures in one or both of these formats and they can both be produced using the same free software and simple process.
|Java for 32-bit Windows|
|Java for 64-bit Windows|
easySUP is actually just a GUI for a variety of other tools, most of which are included in the same download and will automatically be copied to the correct location. You will also need to make sure to have Java installed (select the appropriate version for your OS) before you run easySUP. You will also need AviSynth which should already have been installed from the first lesson in this tutorial.
Browse for folder
The download for easySUP is a self extracting (7-Zip) archive. When you run it there will be a browse button for selecting the folder to extract the files to.
Select a folder
Select the folder to extract the easySUP files into. For versions of Windows later than XP (Vista, 7, and beyond) it's recommended to choose a folder other than Program Files or Program Files (x86) to avoid permissions issues which can prevent user installed software from working correctly. The easiest alternative is simply creating your own equivalents to these folders. I call mine Programs and Programs (x86). Since I'm running a 64-bit version of Windows and this is 32-bit software I'll install to Programs (x86).
Once easySUP has been copied to your hard drive you may want to create a shortcut on your desktop or pin it to your Start Menu or taskbar to make it more convenient to run later.
Converting Text Subtitles With easySUP
Converting subtitles to Blu-ray compatible SUP or BDN XML format with easySUP is as simple as selecting the input file, setting some basic options to match the accompanying video stream, adjusting the appearance of the subtitles, and previewing the results.
1. Loading a subtitle file
Clicking anywhere in this text box will cause the Open dialog to appear where you can browse to the subtitle file you wish to convert.
2. General output file settings
In this section you will find settings for the entire subtitle stream and the file which it will be saved in. These settings will be determined by the requirements of your Blu-ray authoring software and properties of the video your subtitles are written for.
- They standard Blu-ray subtitle formats for Blu-ray authoring are BD SUP (not to be confused with the DVD SUP format) and BDN XML. If your authoring software supports both it's usually simpler to use BD SUP format because it consists of just one file, similar to the way video and audio streams are stored. A subtitle stream in BDN XML format, on the other hand, uses a separate image (PNG) file for each subtitle and is generated in an archive (RAR) file which you will need to extract before adding it to your Blu-ray project. Both should produce identical results.
- This sets the size of the subtitle images easySUP will create. The default setting of Fast will result in the smallest images, limiting them to the size of the subtitles themselves. Half Frame and Full Frame will create images with either half the resolution or the same resolution of the video file. See number 3 for more details on the resolution setting.
3. Resolution and Frame rate
- Set these to match the video your subtitles will be displayed with on your Blu-ray disc. The resolution, in particular, is important both for easySUP to properly size subtitles when using the Half Frame or Full Frame option above (see number 2) and properly scaling the subtitles for previewing and determining when line breaks are needed.
3. Subtitle Formatting
The settings in this section control how the individual subtitles will look.
1. Basic font settings
- These three fields control the font, style (normal, bold, or italic) and size of the output text. These settings will play a large role in determining how readable your subtitles are.
2. Font color
- The color shown here will be used for the main body (not including any outline) of each subtitle character. Clicking on it will open a color selection dialog where you can change it.
- These fields control the appearance of the outline around each character. The number in the dropdown list sets the width in pixels. You can remove the border entirely by setting it to 0 but this will almost always result in text which is harder to read, particularly if it is displayed over the video itself rather than a letterbox border. To the right of that is a box showing the color which will be used for the border. As with the color indicator above (in number 2), you can click here to change the color. Finally there are a pair of Background options, None and Opaque. None will leave the area surrounding the subtitle text transparent. Opaque will add a background behind each subtitle the same color as the border. This should be used carefully as it can obscure important parts of the picture. However it can also prevent subtitles which are too similar in color to the video from disappearing into the background.
- As a rule, subtitles should not extend all the way to the edges of the video frame because they could be cut off by a Blu-ray player or display. The percentage listed for Safe Zone indicates the padding which will be added on the sides of each subtitle. Keep in mind this number is for both sides, so a setting of 10% means 5% on both the left and right. In other words a setting of 10% (assuming a resolution of 1920×1080) represents a padding of 96 pixels (1920 ÷ 10 ÷ 2 = 96) on each side. In other words no text would be displayed in those areas. The Margin setting does the same thing vertically, but is in pixels rather than a percentage so it is not resolution dependent.
- This sets the size of the shadow which will be shown under each character. Setting it to 0 turns the shadow off entirely, as does setting the background to Opaque.
- Use this slider to align subtitles to the left, center, or right side of the video frame.
- This slider controls how transparent the subtitles are. Dragging it to the left makes the subtitles more transparent. Setting it all the way to the right will produce subtitles which are not transparent at all.
4. Previewing your subtitles
Obviously you'll want to see what your subtitles are going to look like before you perform the conversion. This area of easySUP is where you can do that.
1. Preview area
- This part of the window will show you a preview of your subtitles scaled to match the resolution you have set for the output file. You can also click here to load (or reload) the preview any time you change the output settings in any way.
2. Select subtitle
- This area will present a list of subtitles you can select to preview. Make sure to check the appearance of a variety of different subtitles if you want a clear picture of how they will look after conversion. In particular you should make sure to find some of the longer subtitles when you are adjusting the font size so you can see how much of the video frame they will cover.
Starting the conversion
Click the Start button and easySUP will begin processing your subtitles and converting them to images, and eventually assemble them into a Blu-ray compliant subpicture stream. When all these processes are completed you will be prompted to save the output.
If you are converting your subtitles to SUP format you will be prompted for the location to save them in once conversion has completed. Browse to the folder where you want to save your subtitles for authoring, enter a name for the files, and click on the Save button.
BDN XML Output
If you tell easySUP to create BDN XML subtitles you will not be prompted for a save location after conversion finishes. If you ask for both SUP and BDN XML you will receive the prompt, but only the SUP files will be saved in your selected destination folder. Instead all the files for BDN XML subtitles (and there are many since each individual subpicture is a separate PNG file, are combined in a RAR file. In case you aren't already familiar with it, RAR is an archive format similar to ZIP or 7z. Actually there will be two RAR files created - one for each of the two BDN XML formats. These files will have to be extracted before you can use them for authoring.
Extracting BDN XML Subtitles With 7-Zip
Although the RAR format is native to WinRAR, it can also be read, and the contents extracted, by the excellent free archiving tool 7-Zip. Make sure you get the appropriate version to match your copy of Windows - 32-bit or 64-bit.
|7-Zip for 32-bit Windows|
|7-Zip for 64-bit Windows|
Configuring 7-Zip (as Administrator)
If you are using Windows Vista or Windows 7 you will need to run 7-Zip once as Administrator in order to set its file association options so it will automatically open various file formats including RAR. Right-click on the 7-Zip File Manager entry on your Start Menu and select Run as Administrator.
Once 7-Zip starts, select Options from the Tools menu.
Select any type of archives you want 7-Zip to open. Make sure RAR is among them.
To extract the BDN XML subtitles created by easySUP you will need to first open the folder where the original (text) subtitles are located. This is where easySUP will create the BDN XML archive.
Double-click on one of the RAR files to begin extraction. Consult your Blu-ray authoring software's manual if you aren't sure which one you need.
Extracting With 7-Zip
Select the Extract button to open a wizard for copying the files outside the archive.
Enter A Folder Name
Make sure to type a folder name at the end of the path listed under Copy to. Otherwise you will end up with a bunch of individual PNG files and a XML file all extracted to the folder your original subtitle files are in. Entering a name tells 7-Zip to create a new folder with that name and extract the subtitle files into it.
Inside the new folder will be a separate PNG file for each subtitle and a XML file with information for authoring software to use when importing them to create a PES (subpicture) stream.
When you need to import these subtitles into your authoring software you will simply need to point to the XML file and the rest should be automatic.
Continue To Lesson 9
Content may be the primary focus of a Blu-ray disc, but the primary feature which sets it apart from simply copying a video file to a disc is the use of menus. Of course menus are also content. This is particularly true with Blu-ray where a menu is just another title which happens to have a special interactive graphics stream added. In the next lesson you will learn about the basics of creating menu assets, beginning with instructions for creating the background for a menu from an individual video frame extracted with MeGUI.