Skip to content

Commit

Permalink
Merge pull request alphacep#759 from bertyhell/patch-1
Browse files Browse the repository at this point in the history
Output correct SRT format using milliseconds (NodeJS SRT example)
  • Loading branch information
nshmyrev authored Nov 11, 2021
2 parents 2871606 + 378ba12 commit a4721de
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 a4721de

Please sign in to comment.