Full hardware transcoding (#4765)

This commit is contained in:
NodudeWasTaken
2024-05-10 07:55:31 +02:00
committed by GitHub
parent 29859fa4ad
commit c5fef3977e
4 changed files with 194 additions and 51 deletions

View File

@@ -186,7 +186,8 @@ func (o TranscodeOptions) makeStreamArgs(sm *StreamManager) Args {
codec := o.FileGetCodec(sm, maxTranscodeSize)
args = sm.encoder.hwDeviceInit(args, codec)
fullhw := sm.config.GetTranscodeHardwareAcceleration() && sm.encoder.hwCanFullHWTranscode(sm.context, o.VideoFile, codec)
args = sm.encoder.hwDeviceInit(args, codec, fullhw)
args = append(args, extraInputArgs...)
if o.StartTime != 0 {
@@ -197,7 +198,7 @@ func (o TranscodeOptions) makeStreamArgs(sm *StreamManager) Args {
videoOnly := ProbeAudioCodec(o.VideoFile.AudioCodec) == MissingUnsupported
videoFilter := sm.encoder.hwMaxResFilter(codec, o.VideoFile.Width, o.VideoFile.Height, maxTranscodeSize)
videoFilter := sm.encoder.hwMaxResFilter(codec, o.VideoFile.Width, o.VideoFile.Height, maxTranscodeSize, fullhw)
args = append(args, o.StreamType.Args(codec, videoFilter, videoOnly)...)