VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Member
    Join Date
    Mar 2013
    Location
    Prague, CZ
    Search Comp PM
    I need to edit one subtitle file (originally *.ass) which is bilingual - EN+Korean, see screen. I need to remove the other one. Is there any automated procedure for this, instead of manually deleting it? A program or something else maybe?
    thx for any advice
    Peter
    Image
    [Attachment 61558 - Click to enlarge]
    Quote Quote  
  2. It could be done much faster (if not fully automated) with an advanced text editor like Ted Notepad or Notepad++, using regular expressions.
    For instance, search this :
    Code:
    (\d\d:\d\d:\d\d,\d\d\d --> \d\d:\d\d:\d\d,\d\d\d)\n[^\w].+\n([.\w].+)
    ...and replace with this :
    Code:
    \1\n\2
    ...should delete one line after the timecodes if it begins with anything other than a “word” character, if the third line begins with either a “word” character or a period. But this may not necessarily cover all subtitles, some english lines may begin with another character (other than a letter or a period as in your screenshot), some korean subtitles may be on two lines... so it would be better to quickly check each replacement, rather than choosing “replace all” to do it all at once.

    Ted Notepad also has a special “filter by pattern” feature which could be useful here (Tools > Lines > Grep, filter by pattern), it allows to delete any line containing a particular pattern, or conversely to keep all lines containing a particular pattern and delete all other lines ; but I'm not sure how to reliably tell it to delete any line containing korean characters (is this really korean by the way ? looks more like japanese to me...).
    For instance with this pattern :
    Code:
    ^.+[\w].+$
    ...and the options “Keep matching lines” and “Also keep empty lines”, it will delete all lines which do not contain at least one “word” character ; normally it should keep all timecodes and all english subtitles, but again, I would double-check to make sure that nothing is missing.
    Last edited by abolibibelot; 3rd Nov 2021 at 12:25.
    Quote Quote  
  3. Member
    Join Date
    Mar 2013
    Location
    Prague, CZ
    Search Comp PM
    I've already mastered it myself, I found other subtitles without that mix of languages.
    Thank you very much abolibibelot for your kind response
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!