Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.


Go Back   Doom9's Forum > General > Subtitles

Thread Tools Search this Thread Display Modes
Old 3rd July 2013, 18:19   #1  |  Link
Registered User
Join Date: Jun 2013
Posts: 1
bdnxml2srt - python script for conversion

Hey guys,

I was looking for a PGS to SRT solution that would work for multiple OSes, so I decided to come up with my own. I hope this helps some people out.

First, convert the PGS to BDN XML using bdsup2sub++ (http://forum.doom9.org/showthread.php?t=167051) Be sure to set the correct language when outputting, as the script reads that information when performing OCR.

Then use this script to convert that to SRT. It uses tesseract for OCR so you'll need that installed too (and somewhere in your PATH).


usage: convert.py [-h] -i INPUT [-o OUTPUT] [-f] [-b] [-l]

Convert BDN XML subtitle to SRT format

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        BDN XML input file
  -o OUTPUT, --output OUTPUT
                        Output file, or '-' for stdout (default), without SRT
  -f, --forced-only     Only output subtitles marked as forced
  -b, --no-ocr          Don't use tesseract to OCR. Generates template SRT.
  -l, --label-language  Insert language code before extension, e.g.
                        output.eng.srt Combine with setting the output file to
                        the empty string to achieve e.g. eng.srt
eeeeeric is offline   Reply With Quote

linux, mac, pgs, srt, windows

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 10:01.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.