4

I'm doing some e-learning courses by watching videos on VLC, it would help me a lot if I'm able to do what I describe below.

What I want to do is how can I set-up VLC to show multiple lines of a selected subtitle.

The set-up will show the previous line, the current line and the next line at a time.

Please help. Thanks in advance.

2 Answers 2

2

I wanted to solve it with @dashakol solution but I didn't have MS Word. I tried too with Subtitle edit program but I had problems installing it.

So I made my own python script for merge lines with the same time codes. Github link (need to have python installed for to run it)

You can run it this way: python3 merge_same_timing.py path/nameFile.srt

1

I had the same problem and since couldn't find a direct solution I came up with this workaround. I hope it will be helpful for anyone else with the same problem.

You can modify your SRT subtitle file with this macro in MS Word. Click "view macros" > "create macro" and paste the following script:

Sub MergAll2closeSubLines()
'
' MergAll2closeSubLines Macro
'
'
Do While Selection.Find.Execute = True
    Selection.Find.ClearFormatting
    With Selection.Find
        .Text = "??:??:??,??? ??? ??:??:??,???"
        .Replacement.Text = ""
        .Forward = True
        '
        ' change (.Wrap = wdFindContinue) to (.Wrap = wdFindStop)
        '
        .Wrap = wdFindStop
        .MatchWildcards = True
    End With
    '
    ' tweak this section based on the formating of subtitle
    '
    Selection.Find.Execute
    Selection.EndKey Unit:=wdLine
    Selection.MoveLeft Unit:=wdWord, Count:=7, Extend:=wdExtend
    Selection.Copy
    Selection.MoveUp Unit:=wdLine, Count:=2, Extend:=wdExtend
    Selection.Delete Unit:=wdCharacter, Count:=1
    Selection.Delete Unit:=wdCharacter, Count:=1
    Application.Browser.Previous
    Selection.EndKey Unit:=wdLine
    Selection.MoveLeft Unit:=wdWord, Count:=7, Extend:=wdExtend
    Selection.PasteAndFormat (wdFormatSurroundingFormattingWithEmphasis)
Loop
End Sub

It basically finds and copies the ending time stamp of every other line, deletes that line's ending time and pastes that in the place of previous line's ending time. This will modify your subtitle in a few seconds.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .