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