From a5d83a970ab9c6a27d891779e64b3b5e594f2bd6 Mon Sep 17 00:00:00 2001 From: Jason Dove <1695733+jasongdove@users.noreply.github.com> Date: Wed, 6 Mar 2024 12:42:48 -0600 Subject: [PATCH] use mkv container for 8-bit segmenter v2 content (#1637) --- ErsatzTV.FFmpeg/Pipeline/PipelineBuilderBase.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ErsatzTV.FFmpeg/Pipeline/PipelineBuilderBase.cs b/ErsatzTV.FFmpeg/Pipeline/PipelineBuilderBase.cs index 7474a7b77..cb07032fd 100644 --- a/ErsatzTV.FFmpeg/Pipeline/PipelineBuilderBase.cs +++ b/ErsatzTV.FFmpeg/Pipeline/PipelineBuilderBase.cs @@ -293,7 +293,17 @@ public abstract class PipelineBuilderBase : IPipelineBuilder pipelineSteps.Add(new PipeProtocol()); break; case OutputFormatKind.Nut: - pipelineSteps.Add(new OutputFormatNut()); + // mkv doesn't want to store rawvideo with yuv420p10le, so we have to use NUT + if (desiredState.BitDepth > 8) + { + pipelineSteps.Add(new OutputFormatNut()); + } + else + { + // yuv420p seems to work better with mkv (NUT results in duplicate PTS) + pipelineSteps.Add(new OutputFormatMkv()); + } + pipelineSteps.Add(new PipeProtocol()); break; case OutputFormatKind.Mp4: