Files
Esa Kataja 80b602fbbb add: SVT-AV1 lp (thread cap) config knob
Add encoding.lp (0 = auto) so a long encode can be capped to N logical
processors instead of pinning every core, as a lighter-weight alternative to
the compose cgroup limit. Threaded config -> types.Job -> -svtav1-params via a
testable svtav1Params helper. Settings-UI surfacing stays with #1.

refs #5
2026-06-21 19:37:26 +03:00

67 lines
1.6 KiB
Go

package types
type MediaType string
const (
MediaTypeDVD MediaType = "DVD"
MediaTypeBluRay MediaType = "Blu-ray"
MediaTypeWebDL MediaType = "WebDL"
MediaTypeTVRip MediaType = "TVRip"
)
type Job struct {
InputPath string
OutputPath string
MediaType MediaType
Metadata *Metadata
CRF int
Preset int
LP int // SVT-AV1 logical processors; 0 = auto
DeleteOrigin bool
}
type Metadata struct {
Title string
Collection string
Season string
Episode string
DateReleased string
IMDBID string
TVMazeID string
OriginalMedia MediaType
IsSeries bool
}
type Config struct {
OMDBAPIKey string `yaml:"omdb_api_key"`
LogRetentionDays int `yaml:"log_retention_days"`
// HTTPAddr is the status server listen address. Absent (nil) defaults to
// ":8080"; an explicit empty string disables the server.
HTTPAddr *string `yaml:"http_addr"`
Encoding EncodingConfig
Paths PathsConfig
}
type EncodingConfig struct {
DVD EncodingParams `yaml:"dvd"`
Bluray EncodingParams `yaml:"bluray"`
WebDL EncodingParams `yaml:"webdl"`
TVRip EncodingParams `yaml:"tvrip"`
// LP caps SVT-AV1's logical-processor (thread) count so a long encode can't
// pin every core. 0 = let SVT-AV1 auto-detect (default). Applies to all profiles.
LP int `yaml:"lp"`
}
type EncodingParams struct {
CRF int `yaml:"crf"`
Preset int `yaml:"preset"`
}
type PathsConfig struct {
Input string `yaml:"input"`
Output string `yaml:"output"`
Originals string `yaml:"originals"`
Failed string `yaml:"failed"`
Work string `yaml:"work"`
}