removed crossLists warning

This commit is contained in:
Ingolf Wagner 2021-09-11 19:31:36 +02:00
commit ad155dd5c0
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
2 changed files with 44 additions and 34 deletions
modules/programs

View file

@ -77,30 +77,6 @@ let
-hide_banner
'';
ffmpegDescriptive = profile: preset:
ffmpegTemplate "${profile}-${preset}-720p" { inherit profile preset; };
ffmpegDescriptive1080p = profile: preset:
ffmpegTemplate "${profile}-${preset}-1080p" {
inherit profile preset;
height = 1080;
width = 1920;
resolution = "1080p";
};
ffmpegDescriptiveTune = profile: preset: tune:
ffmpegTemplate "${profile}-${preset}-${tune}-720p" {
inherit profile preset tune;
};
ffmpegDescriptiveTune1080p = profile: preset: tune:
ffmpegTemplate "${profile}-${preset}-${tune}-720p" {
inherit profile preset tune;
height = 1080;
width = 1920;
resolution = "1080p";
};
# https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Profiles
profiles = [
"baseline"
@ -123,12 +99,46 @@ let
];
tunes = [ "film" "animation" "grain" "stillimage" "fastdecode" ];
ffmpegs = (lib.crossLists ffmpegDescriptive [ profiles presets ])
++ (lib.crossLists ffmpegDescriptive1080p [ profiles presets ]);
ffmpegs = let
ffmpegsTune =
(lib.crossLists ffmpegDescriptiveTune [ profiles presets tunes ])
++ (lib.crossLists ffmpegDescriptiveTune1080p [ profiles presets tunes ]);
configurations = lib.cartesianProductOfSets {
profile = profiles;
preset = presets;
};
p720 = { profile, preset }:
ffmpegTemplate "${profile}-${preset}-720p" { inherit profile preset; };
p1080 = { profile, preset }:
ffmpegTemplate "${profile}-${preset}-1080p" {
inherit profile preset;
height = 1080;
width = 1920;
resolution = "1080p";
};
in (map p720 configurations) ++ (map p1080 configurations);
ffmpegsTune = let
configurations = lib.cartesianProductOfSets {
profile = profiles;
preset = presets;
tune = tunes;
};
p720 = { profile, preset, tune }:
ffmpegTemplate "${profile}-${preset}-${tune}-720p" {
inherit profile preset tune;
};
p1080 = { profile, preset, tune }:
ffmpegTemplate "${profile}-${preset}-${tune}-1080p" {
inherit profile preset tune;
height = 1080;
width = 1920;
resolution = "1080p";
};
in (map p720 configurations) ++ (map p1080 configurations);
in {