From e5db4f2150691fb2260069d95fc0c7380cabb905 Mon Sep 17 00:00:00 2001 From: Ben Hood Date: Fri, 9 Apr 2021 22:48:13 -0500 Subject: [PATCH] Add -pix_fmt yuv420p --- encoder.go | 1 + 1 file changed, 1 insertion(+) diff --git a/encoder.go b/encoder.go index 856728b..c1f14d5 100644 --- a/encoder.go +++ b/encoder.go @@ -130,6 +130,7 @@ func (enc *X264ImageCustomEncoder) Init(videoFileName string) { "-preset", "veryfast", "-g", "250", "-crf", strconv.Itoa(enc.ConstantRateFactor), + "-pix_fmt", "yuv420p", videoFileName, ) cmd.Stdout = os.Stdout