add: WebDL / TVRip media types and filename-token override
Source kind is now declared per-file via a `dvd` / `bluray` / `webdl` / `tvrip` token in the basename (case-insensitive, word-bounded). Matches the existing `tt…` / `tvm…` filename convention. When no token is present, falls back to the pixel-count guess in DetectMediaType, which still only chooses between DVD and Blu-ray. The parsed media type drives both ORIGINAL_MEDIA_TYPE in the muxed metadata and the CRF/preset profile used for encoding. EncodingConfig gains `webdl` and `tvrip` sub-blocks with conservative defaults (WebDL 30/3, TVRip 32/2); user can override in config.yaml. Manual updated with the new tokens, config fields, and pipeline description.
This commit is contained in:
+17
-6
@@ -95,14 +95,25 @@ func processFile(inputPath string, cfg *types.Config, enc *encoder.Encoder, meta
|
||||
log.ErrorFile(inputPath, "Getting stream languages", err.Error())
|
||||
}
|
||||
|
||||
mediaType := watcher.DetectMediaType(width, height)
|
||||
crf := cfg.Encoding.DVD.CRF
|
||||
preset := cfg.Encoding.DVD.Preset
|
||||
if mediaType == types.MediaTypeBluRay {
|
||||
crf = cfg.Encoding.Bluray.CRF
|
||||
preset = cfg.Encoding.Bluray.Preset
|
||||
mediaType := metadata.ParseMediaType(filename)
|
||||
if mediaType == "" {
|
||||
mediaType = watcher.DetectMediaType(width, height)
|
||||
}
|
||||
|
||||
var profile types.EncodingParams
|
||||
switch mediaType {
|
||||
case types.MediaTypeBluRay:
|
||||
profile = cfg.Encoding.Bluray
|
||||
case types.MediaTypeWebDL:
|
||||
profile = cfg.Encoding.WebDL
|
||||
case types.MediaTypeTVRip:
|
||||
profile = cfg.Encoding.TVRip
|
||||
default:
|
||||
profile = cfg.Encoding.DVD
|
||||
}
|
||||
crf := profile.CRF
|
||||
preset := profile.Preset
|
||||
|
||||
var meta *types.Metadata
|
||||
if isSeries && tvmazeID != "" && season != "" && episode != "" {
|
||||
meta, err = metaClient.FetchSeriesMetadata(tvmazeID, season, episode)
|
||||
|
||||
Reference in New Issue
Block a user