<p>Given that I couldn't find a satisfying solution, I wrote <a href="https://gist.github.com/ndnenkov/c9e1d74fce110da4a21fbb7979895024" rel="nofollow noreferrer">a Ruby script</a> for merging such overlapping captions.</p>
<p>Usage:</p>
<pre><code>ruby ./merge_overlapping_srt_captions.rb _input_file_ _output_file_
</code></pre>

CC BY-SA 4.0
2020-06-18T10:13:49.870Z
2020-06-18T10:13:49.870Z
ndnenkov
<p>I used YouTube to autogenerate subtitles for a video. The srt file looks something like this:</p>

<pre><code>0:00:00.060,0:00:07.080
first caption

0:00:03.240,0:00:09.599
second caption

0:00:07.080,0:00:13.019
third caption
</code></pre>

<hr>

<p>As you can see, the captions overlap in time. The <code>first caption</code> is present for seconds 0-7, while the <code>second caption</code> is present for seconds 3-9. The result in YouTube is that:</p>

<ul>
<li>The <code>first caption</code> appears first and is the first line on the screen.</li>
<li>Then on second 3 the <code>second caption</code> appears as the second line.</li>
<li>On second 7 the <code>first caption</code> disappears and the <code>second caption</code> becomes the first line. At the same time, <code>third caption</code> appears as the second line.</li>
</ul>

<hr>

<p>However, when I use the srt in DaVinci Resolve, only a single line appears at a time. So:</p>

<ul>
<li>The <code>first caption</code> stays there until second 7.</li>
<li>The <code>second caption</code> appears only between seconds 7 and 9.</li>
<li>The <code>third caption</code> appears after second 9.</li>
</ul>

<hr>

<p>Is there a way to display such multiline subtitles with DaVinci Resolve?</p>

<p>If not, how do I fix it so it displays properly with one caption at a time?</p>

<davinci-resolve><subtitles>
Display overlapping subtitles
ndnenkov
# Display overlapping subtitles

(Asked by: username_0 on 2020-05-07)

I used YouTube to autogenerate subtitles for a video. The srt file looks something like this:
0:00:00.060,0:00:07.080
first caption

0:00:03.240,0:00:09.599
second caption

0:00:07.080,0:00:13.019
third caption


As you can see, the captions overlap in time. The first caption is present for seconds 0-7, while the second caption is present for seconds 3-9. The result in YouTube is that:

The first caption appears first and is the first line on the screen.
Then on second 3 the second caption appears as the second line.
On second 7 the first caption disappears and the second caption becomes the first line. At the same time, third caption appears as the second line.


However, when I use the srt in DaVinci Resolve, only a single line appears at a time. So:

The first caption stays there until second 7.
The second caption appears only between seconds 7 and 9.
The third caption appears after second 9.


Is there a way to display such multiline subtitles with DaVinci Resolve?
If not, how do I fix it so it displays properly with one caption at a time?

**Tags:** davinci-resolve, subtitles


---

## 1 answers

### Answer by username_0 on 2020-06-18. Score: 0 | Accepted answer

Given that I couldn't find a satisfying solution, I wrote a Ruby script for merging such overlapping captions.
Usage:
ruby ./merge_overlapping_srt_captions.rb _input_file_ _output_file_


---

