Index of /serveur/films/Sources/Official Harmy’s Star Wars Editions MKV/Return.of.the.Jedi.Grindhouse.35mm.LPP/Subtitles Project Threepio v9.0

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[TXT]HELP_WANTED.html2024-08-21 16:16 1.9K 
[   ]Project Threepio.nfo2024-08-21 16:16 3.3K 
[TXT]README.html2024-08-21 16:16 63K 
[DIR]SRT/2024-08-21 16:16 -  
[DIR]SUP/2024-08-21 16:16 -  
[DIR]perl/2024-08-21 16:16 -  
[DIR]resources/2024-08-21 16:16 -  
[DIR]vsfilter/2024-08-21 16:16 -  

 Project Threepio README
Project Threepio
Version 9.0

Please refer to the Project Threepio subtitle discussion thread for more information, updates, and corrections.

This document provides technical guidance for the most common procedures. Some of the procedures have Windows-specific instructions and are marked as such, but there is most likely a way to modify these instructions to get them to work on other platforms (for example, using Wine or alternate software).

Check to make sure your video is compatible with Project Threepio. Be sure to read the section on Project Threepio's subtitle file naming convention to ensure you use the correct subtitle file.

Many users prefer to use the raw SRT files to generate subtitles on-the-fly using HTPC software. Although this should work, this document does not provide any instructions for how to accomplish or troubleshoot this. Please note that using SRT files for playback is potentially much more complicated and prone to problems than using SUP files--and even if everything goes perfectly with the SRT files, they still won't look as nice as the SUP files. Unless you know that they simply will not work for your particular needs, save yourself the headache and just use the SUP files.


Audio/Video Compatibility

Project Threepio's subtitle file naming convention

How to put subtitles in an MKV/Blu-ray/AVCHD/DVD

Procedure for MKV

Procedure for Blu-ray/AVCHD

Procedure for DVD

How to create 720p BD-SUP files from the included SRT files [instructions are Windows-specific]

How to convert OTF font files to the TTF format

How to mark 720p "title" subtitles as forced

How to adjust BD-SUP files to accompany video without burnt-in alien subtitles

How to synchronize subtitles to a different video frame reference

Synchronizing SRT files

Synchronizing 720P BD-SUP files

Synchronizing 1080P BD-SUP files

Synchronizing NTSC DVD SUP/IFO files

How to reframe graphical subtitles for different video frames

Reframing 720P BD-SUP files

Reframing 1080P BD-SUP files

Reframing NTSC DVD SUP/IFO files

How to convert 720p BD-SUP subtitles to other formats

NTSC DVD SUP/IFO

NTSC DVD SUB/IDX

PAL DVD SUP/IFO

PAL DVD SUB/IDX

720p BDN+XML

1080p BD-SUP

1080p BDN+XML

How to edit or create SRT files

How to create compatible SRT files for RTL scripts

Links


Audio/Video Compatibility

Project Threepio's subtitles work best with audio and video that have the following characteristics:

Examples: Harmy's Despecialized Editions, Team Blu/dark_jedi's Trilogy Blu-ray & DVD Preservations.

The document includes detailed instructions for modifying the subtitles to work better with audio and video sources that have different characteristics, such as scans of film reels, international versions, Laserdisc preservations, etc.

Project Threepio's subtitle file naming convention

Project Threepio subtitle files use the following naming convention:

ROTJ-es-419-full.sup

Film prefix: can be one of the following:
Language code: the two-letter ISO 639-1 language code, sometimes with a modifier to indicate dialect, writing system, and/or SDH subtitles

Type of subtitle: can be one of the following:
Format: can be one of the following:
If you need help identifying the correct code for your language, refer to this list of supported languages with corresponding language codes.

How to put subtitles in an MKV/Blu-ray/AVCHD/DVD

Procedure for MKV

Required software: MKVToolnix

  1. If necessary, create BD-SUP files in the appropriate resolution using these instructions (720p and 1080p files are included)
  2. Run MKVMerge GUI
  3. Add the video, audio, and BD-SUP files (not SRT files!) to the Input Files
    I add subtitles in this order (roughly descending order by world L1+L2 speakers, with English first and macrolanguages/dialects grouped), but order may not be relevant to you:
     
    1. English (en)
    2. English SDH (en-sdh)
    3. English (matching) (en-match; not recommended for DVD projects)
    4. Mandarin, Simplified (zh-cmn-hans; 简体中文)
    5. Mandarin, Traditional (zh-cmn-hant; 繁體中文)
    6. Cantonese (zh-yue; 粵語)
    7. American Spanish (es-419; Español Americano)
    8. American Spanish Titles (es-419-titles; only with dub)
    9. Castilian Spanish (es-es; Castellano)
    10. Castilian Spanish Titles (es-es-titles; only with dub)
    11. French (fr; Français)
    12. French Titles (fr-titles; only with dub)
    13. Arabic (ar; العربية)
    14. Russian (ru; Русский)
    15. Russian Titles (ru-titles; only with ESB/ROTJ non-voiceover dub)
    16. Brazilian Portuguese (pt-br; Português Brasileiro)
    1. European Portuguese (pt-pt; Português Europeu)
    2. German (de; Deutsch)
    3. German Titles (de-titles; only with dub)
    4. Indonesian (id; Bahasa Indonesia)
    5. Malay (ms; Bahasa Melayu)
    6. Japanese (ja; 日本語)
    7. Japanese Titles (ja-titles; only with dub)
    8. Italian (it; Italiano)
    9. Italian Titles (it-titles; only with dub)
    10. Korean (ko; 한국어)
    11. Vietnamese (vi; Tiếng Việt)
    12. Turkish (tr; Türkçe)
    13. Persian/Farsi (fa; فارسی)
    14. Polish (pl; Polski)
    15. Thai (th; ไทย)
    16. Thai Titles (th-titles; only with SW dub)
    1. Ukrainian (uk; Українська)
    2. Romanian (ro; Română)
    3. Dutch (nl; Nederlands)
    4. Croatian (hr; Hrvatski)
    5. Hungarian (hu; Magyar)
    6. Greek (el; Ελληνικά)
    7. Czech (cs; Čeština)
    8. Swedish (sv; Svenska)
    9. Bulgarian (bg; Български)
    10. Danish (da; Dansk)
    11. Hebrew (he; עברית)
    12. Finnish (fi; Suomi)
    13. Norwegian (no; Norsk)
    14. Slovenian (sl; Slovenščina)
    15. Estonian (et; Eesti)
    16. Icelandic (is; Íslenska)
    Subtitles in bold are the ones I prioritize for formats limited to 32 subtitle tracks (Blu-ray/AVCHD/DVD); more languages could be added by excluding "titles" subtitles and their associated dubs
  1. Under general track options, select the language per track as needed
  2. Specify an output filename and select Start Muxing

Procedure for Blu-ray/AVCHD

Required software: tsMuxerGUI, ImgBurn, Wine (for non-Windows platforms only)

  1. If necessary, create BD-SUP files in the appropriate resolution using these instructions (720p and 1080p files are included)
  2. Run tsMuxerGUI
  3. Add the video, audio, and BD-SUP files (not SRT files!) to the Input Files (the Blu-ray/AVCHD format is limited to 32 PGS subtitle streams--do not add more, even though tsMuxerGUI allows this!)
    I add subtitles in this order, but order may not be relevant to you.
  4. Under tracks, select the language ID per track as needed
  5. Under Output, select Blu-ray disk or AVCHD disk as needed, and select a file path
  6. Click Start muxing to create the Blu-ray/AVCHD folder structure
  7. Run ImgBurn (if you are not running Windows, you will need to run this using Wine)
  8. Select Write Files/Folders to disc
  9. Add the BDMV and CERTIFICATE folders
  10. Click the burn icon (folder with arrow pointing to disc)
  11. If you receive a warning about UDF filesystems, let ImgBurn make the changes it suggests

Procedure for DVD

Required software: ImgBurn, Wine (for non-Windows platforms only)

  1. If necessary, create DVD SUP/IFO files using these instructions
  2. Run the modified MuxMan executable found in the resources directory (if you are not running Windows, you will need to run this using Wine)
  3. Under File, choose Load Project
  4. Select the dvd-palette.mxp file in the resources folder
    NOTE: If you don't include the palette, the subtitles may end up a mottled pink color. Palette files in other formats are also available for other muxing software.
  5. Select the video and audio streams
  6. Under SubPictures, choose the DVD SUP files (the DVD format is limited to 32 subtitle streams, and some authoring and playback software is limited to even fewer)
    I add subtitles in this order, but order may not be relevant to you.
  7. For each stream, be sure to specify a language and select both LB and WIDE
  8. Select a destination folder
  9. Click Start to create the DVD folder structure
  10. Run ImgBurn (if you are not running Windows, you will need to run this using Wine)
  11. Select Write Files/Folders to disc
  12. Add all of the folders in your DVD folder structure
  13. Click the burn icon (folder with arrow pointing to disc)
  14. If you receive a warning about UDF filesystems, let ImgBurn make the changes it suggests

How to create 720p BD-SUP files from the included SRT files [instructions are Windows-specific]

NOTE: Under most circumstances, you will not need to do this! You should only do this if you want to alter the appearance or text of the subtitles to be different from the included ones! If you are not doing this, just mux the included BD-SUP files.

Required software: AviSynth, Java Runtime, Perl Runtime, BDSup2Sub, easySUP, Wine (for non-Windows platforms only)

Required fonts: Arial, Adobe Heiti Std R (convert to TTF), Microsoft JhengHei, Kozuka Gothic Pr6N Medium (convert to TTF), Dotum, Tahoma, Droid Sans Fallback Full, Franklin Gothic Medium Cond

NOTE: The shift_subs.pl script uses the Project Threepio file naming conventions to determine file characteristics. Files not using these naming conventions may be handled incorrectly.

FONT NOTES: EasySUP does not support OTF fonts, so fonts in OTF format must be converted to TTF. Many systems already have Franklin Gothic Medium (not condensed) installed, and easySUP doesn't show the full font names. To choose the correct Franklin Gothic font, Franklin Gothic Medium Cond is listed second, and is the narrower of the two fonts. If your system shows multiple Microsoft JhengHei fonts, the correct one is listed first.

  1. Copy the DLL files from the vsfilter folder into easySUP's tools folder, overwriting existing files
  2. Run whichever of the following commands are appropriate (change paths to match your system):
    • Typical: perl perlprep_subs.pl SRT*-full.srt SRT*-titles.srt SRT*-native.srt
    • RTL (right-to-left: Arabic, Hebrew scripts): perl perlprep_subs-rtl.pl SRT*-rtl.srt
    • Matching: perl perlprep_subs-match.pl SRT*-en-native.srt
    These scripts will create new SRT files. NOTE: The resulting SRT files contain formatting data specifically for easySUP with the modified vsfilter.dll file. Do not use these modified SRT files for any other purpose!
  3. Run easySUP (this software has not been verified to work on non-Windows platforms using Wine)
  4. Load the appropriate modified SRT file (NOTE: if creating matching subtitles, choose the native SRT file that has been modified by the "match" script)
  5. Confirm the following settings for most subtitles (NOTE: some settings reset when you load a new SRT file):

    FormatResolutionModeFrame RateFont/Size/StyleFont ColorOutlineOutline ColorBackgroundSafe ZoneMarginShadowAlignmentOpacity
    Latin, Cyrillic, Greek, Hebrew ScriptsBD SUP720Full frame23.976Arial, 43, NormalWhite2BlackNone0%1202Center100%
    Mandarin/SimplifiedBD SUP720Full frame23.976Adobe Heiti Std Regular, 50, NormalWhite2BlackNone0%1112Center100%
    Mandarin/Traditional and CantoneseBD SUP720Full frame23.976Microsoft JhengHei, 56, BoldWhite2BlackNone0%1112Center100%
    Arabic ScriptBD SUP720Full frame23.976Arial, 60, NormalWhite2BlackNone0%1172Center100%
    JapaneseBD SUP720Full frame23.976Kozuka Gothic Pr6N Medium, 65, NormalWhite2BlackNone0%1092Center100%
    KoreanBD SUP720Full frame23.976Dotum, 43, BoldWhite2BlackNone0%1202Center100%
    ThaiBD SUP720Full frame23.976Tahoma, 60, NormalWhite2BlackNone0%1182Center100%
    Other Unspecified ScriptsBD SUP720Full frame23.976Droid Sans Fallback, 50, NormalWhite2BlackNone0%1172Center100%
    SDH----------------Opaque----0----
    English MatchingBD SUP720Full frame23.976Franklin Gothic Medium Cond, see Matching Chart for size and styleWhite2BlackNone0%See Matching Chart2Center100%


    Matching Chart: To be used only with matching subtitles

    Star Wars/The Empire Strikes BackReturn of the Jedi
    DeEd v1Size/Style: 51, Normal
    Margin: 132
    Size/Style: 52, Bold
    Margin: 115
    DeEd v2Size/Style: 50, Bold
    Margin: 116
    Size/Style: 54, Bold
    Margin: 120
    DJ DVD v3Size/Style: 56, Bold
    Margin: 106
    Size/Style: 57, Bold
    Margin: 96
    DJU2 Blu v2Size/Style: 52, Bold
    Margin: 116
    Size/Style: 55, Bold
    Margin: 95

  6. Click Start to generate a BD-SUP file, and save it to the SUP-720p folder
  7. Create a folder named tmp_XML and then run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-720p\*.sup") do java -jar resources\BDSup2Sub512.jar -x 0 -r 720p -T 24p -o tmp_XML\%~nf.xml SUP-720p\%~nf.sup
    • Other platforms: for f in SUP-720p/*.sup; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 720p -T 24p -o "tmp_XML/${FN2%%.*}.xml" "$f"; done
  8. Run the following command (change paths to match your system):
    perl perlshift_subs.pl tmp_XML
  9. Delete the unmodified 720p BD-SUP files from the SUP-720p folder
  10. Run the following command (change paths to match your system):
    • Windows: for %f in ("tmp_XML\*.xml") do java -jar resources\BDSup2Sub512.jar -x 0 -r 720p -T 24p -o SUP-720p\%~nf.sup tmp_XML\%~nf.xml
    • Other platforms: for f in tmp_XML/*.xml; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 720p -T 24p -o "SUP-720p/${FN2%%.*}.sup" "$f"; done
  11. Remove the tmp_XML folder

How to convert OTF font files to the TTF format

Required software: FontForge

  1. Open the OTF file in FontForge
  2. From the CID menu, select Flatten (if available)
  3. From the File menu, select Generate Fonts...
  4. Select the TrueType format and click Save
  5. You will see some warnings and errors. For the fonts used by Project Threepio, these do not appear to be serious.

How to mark 720p "title" subtitles as forced

None of the subtitles included with Project Threepio are marked as forced*. If you wish to mark the "title" subtitles (those used to translate onscreen text) as forced, follow the instructions below to convert the 720p subtitles. If you do this, it is recommended that you ignore the pre-made titles subtitles and instead convert the full subtitles--this process will mark only the title subtitles within the full subtitles as forced. Any subtitles converted from these 720p subtitles will inherit the forced properties.

Required software: Java Runtime, BDSup2Sub, Perl Runtime

NOTE: The force_titles.pl script uses the Project Threepio file naming conventions to determine file characteristics. Files not using these naming conventions may be handled incorrectly.

  1. Create a folder named tmp_XML and then run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-720p\*-full.sup") do java -jar resources\BDSup2Sub512.jar -x 0 -r 720p -T 24p -o tmp_XML\%~nf.xml SUP-720p\%~nf.sup
    • Other platforms: for f in SUP-720p/*-full.sup; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 720p -T 24p -o "tmp_XML/${FN2%%.*}.xml" "$f"; done
  2. Run the following command (change paths to match your system):
    perl perlforce_titles.pl tmp_XML
  3. Run the following command (change paths to match your system):
    • Windows: for %f in ("tmp_XML\*.xml") do java -jar resources\BDSup2Sub512.jar -x 0 -r 720p -T 24p -o SUP-720p\%~nf.sup tmp_XML\%~nf.xml
    • Other platforms: for f in tmp_XML/*.xml; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 720p -T 24p -o "SUP-720p/${FN2%%.*}.sup" "$f"; done
  4. Remove the tmp_XML folder

* Marking specific subtitles as forced will auto-enable them and not allow the viewer to turn them off when they match the player's native language. This is typically done when the film is shown dubbed, to translate the parts of the film that are not translated by the dub. Due to the ambiguity of how a player should react to multiple forced subtitles using the same language code (e.g. multiple Spanish dialects), the possibility of unneccessarily forced subtitles for alternate dubbing options (e.g. Russian voiceovers don't need subtitles, but other Russian dubs do), and the likelihood that the viewer will watch the films with English audio, Project Threepio, by default, relies on the viewer or disc author to select the appropriate subtitle stream.

How to adjust BD-SUP files to accompany video without burnt-in alien subtitles

Project Threepio, by default, assumes that the video its subtitles accompany has burnt-in alien subtitles in English, and shifts its non-English subtitles for that alien dialogue and neighboring dialogue to the top of the frame to avoid overlap. If the video does not have burnt-in alien subtitles, then Project Threepio's default subtitles for these scenes at the top of the frame can be unnecessarily distracting. You can use the unshift_subs.pl script to return these subtitles to their normal positions at the bottom of the frame. Other shifted subtitles, such as those translating the crawl text, will remain at the top of the frame.

The instructions below are for non-English subtitles only. To create English subtitles to accompany a subtitle-free preservation, you will need to render new English subtitles using the "nocrawl" SRT file.

Required software: Java Runtime, BDSup2Sub, Perl Runtime

NOTE: The unshift_subs.pl script cannot shift "titles" subtitles unless they are processed in the same batch as their corresponding "full" subtitles. This is because the script uses normally-positioned subtitles to calculate new positions for the shifted subtitles, and "titles" subtitles do not contain enough normally-positioned subtitles to do this with any accuracy. The unshift_subs.pl script uses the Project Threepio file naming conventions to determine file characteristics. Files not using these naming conventions may be handled incorrectly.

  1. Create a folder named tmp_XML and then run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-720p\*.sup") do java -jar resources\BDSup2Sub512.jar -x 0 -r 720p -T 24p -o tmp_XML\%~nf.xml SUP-720p\%~nf.sup
    • Other platforms: for f in SUP-720p/*-full.sup; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 720p -T 24p -o "tmp_XML/${FN2%%.*}.xml" "$f"; done
  2. Run the following command (change paths to match your system):
    perl perlunshift_subs.pl tmp_XML
  3. Run the following command (change paths to match your system):
    • Windows: for %f in ("tmp_XML\*.xml") do java -jar resources\BDSup2Sub512.jar -x 0 -r 720p -T 24p -o SUP-720p\%~nf.sup tmp_XML\%~nf.xml
    • Other platforms: for f in tmp_XML/*.xml; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 720p -T 24p -o "SUP-720p/${FN2%%.*}.sup" "$f"; done
  4. Remove the tmp_XML folder

How to synchronize subtitles to a different video frame reference

Project Threepio, by default, assumes that the video its subtitles accompany uses video frames matching the NTSC 2006 Bonus Disc (GOUT) release of the trilogy. Some preservations use other frame references, some of which are pre-defined in the resync_subs.pl script. You can also add new frame references by editing the script. The pre-defined frame references are:

There is also one special frame reference defined for the Star Wars mono mix:

In the commands below, replace the text FRAME_REF with the frame reference you want to use.

NOTE: If you are making multiple scripted alterations to the subtitles (shifting positions, marking as forced, etc), synchronization must be performed last. The resync_subs.pl script uses the Project Threepio file naming conventions to determine file characteristics. Files not using these naming conventions may be handled incorrectly.

Synchronizing SRT files

Required software: Perl Runtime

Synchronizing 720P BD-SUP files

Required software: Java Runtime, BDSup2Sub, Perl Runtime

  1. Create two folders, named tmp_XML and SUP-720p-resync-FRAME_REF
  2. Run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-720p\*.sup") do java -jar resources\BDSup2Sub512.jar -x 0 -r 720p -T 24p -o tmp_XML\%~nf.xml SUP-720p\%~nf.sup
    • Other platforms: for f in SUP-720p/*-full.sup; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 720p -T 24p -o "tmp_XML/${FN2%%.*}.xml" "$f"; done
  3. Run the following command (change paths to match your system):
    perl perlresync_subs.pl FRAME_REF tmp_XML
  4. Run the following command (change paths to match your system):
    • Windows: for %f in ("tmp_XML-resync-FRAME_REF\*.xml") do java -jar resources\BDSup2Sub512.jar -x 0 -r 720p -T 24p -o SUP-720p-resync-FRAME_REF\%~nf.sup tmp_XML-resync-FRAME_REF\%~nf.xml
    • Other platforms: for f in tmp_XML-resync-FRAME_REF/*.xml; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 720p -T 24p -o "SUP-720p-resync-FRAME_REF/${FN2%%.*}.sup" "$f"; done
  5. Remove the tmp_XML and tmp_XML-resync-FRAME_REF folders

Synchronizing 1080P BD-SUP files

Required software: Java Runtime, BDSup2Sub, Perl Runtime

  1. Create two folders, named tmp_XML and SUP-1080p-resync-FRAME_REF
  2. Run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-1080p\*.sup") do java -jar resources\BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o tmp_XML\%~nf.xml SUP-1080p\%~nf.sup
    • Other platforms: for f in SUP-1080p/*-full.sup; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o "tmp_XML/${FN2%%.*}.xml" "$f"; done
  3. Run the following command (change paths to match your system):
    perl perlresync_subs.pl FRAME_REF tmp_XML
  4. Run the following command (change paths to match your system):
    • Windows: for %f in ("tmp_XML-resync-FRAME_REF\*.xml") do java -jar resources\BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o SUP-1080p-resync-FRAME_REF\%~nf.sup tmp_XML-resync-FRAME_REF\%~nf.xml
    • Other platforms: for f in tmp_XML-resync-FRAME_REF/*.xml; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o "SUP-1080p-resync-FRAME_REF/${FN2%%.*}.sup" "$f"; done
  5. Remove the tmp_XML and tmp_XML-resync-FRAME_REF folders

Synchronizing NTSC DVD SUP/IFO files

Required software: Java Runtime, BDSup2Sub, Perl Runtime

  1. Create two folders, named tmp_XML and SUP-NTSC DVD-resync-FRAME_REF
  2. Run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-NTSC DVD\*.ifo") do java -jar resources\BDSup2Sub512.jar -x 0 -a 0 -r 480 -T 30p -o tmp_XML\%~nf.xml "SUP-NTSC DVD\%~nf.ifo"
    • Other platforms: for f in "SUP-NTSC DVD/*-full.ifo"; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -a 0 -r 480 -T 30p -o "tmp_XML/${FN2%%.*}.xml" "$f"; done
  3. Run the following command (change paths to match your system):
    perl perlresync_subs.pl FRAME_REF tmp_XML
  4. Run the following command (change paths to match your system):
    • Windows: for %f in ("tmp_XML-resync-FRAME_REF\*.xml") do java -jar resources\BDSup2Sub512.jar -x 0 -a 0 -r 480 -T 30p -o "SUP-NTSC DVD-resync-FRAME_REF\%~nf.ifo" tmp_XML-resync-FRAME_REF\%~nf.xml
    • Other platforms: for f in tmp_XML-resync-FRAME_REF/*.xml; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -a 0 -r 480 -T 30p -o "SUP-NTSC DVD-resync-FRAME_REF/${FN2%%.*}.ifo" "$f"; done
  5. Remove the tmp_XML and tmp_XML-resync-FRAME_REF folders

How to reframe graphical subtitles for different video frames

Project Threepio, by default, assumes that the video frame is a rectangle with an aspect ratio of approximately 2.37:1. Graphical subtitles may not be optimally positioned for preservations using a different video frame. You can use the reframe_subs.pl script to shift subtitles in (toward the center of the screen) a specified percentage of the total image height (including black bars).

Known reframing percentages are:

In the commands below, replace the text PERCENTAGE with the percentage you want to use.

Reframing 720P BD-SUP files

Required software: Java Runtime, BDSup2Sub, Perl Runtime

  1. Create two folders, named tmp_XML and SUP-720p-reframe
  2. Run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-720p\*.sup") do java -jar resources\BDSup2Sub512.jar -x 0 -r 720p -T 24p -o tmp_XML\%~nf.xml SUP-720p\%~nf.sup
    • Other platforms: for f in SUP-720p/*-full.sup; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 720p -T 24p -o "tmp_XML/${FN2%%.*}.xml" "$f"; done
  3. Run the following command (change paths to match your system):
    perl perlreframe_subs.pl PERCENTAGE tmp_XML
  4. Run the following command (change paths to match your system):
    • Windows: for %f in ("tmp_XML\*.xml") do java -jar resources\BDSup2Sub512.jar -x 0 -r 720p -T 24p -o SUP-720p-reframe\%~nf.sup tmp_XML\%~nf.xml
    • Other platforms: for f in tmp_XML/*.xml; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 720p -T 24p -o "SUP-720p-reframe/${FN2%%.*}.sup" "$f"; done
  5. Remove the tmp_XML folder

Reframing 1080P BD-SUP files

Required software: Java Runtime, BDSup2Sub, Perl Runtime

  1. Create two folders, named tmp_XML and SUP-1080p-reframe
  2. Run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-1080p\*.sup") do java -jar resources\BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o tmp_XML\%~nf.xml SUP-1080p\%~nf.sup
    • Other platforms: for f in SUP-1080p/*-full.sup; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o "tmp_XML/${FN2%%.*}.xml" "$f"; done
  3. Run the following command (change paths to match your system):
    perl perlreframe_subs.pl PERCENTAGE tmp_XML
  4. Run the following command (change paths to match your system):
    • Windows: for %f in ("tmp_XML\*.xml") do java -jar resources\BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o SUP-1080p-reframe\%~nf.sup tmp_XML\%~nf.xml
    • Other platforms: for f in tmp_XML/*.xml; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o "SUP-1080p-reframe/${FN2%%.*}.sup" "$f"; done
  5. Remove the tmp_XML folder

Reframing NTSC DVD SUP/IFO files

Required software: Java Runtime, BDSup2Sub, Perl Runtime, ImageMagick

  1. Create two folders, named tmp_XML and SUP-NTSC DVD-reframe
  2. Run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-NTSC DVD\*.ifo") do java -jar resources\BDSup2Sub512.jar -x 0 -r 480 -T 30p -o tmp_XML\%~nf.xml "SUP-NTSC DVD\%~nf.ifo"
    • Other platforms: for f in "SUP-NTSC DVD/*-full.ifo"; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 480 -T 30p -o "tmp_XML/${FN2%%.*}.xml" "$f"; done
  3. Run the following command (change paths to match your system):
    perl perlreframe_subs.pl PERCENTAGE tmp_XML
  4. Run the following command (change paths to match your system):
    perl perldvduncrop_subs.pl tmp_XML
  5. Run the following command (change paths to match your system):
    • Windows: for %f in ("tmp_XML_dvduncrop\*.xml") do java -jar resources\BDSup2Sub512.jar -x 0 -a 0 -r 480 -T 30p -o "SUP-NTSC DVD-reframe\%~nf.ifo" tmp_XML_dvduncrop\%~nf.xml
    • Other platforms: for f in tmp_XML_dvduncrop/*.xml; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -a 0 -r 480 -T 30p -o "SUP-NTSC DVD-reframe/${FN2%%.*}.ifo" "$f"; done
  6. Remove the tmp_XML and tmp_XML_dvduncrop folders

How to convert 720p BD-SUP subtitles to other formats

NTSC DVD SUP/IFO

Required software: Java Runtime, BDSup2Sub, Perl Runtime, ImageMagick

NOTE: The dvdprep_subs.pl script uses the Project Threepio file naming conventions to determine file characteristics. Files not using these naming conventions may be handled incorrectly.

  1. Create two folders, named tmp_XML and SUP-NTSC DVD
  2. Run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-720p\*.sup") do java -jar resources\BDSup2Sub512.jar -x 0 -r 480 -T 30p -o tmp_XML\%~nf.xml SUP-720p\%~nf.sup
    • Other platforms: for f in SUP-720p/*.sup; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 480 -T 30p -o "tmp_XML/${FN2%%.*}.xml" "$f"; done
  3. Run the following command (change paths to match your system):
    perl perldvdprep_subs.pl tmp_XML
  4. Remove the tmp_XML folder
  5. Run the following command (change paths to match your system):
    • Windows: for %f in ("tmp_XML_dvdprep\*.xml") do java -jar resources\BDSup2Sub512.jar -x 0 -a 0 -r 480 -T 30p -o "SUP-NTSC DVD\%~nf.ifo" tmp_XML_dvdprep\%~nf.xml
    • Other platforms: for f in tmp_XML_dvdprep/*.xml; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -a 0 -r 480 -T 30p -o "SUP-NTSC DVD/${FN2%%.*}.ifo" "$f"; done
  6. Remove the tmp_XML_dvdprep folder

NTSC DVD SUB/IDX

Required software: Java Runtime, BDSup2Sub, Perl Runtime, ImageMagick

NOTE: The dvdprep_subs.pl script uses the Project Threepio file naming conventions to determine file characteristics. Files not using these naming conventions may be handled incorrectly.

  1. Create two folders, named tmp_XML and SUB-NTSC DVD
  2. Run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-720p\*.sup") do java -jar resources\BDSup2Sub512.jar -x 0 -r 480 -T 30p -o tmp_XML\%~nf.xml SUP-720p\%~nf.sup
    • Other platforms: for f in SUP-720p/*.sup; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 480 -T 30p -o "tmp_XML/${FN2%%.*}.xml" "$f"; done
  3. Run the following command (change paths to match your system):
    perl perldvdprep_subs.pl tmp_XML
  4. Remove the tmp_XML folder
  5. Run the following command (change paths to match your system):
    • Windows: for %f in ("tmp_XML_dvdprep\*.xml") do java -jar resources\BDSup2Sub512.jar -x 0 -a 0 -r 480 -T 30p -o "SUB-NTSC DVD\%~nf.idx" tmp_XML_dvdprep\%~nf.xml
    • Other platforms: for f in tmp_XML_dvdprep/*.xml; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -a 0 -r 480 -T 30p -o "SUB-NTSC DVD/${FN2%%.*}.idx" "$f"; done
  6. Remove the tmp_XML_dvdprep folder

PAL DVD SUP/IFO

Required software: Java Runtime, BDSup2Sub, Perl Runtime, ImageMagick

NOTE: The dvdprep_subs.pl script uses the Project Threepio file naming conventions to determine file characteristics. Files not using these naming conventions may be handled incorrectly.

  1. Create two folders, named tmp_XML and SUP-PAL DVD
  2. Run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-720p\*.sup") do java -jar resources\BDSup2Sub512.jar -x 0 -r 576 -T 25p -o tmp_XML\%~nf.xml SUP-720p\%~nf.sup
    • Other platforms: for f in SUP-720p/*.sup; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 576 -T 25p -o "tmp_XML/${FN2%%.*}.xml" "$f"; done
  3. Run the following command (change paths to match your system):
    perl perldvdprep_subs.pl tmp_XML
  4. Remove the tmp_XML folder
  5. Run the following command (change paths to match your system):
    • Windows: for %f in ("tmp_XML_dvdprep\*.xml") do java -jar resources\BDSup2Sub512.jar -x 0 -a 0 -r 576 -T 25p -o "SUP-PAL DVD\%~nf.ifo" tmp_XML_dvdprep\%~nf.xml
    • Other platforms: for f in tmp_XML_dvdprep/*.xml; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -a 0 -r 576 -T 25p -o "SUP-PAL DVD/${FN2%%.*}.ifo" "$f"; done
  6. Remove the tmp_XML_dvdprep folder

PAL DVD SUB/IDX

Required software: Java Runtime, BDSup2Sub, Perl Runtime, ImageMagick

NOTE: The dvdprep_subs.pl script uses the Project Threepio file naming conventions to determine file characteristics. Files not using these naming conventions may be handled incorrectly.

  1. Create two folders, named tmp_XML and SUB-PAL DVD
  2. Run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-720p\*.sup") do java -jar resources\BDSup2Sub512.jar -x 0 -r 576 -T 25p -o tmp_XML\%~nf.xml SUP-720p\%~nf.sup
    • Other platforms: for f in SUP-720p/*.sup; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 576 -T 25p -o "tmp_XML/${FN2%%.*}.xml" "$f"; done
  3. Run the following command (change paths to match your system):
    perl perldvdprep_subs.pl tmp_XML
  4. Remove the tmp_XML folder
  5. Run the following command (change paths to match your system):
    • Windows: for %f in ("tmp_XML_dvdprep\*.xml") do java -jar resources\BDSup2Sub512.jar -x 0 -a 0 -r 576 -T 25p -o "SUB-PAL DVD\%~nf.idx" tmp_XML_dvdprep\%~nf.xml
    • Other platforms: for f in tmp_XML_dvdprep/*.xml; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -a 0 -r 576 -T 25p -o "SUB-PAL DVD/${FN2%%.*}.idx" "$f"; done
  6. Remove the tmp_XML_dvdprep folder

720p BDN+XML

Required software: Java Runtime, BDSup2Sub, Perl Runtime

NOTE: The xmlprep_subs.pl script uses the Project Threepio file naming conventions to determine file characteristics. Files not using these naming conventions may be handled incorrectly.

  1. Create a folder named BDN+XML-720p
  2. Run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-720p\*.sup") do java -jar resources\BDSup2Sub512.jar -x 0 -r 720p -T 24p -o BDN+XML-720p\%~nf.xml SUP-720p\%~nf.sup
    • Other platforms: for f in SUP-720p/*.sup; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 720p -T 24p -o "BDN+XML-720p/${FN2%%.*}.xml" "$f"; done
  3. Run the following command (change paths to match your system):
    perl perlxmlprep_subs.pl BDN+XML-720p

1080p BD-SUP

Required software: Java Runtime, BDSup2Sub, Perl Runtime, ImageMagick

  1. Create two folders, named tmp_XML and SUP-1080p
  2. Run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-720p\*.sup") do java -jar resources\BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o tmp_XML\%~nf.xml SUP-720p\%~nf.sup
    • Other platforms: for f in SUP-720p/*.sup; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o "tmp_XML/${FN2%%.*}.xml" "$f"; done
  3. Run the following command (change paths to match your system):
    perl perlsharpen.pl tmp_XML
  4. Run the following command (change paths to match your system):
    • Windows: for %f in ("tmp_XML\*.xml") do java -jar resources\BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o SUP-1080p\%~nf.sup tmp_XML\%~nf.xml
    • Other platforms: for f in tmp_XML/*.xml; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o "SUP-1080p/${FN2%%.*}.sup" "$f"; done
  5. Remove the tmp_XML folder

1080p BDN+XML

Required software: Java Runtime, BDSup2Sub, Perl Runtime, ImageMagick

NOTE: The xmlprep_subs.pl script uses the Project Threepio file naming conventions to determine file characteristics. Files not using these naming conventions may be handled incorrectly.

  1. If you already have 1080p BD-SUP files, you can skip ahead to step 6
  2. Create two folders, named SUP-1080p and BDN+XML-1080p
  3. Run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-720p\*.sup") do java -jar resources\BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o BDN+XML-1080p\%~nf.xml SUP-720p\%~nf.sup
    • Other platforms: for f in SUP-720p/*.sup; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o "BDN+XML-1080p/${FN2%%.*}.xml" "$f"; done
  4. Run the following command (change paths to match your system):
    perl perlsharpen.pl BDN+XML-1080p
  5. Run the following command (change paths to match your system):
    • Windows: for %f in ("BDN+XML-1080p\*.xml") do java -jar resources\BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o SUP-1080p\%~nf.sup BDN+XML-1080p\%~nf.xml
    • Other platforms: for f in BDN+XML-1080p/*.xml; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o "SUP-1080p/${FN2%%.*}.sup" "$f"; done
  6. Run the following command (change paths to match your system):
    • Windows: for %f in ("SUP-1080p\*.sup") do java -jar resources\BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o BDN+XML-1080p\%~nf.xml SUP-1080p\%~nf.sup
    • Other platforms: for f in SUP-1080p/*.sup; do FN1=$f; FN2=${FN1##*/}; java -jar resources/BDSup2Sub512.jar -x 0 -r 1080p -T 24p -o "BDN+XML-1080p/${FN2%%.*}.xml" "$f"; done
  7. If you don't want 1080 BD-SUP files, you can remove the SUP-1080p folder
  8. Run the following command (change paths to match your system):
    perl perlxmlprep_subs.pl BDN+XML-1080p

How to edit or create SRT files

Recommended software: Gaupol, but any text or subtitle editor should work (with modified instructions)

  1. If creating a new file, make sure it is using the UTF-8 encoding with a byte order mark (Gaupol calls this UTF-8-SIG)
  2. Open the English subtitle template file (named "*-en-template.srt"), and then open the file to be edited as a translation (this allows side-by-side view)
  3. Make your edits, observing these rules:
    • For RTL scripts, make edits to the "rtl" file, then copy changes to the "compat" file using the RTL compatibility conversion script
    • For RTL scripts, if opening an existing "rtl" file displays punctuation on the wrong side of the text, use a different editor that fully conforms to the Unicode Bidirectional Algorithm
    • No subtitle should ever occupy more than two lines
    • Try not to allow lines to exceed 32 in length, 34 in extreme cases (as measured by Gaupol)
    • If a line needs to be shortened, try summarization, deleting unnecessary phrases, and combining with text from an adjacent line (but avoid abbreviation)
    • Try to follow Project Threepio style conventions as closely as appropriate for your language:
      • Use an en-dash to signify double-dialogue: – (IMPORTANT: this character triggers the double-dialogue alignment code in Project Threepio's Perl scripts)
      • Use typographical apostrophes and quotes: ’ “ ”
      • Use trailing and leading ellipses to signify continuing text: ...
    • Do not include subtitle credits or any other non-subtitling text in the files. Any non-subtitling text will be removed. If you want credit for subtitles you have worked on, I will give credit in the project discussion thread.
  4. Save your translation

How to create compatible SRT files for RTL scripts

Many pieces of software (particularly media players) do not fully conform to the Unicode Bidirectional Algorithm, and require specially-formatted text to display the subtitles correctly. The script below will use the "rtl" files for all RTL scripts to generate new "compat" SRT files, which work around most of the BiDi implementation quirks we've encountered.

NOTE: Under most circumstances, you will not need to do this! You should only do this if you want to alter or add RTL SRT files. If you are not doing this, just use the included "compat" files.

Required software: Perl Runtime

Links

AviSynth

BDSup2Sub (included with Project Threepio)

easySUP

FontForge

Fonts: Arial, Adobe Heiti Std R, Microsoft JhengHei, Kozuka Gothic Pr6N Medium, Dotum, Tahoma, Droid Sans Fallback Full, Franklin Gothic Medium Cond

Gaupol

ImageMagick

ImgBurn

Java Runtime (JRE)

MKVToolnix

Perl Runtime

tsMuxerGUI

Wine