From afdda3038b3bde7c5efd16cb432aa93b9dabda84 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Mon, 21 Nov 2022 16:22:02 -0800 Subject: [PATCH] Fix 10bit decoding --- stream.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stream.go b/stream.go index 87fbeb83..7c78f379 100644 --- a/stream.go +++ b/stream.go @@ -305,11 +305,11 @@ func (s *Stream) transcode(startId int) { // Scaling for output var scale string if CV == "h264_vaapi" { - scale = fmt.Sprintf("scale_vaapi=w=%d:h=%d:force_original_aspect_ratio=decrease", s.width, s.height) + scale = fmt.Sprintf("format=nv12|vaapi,hwupload,scale_vaapi=w=%d:h=%d:force_original_aspect_ratio=decrease", s.width, s.height) } else if s.width >= s.height { - scale = fmt.Sprintf("scale=-2:%d", s.height) + scale = fmt.Sprintf("format=nv12,scale=-2:%d", s.height) } else { - scale = fmt.Sprintf("scale=%d:-2", s.width) + scale = fmt.Sprintf("format=nv12,scale=%d:-2", s.width) } // do not scale or set bitrate for full quality