fixing pixel format issue

This commit is contained in:
John Andrews
2024-01-28 21:06:50 +13:00
parent 558e90c108
commit b26c686288
2 changed files with 7 additions and 5 deletions

View File

@@ -189,9 +189,9 @@ public class FfmpegBuilderExecutor: FfmpegBuilderNode
// else
{
args.Logger?.ILog("Auto-detecting hardware decoder to use");
var video = this.Model.VideoStreams.FirstOrDefault(x => x.Stream.IsImage == false);
args.Logger?.ILog("Pixel Format: " + (video?.Stream?.PixelFormat?.EmptyAsNull() ?? "Unknown"));
startArgs.AddRange(GetHardwareDecodingArgs(args, localFile, FFMPEG, video?.Stream?.Codec, video?.Stream?.PixelFormat));
}
}
@@ -384,7 +384,7 @@ public class FfmpegBuilderExecutor: FfmpegBuilderNode
noNvidia ? null : new [] { "-hwaccel", "cuda", "-hwaccel_output_format", "cuda" }, // this fails with Impossible to convert between the formats supported by the filter 'Parsed_crop_0' and the filter 'auto_scale_0'
noNvidia ? null : new [] { "-hwaccel", "cuda" },
noNvidia ? null : new [] { "-hwaccel", "qsv", "-hwaccel_output_format", "#FORMAT#" },
noQsv ? null : new [] { "-hwaccel", "qsv", "-hwaccel_output_format", "p010le" },
//noQsv ? null : new [] { "-hwaccel", "qsv", "-hwaccel_output_format", "p010le" },
noQsv ? null : new [] { "-hwaccel", "qsv", "-hwaccel_output_format", "qsv" },
noQsv ? null : new [] { "-hwaccel", "qsv" },
noVaapi ? null : new [] { "-hwaccel", "vaapi", "-hwaccel_output_format", "vaapi" },
@@ -425,7 +425,7 @@ public class FfmpegBuilderExecutor: FfmpegBuilderNode
noNvidia ? null : new [] { "-hwaccel", "cuda", "-hwaccel_output_format", "cuda" }, // this fails with Impossible to convert between the formats supported by the filter 'Parsed_crop_0' and the filter 'auto_scale_0'
noNvidia ? null : new [] { "-hwaccel", "cuda" },
noNvidia ? null : new [] { "-hwaccel", "qsv", "-hwaccel_output_format", "#FORMAT#" },
noQsv ? null : new [] { "-hwaccel", "qsv", "-hwaccel_output_format", "p010le" },
//noQsv ? null : new [] { "-hwaccel", "qsv", "-hwaccel_output_format", "p010le" },
noQsv ? null : new [] { "-hwaccel", "qsv", "-hwaccel_output_format", "qsv" },
noQsv ? null : new [] { "-hwaccel", "qsv" },
noVaapi ? null : new [] { "-hwaccel", "vaapi", "-hwaccel_output_format", "vaapi" },
@@ -466,7 +466,7 @@ public class FfmpegBuilderExecutor: FfmpegBuilderNode
noNvidia ? null : new [] { "-hwaccel", "cuda", "-hwaccel_output_format", "cuda" }, // this fails with Impossible to convert between the formats supported by the filter 'Parsed_crop_0' and the filter 'auto_scale_0'
noNvidia ? null : new [] { "-hwaccel", "cuda" },
noNvidia ? null : new [] { "-hwaccel", "qsv", "-hwaccel_output_format", "#FORMAT#" },
noQsv ? null : new [] { "-hwaccel", "qsv", "-hwaccel_output_format", "p010le" },
//noQsv ? null : new [] { "-hwaccel", "qsv", "-hwaccel_output_format", "p010le" },
noQsv ? null : new [] { "-hwaccel", "qsv", "-hwaccel_output_format", "qsv" },
noQsv ? null : new [] { "-hwaccel", "qsv" },
noVaapi ? null : new [] { "-hwaccel", "vaapi", "-hwaccel_output_format", "vaapi" },

View File

@@ -121,6 +121,8 @@ namespace FileFlows.VideoNodes
string prefix = "Video" + (i == 0 ? "" : " " + (i + 1)) + " ";
metadata.Add(prefix + "Codec", stream.Codec);
metadata.Add(prefix + "Resolution", stream.Width + "x" + stream.Height + (stream.HDR ? " (HDR)" : string.Empty));
if(string.IsNullOrWhiteSpace(stream.PixelFormat) == false)
metadata.Add(prefix + "PixelFormat", stream.PixelFormat);
if(stream.FramesPerSecond > 0)
metadata.Add(prefix + "FramesPerSecond", stream.FramesPerSecond);
if(stream.Bitrate > 0)