diff --git a/lib/node/subtitle.js b/lib/node/subtitle.js index 8df73cb..4825841 100755 --- a/lib/node/subtitle.js +++ b/lib/node/subtitle.js @@ -309,12 +309,11 @@ class FFSubtitle extends FFNode { if (captions.length > 0) { forEach(captions, paragraph => { - const time = paragraph.duration / 1000; - const frames = start + time * fps; + const start = paragraph.start / 1000 * fps; + const frames = paragraph.end / 1000 * fps; const text = paragraph.text; console.log(text); this.textList.push({ start, frames, text, draw: false }); - start = frames; }); } else { forEach(list, text => {