Disable ENCODER_COPY

monorepo
Varun Patil 2023-04-17 00:36:36 -07:00
parent 23be0f6d17
commit df7122fe07
2 changed files with 10 additions and 15 deletions

View File

@ -13,7 +13,7 @@ import (
) )
const ( const (
VERSION = "0.1.0" VERSION = "0.1.1"
) )
type Handler struct { type Handler struct {

View File

@ -364,20 +364,15 @@ func (s *Stream) transcodeArgs(startAt float64) []string {
// encoder selection // encoder selection
CV := ENCODER_X264 CV := ENCODER_X264
if s.m.probe.CodecName == CODEC_H264 && s.quality == QUALITY_MAX { // Check whether hwaccel should be used
// Use original stream if s.c.VAAPI {
CV = ENCODER_COPY CV = ENCODER_VAAPI
} else { extra := "-hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi"
// Check whether hwaccel should be used args = append(args, strings.Split(extra, " ")...)
if s.c.VAAPI { } else if s.c.NVENC {
CV = ENCODER_VAAPI CV = ENCODER_NVENC
extra := "-hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi" extra := "-hwaccel cuda"
args = append(args, strings.Split(extra, " ")...) args = append(args, strings.Split(extra, " ")...)
} else if s.c.NVENC {
CV = ENCODER_NVENC
extra := "-hwaccel cuda"
args = append(args, strings.Split(extra, " ")...)
}
} }
// Input specs // Input specs