From 1901c908ffeb6482deb503a2788c2319ee96765e Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Tue, 23 Jan 2024 14:14:53 +0100 Subject: [PATCH] Fix minutes display of thumbnails.vtt --- transcoder/src/thumbnails.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transcoder/src/thumbnails.go b/transcoder/src/thumbnails.go index 540b5cb1..49f119b5 100644 --- a/transcoder/src/thumbnails.go +++ b/transcoder/src/thumbnails.go @@ -15,6 +15,7 @@ import ( // We want to have a thumbnail every ${interval} seconds. var default_interval = 10 + // The maximim number of thumbnails per video. // Setting this too high allows really long processing times. var max_numcaps = 150 @@ -139,5 +140,5 @@ func extractThumbnail(path string, name string) (string, error) { } func tsToVttTime(ts int) string { - return fmt.Sprintf("%02d:%02d:%02d.000", ts/3600, ts/60, ts%60) + return fmt.Sprintf("%02d:%02d:%02d.000", ts/3600, (ts/60)%60, ts%60) }