Simple hardware encoding (#3419)

* HW Accel
* CUDA Docker build and adjust the NVENC encoder
* Removed NVENC preset

Using legacy presets is removed in SDK 12 and deprecated since SDK 10.
This commit removed the preset to allow ffmpeg to select the default one.

---------

Co-authored-by: Nodude <>
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
NodudeWasTaken
2023-03-10 01:25:55 +01:00
committed by GitHub
parent d4fb6b2acf
commit 0c1b02380e
24 changed files with 537 additions and 112 deletions

View File

@@ -110,7 +110,7 @@ type Manager struct {
Paths *paths.Paths
FFMPEG ffmpeg.FFMpeg
FFMPEG *ffmpeg.FFMpeg
FFProbe ffmpeg.FFProbe
StreamManager *ffmpeg.StreamManager
@@ -431,8 +431,10 @@ func initFFMPEG(ctx context.Context) error {
}
}
instance.FFMPEG = ffmpeg.FFMpeg(ffmpegPath)
instance.FFMPEG = ffmpeg.NewEncoder(ffmpegPath)
instance.FFProbe = ffmpeg.FFProbe(ffprobePath)
instance.FFMPEG.InitHWSupport(ctx)
instance.RefreshStreamManager()
}
@@ -681,7 +683,7 @@ func (s *Manager) Setup(ctx context.Context, input SetupInput) error {
}
func (s *Manager) validateFFMPEG() error {
if s.FFMPEG == "" || s.FFProbe == "" {
if s.FFMPEG == nil || s.FFProbe == "" {
return errors.New("missing ffmpeg and/or ffprobe")
}