Skip to content

Commit

Permalink
Output correct SRT format using miliseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
bertyhell authored Nov 11, 2021
1 parent 2871606 commit 378ba12
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions nodejs/demo/test_srt.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand All @@ -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)
}
});
Expand All @@ -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
}
});
Expand Down

0 comments on commit 378ba12

Please sign in to comment.