fix: skip reconnect options when using curl pipe input

Reconnect options (-reconnect, -reconnect_streamed, etc.) only apply to
network inputs and cause 'Option reconnect not found' errors when the
input is pipe:0. Curl already handles connection resilience.
This commit is contained in:
2026-07-09 12:30:11 +08:00
parent ad86c080e3
commit 12ba62e2a0
@@ -660,7 +660,8 @@ public sealed partial class FfmpegService
var useIntermediateTransportStream = ShouldUseIntermediateTransportStream(outputFilePath, outputFormat, saveMode);
var effectiveStreamUrl = streamUrl;
if (IsHttpInput(streamUrl))
var isPipeInput = IsHttpInput(streamUrl);
if (isPipeInput)
{
// When the input is HTTP, use pipe:0 so that curl handles the HTTP connection.
// This avoids FFmpeg's built-in HTTP handler which has a hard-coded 4096-byte
@@ -671,6 +672,7 @@ public sealed partial class FfmpegService
if (enableReconnect &&
inputOptionProfile == FfmpegInputOptionProfile.Baseline &&
!isPipeInput &&
ShouldEnableReconnect(streamUrl, selectedProtocol))
{
arguments.AddRange(