Allow alpha with ProRes 4444(xq), fix forced yuv420p with ProRes

This commit is contained in:
n00mkrad
2021-08-30 10:36:07 +02:00
parent c5b3f9a5b6
commit e61258ce32
2 changed files with 6 additions and 3 deletions

View File

@@ -185,9 +185,12 @@ namespace Flowframes
try
{
bool alphaModel = model.supportsAlpha;
bool outputSupportsAlpha = (outMode == Interpolate.OutMode.ImgPng || outMode == Interpolate.OutMode.VidGif);
bool png = outMode == Interpolate.OutMode.ImgPng;
bool gif = outMode == Interpolate.OutMode.VidGif;
bool proResAlpha = outMode == Interpolate.OutMode.VidProRes && Config.GetInt(Config.Key.proResProfile) > 3;
bool outputSupportsAlpha = png || gif || proResAlpha;
string ext = inputIsFrames ? Path.GetExtension(IoUtils.GetFilesSorted(inPath).First()).ToLower() : Path.GetExtension(inPath).ToLower();
alpha = (alphaModel && outputSupportsAlpha && (ext == ".gif" || ext == ".png" || ext == ".apng"));
alpha = (alphaModel && outputSupportsAlpha && (ext == ".gif" || ext == ".png" || ext == ".apng" || ext == ".mov"));
Logger.Log($"RefreshAlpha: model.supportsAlpha = {alphaModel} - outputSupportsAlpha = {outputSupportsAlpha} - " +
$"input ext: {ext} => alpha = {alpha}", true);
}

View File

@@ -95,7 +95,7 @@ namespace Flowframes.Media
if(codec == Codec.ProRes)
{
args += $"-profile:v {Config.GetInt(Config.Key.proResProfile)} -pix_fmt {GetPixFmt()}";
args += $"-profile:v {Config.GetInt(Config.Key.proResProfile)}";
}
if (codec == Codec.AviRaw)