mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
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:
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user