From 5350991c80578dba99e073d54611acf6fbad43b4 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Thu, 22 Aug 2024 00:03:19 +0200 Subject: [PATCH] Use genpts --- transcoder/src/keyframes.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transcoder/src/keyframes.go b/transcoder/src/keyframes.go index 6e16d6a6f8..0f8594828b 100644 --- a/transcoder/src/keyframes.go +++ b/transcoder/src/keyframes.go @@ -157,6 +157,8 @@ func getVideoKeyframes(path string, video_idx uint32, kf *Keyframe) error { "-loglevel", "error", "-select_streams", fmt.Sprintf("V:%d", video_idx), "-show_entries", "packet=pts_time,flags", + // some avi files don't have pts, we use this to ask ffmpeg to generate them (it uses the dts under the hood) + "-fflags", "+genpts", "-of", "csv=print_section=0", path, )