From 82f4d67fb98a27bce41210e3afaa94f203735ea7 Mon Sep 17 00:00:00 2001 From: Kris Sum Date: Wed, 24 May 2023 15:28:50 +0100 Subject: [PATCH] Add timecode generation to video-only remux operations (#32) --- ffmpegutil/ffmpeg.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ffmpegutil/ffmpeg.go b/ffmpegutil/ffmpeg.go index 73eef44..4fcefb1 100644 --- a/ffmpegutil/ffmpeg.go +++ b/ffmpegutil/ffmpeg.go @@ -21,7 +21,14 @@ func MuxVideoOnly(partition *ubv.UbvPartition, h264File string, mp4File string) videoTrack.Rate = 1 } - cmd := exec.Command(getFfmpegCommand(), "-i", h264File, "-c", "copy", "-r", strconv.Itoa(videoTrack.Rate), "-y", "-loglevel", "warning", mp4File) + cmd := exec.Command(getFfmpegCommand(), + "-i", h264File, + "-c", "copy", + "-r", strconv.Itoa(videoTrack.Rate), + "-timecode", ubv.GenerateTimecode(videoTrack.StartTimecode, videoTrack.Rate), + "-y", + "-loglevel", "warning", + mp4File) runFFmpeg(cmd) }