From 378ba122c89f48d90b5a830835fcd54a39dc734f Mon Sep 17 00:00:00 2001 From: Bert Verhelst Date: Thu, 11 Nov 2021 10:49:50 +0100 Subject: [PATCH] Output correct SRT format using miliseconds --- nodejs/demo/test_srt.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nodejs/demo/test_srt.js b/nodejs/demo/test_srt.js index 9c297623..8a5b9528 100644 --- a/nodejs/demo/test_srt.js +++ b/nodejs/demo/test_srt.js @@ -46,8 +46,8 @@ ffmpeg_run.on('exit', code => { subs.push({ type: 'cue', data: { - start: words[0].start, - end: words[0].end, + start: words[0].start * 1000, + end: words[0].end * 1000, text: words[0].word } }); @@ -61,8 +61,8 @@ ffmpeg_run.on('exit', code => { subs.push({ type: 'cue', data: { - start: words[start_index].start, - end: words[i].end, + start: words[start_index].start * 1000, + end: words[i].end * 1000, text: text.slice(0, text.length-1) } }); @@ -74,8 +74,8 @@ ffmpeg_run.on('exit', code => { subs.push({ type: 'cue', data: { - start: words[start_index].start, - end: words[words.length-1].end, + start: words[start_index].start * 1000, + end: words[words.length-1].end * 1000, text: text } });