nginx-vod-module icon indicating copy to clipboard operation
nginx-vod-module copied to clipboard

Remove blank nodes when parsing dfxp subtitles

Open bgaudaen opened this issue 2 years ago • 0 comments

When parsing DFXP/TTML subtitles to later convert to VTT, blank nodes should be ignored. For instance if you have the following in your dfxp subtitle :

<p begin="00:01:37.437" end="00:01:40.697">
    <span tts:backgroundColor="#000000" tts:color="#ffffff">Sentence 1</span>
    <br></br>
    <span tts:backgroundColor="#000000" tts:color="#ffffff">Sentence 2</span>
</p>

The transformed VTT output looks like :

00:01:37.437 --> 00:01:40.697
Sentence 1
                

                Sentence 2

Whereas the expected result should be :

00:01:37.437 --> 00:01:40.697
Sentence 1
Sentence 2

bgaudaen avatar Dec 13 '21 17:12 bgaudaen