From 51b32cb5dfaecece26c16aa70b2d31c1f577f6bd Mon Sep 17 00:00:00 2001
From: Codex
Date: Tue, 10 Nov 2026 10:58:08 +0100
Subject: [PATCH 1/2] Use measured media coverage for probe completion and
expose profile threshold
---
CHANGELOG.md | 9 ++
.../automation/automation_config_manager.py | 4 +
backend/apps/core/probe_completion.py | 87 ++++++++++++
backend/apps/core/stream_stats_utils.py | 27 ++--
.../apps/stream/checker/bitrate_progress.py | 3 +
backend/apps/stream/checker/classification.py | 9 ++
.../apps/stream/checker/concurrent_channel.py | 3 +
.../apps/stream/checker/sequential_channel.py | 9 ++
backend/apps/stream/stream_check_utils.py | 27 +++-
backend/apps/stream/stream_stats_writer.py | 14 ++
backend/tests/test_probe_completion.py | 128 ++++++++++++++++++
docs/probe-completion.md | 33 +++++
frontend/src/lib/operator-help-content.js | 9 ++
.../src/pages/AutomationProfileEditor.jsx | 17 +++
14 files changed, 367 insertions(+), 12 deletions(-)
create mode 100644 backend/apps/core/probe_completion.py
create mode 100644 backend/tests/test_probe_completion.py
create mode 100644 docs/probe-completion.md
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ae04c325..b62d4724 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
+- Probe completion uses reliable processed media time as well as wall-clock
+ runtime, with successful FFmpeg exit and usable measurements required for
+ accelerated probes. Profiles expose **Minimum Probe Completion (%)** under
+ **Settings -> Profiles -> Edit profile -> Stream Checking**, defaulting to
+ 80%. Setting 0 disables only the duration rule; probe errors and enabled
+ blank/freeze checks still apply. Suggested by
+ [@teffi71](https://github.com/teffi71) in
+ [#544](https://github.com/krinkuto11/streamflow/issues/544).
+
- Single-channel changelog entries show the channel name in the card heading
and open their full stream measurements in one click. This also applies to
historical and manual checks; Teamarr Preflight keeps its reuse summary and
diff --git a/backend/apps/automation/automation_config_manager.py b/backend/apps/automation/automation_config_manager.py
index ffd93f9e..334870be 100644
--- a/backend/apps/automation/automation_config_manager.py
+++ b/backend/apps/automation/automation_config_manager.py
@@ -298,8 +298,12 @@ def _normalize_profile_settings(self, extra_settings: Any) -> Dict[str, Any]:
extra = dict(self._normalize_extra_settings(extra_settings))
checking = extra.get('stream_checking')
if isinstance(checking, dict):
+ from apps.core.probe_completion import normalize_minimum_probe_completion_percent
extra['stream_checking'] = {
**checking,
+ 'minimum_probe_completion_percent': normalize_minimum_probe_completion_percent(
+ checking.get('minimum_probe_completion_percent', 80),
+ ),
'provider_stream_limit': self._coerce_non_negative_int(
checking.get('provider_stream_limit', 0),
),
diff --git a/backend/apps/core/probe_completion.py b/backend/apps/core/probe_completion.py
new file mode 100644
index 00000000..89671f74
--- /dev/null
+++ b/backend/apps/core/probe_completion.py
@@ -0,0 +1,87 @@
+"""Shared duration policy for probe retries and final stream classification."""
+
+import math
+
+DEFAULT_MINIMUM_PROBE_COMPLETION_PERCENT = 80
+
+
+def _finite(value):
+ if isinstance(value, bool):
+ return None
+ try:
+ number = float(value)
+ except (TypeError, ValueError, OverflowError):
+ return None
+ return number if math.isfinite(number) else None
+
+
+def normalize_minimum_probe_completion_percent(value):
+ number = _finite(value)
+ if number is None or not 0 <= number <= 100:
+ return DEFAULT_MINIMUM_PROBE_COMPLETION_PERCENT
+ return number
+
+
+def media_window_seconds(progress_times, requested_seconds):
+ """Accept bounded, continuous output progress, not an isolated timestamp.
+
+ Large initial offsets, jumps, backwards time and implausible overruns cannot
+ prove media coverage. Such inputs retain the wall-clock duration fallback.
+ """
+ expected = _finite(requested_seconds)
+ times = [_finite(value) for value in progress_times]
+ if expected is None or expected <= 0 or len(times) < 2 or None in times:
+ return None
+ if times[0] < 0 or times[0] > min(5, expected * 0.2):
+ return None
+ if times[-1] > expected + max(2, expected * 0.1):
+ return None
+ for previous, current in zip(times, times[1:]):
+ if current < previous or current - previous > max(5, expected * 0.25):
+ return None
+ span = times[-1] - times[0]
+ return span if span > 0 else None
+
+
+def probe_exit_failed(data):
+ code = data.get('ffmpeg_exit_code')
+ return data.get('ffmpeg_error_detected') is True or (
+ code is not None and _finite(code) != 0
+ )
+
+
+def probe_window_completion(data, minimum_percent=None):
+ """Return (complete, basis); missing legacy timing keeps its old behavior."""
+ if probe_exit_failed(data):
+ return False, 'ffmpeg_error'
+ if minimum_percent is None:
+ minimum_percent = data.get('minimum_probe_completion_percent', 80)
+ percent = normalize_minimum_probe_completion_percent(minimum_percent)
+ if percent == 0:
+ return True, 'duration_check_disabled'
+
+ expected_raw = data.get('ffmpeg_duration', data.get('ffmpeg_duration_seconds'))
+ elapsed_raw = data.get('elapsed_time')
+ if expected_raw is None or elapsed_raw is None:
+ return True, 'legacy_without_timing'
+ expected, elapsed = _finite(expected_raw), _finite(elapsed_raw)
+ if expected is None or elapsed is None or elapsed < 0:
+ return False, 'invalid_timing'
+ if expected <= 0:
+ return True, 'legacy_without_timing'
+ required = expected * percent / 100
+ if elapsed >= required:
+ return True, 'wall_clock'
+
+ media = _finite(data.get('probe_media_seconds'))
+ # Media-time acceptance requires an explicitly successful FFmpeg process
+ # plus usable measurements; metadata from failed/partial probes cannot win.
+ width, _, height = str(data.get('resolution') or '').partition('x')
+ metrics = [_finite(value) for value in (
+ width, height, data.get('fps'), data.get('bitrate_kbps'),
+ )]
+ if (data.get('ffmpeg_exit_code') == 0 and media is not None
+ and required <= media <= expected + max(2, expected * 0.1)
+ and all(value is not None and value > 0 for value in metrics)):
+ return True, 'media_time'
+ return False, 'incomplete_window'
diff --git a/backend/apps/core/stream_stats_utils.py b/backend/apps/core/stream_stats_utils.py
index fb22da0e..af5b0269 100644
--- a/backend/apps/core/stream_stats_utils.py
+++ b/backend/apps/core/stream_stats_utils.py
@@ -547,20 +547,27 @@ def is_stream_dead(stream_data: Dict[str, Any], config: Dict[str, Any] = None) -
_analysis_failure_context(stream_data),
)
- EARLY_EXIT_THRESHOLD = 0.8
- elapsed = stream_data.get('elapsed_time')
- expected = stream_data.get('ffmpeg_duration')
- if (
- elapsed is not None
- and expected is not None
- and expected > 0
- and elapsed < expected * EARLY_EXIT_THRESHOLD
- ):
+ from apps.core.probe_completion import probe_exit_failed, probe_window_completion
+ if probe_exit_failed(stream_data):
+ return DeadStreamResult(True, 'offline', 'error', _analysis_failure_context(stream_data))
+ completed, basis = probe_window_completion(
+ stream_data, (config or {}).get('minimum_probe_completion_percent'),
+ )
+ if not completed:
return DeadStreamResult(
True,
'unstable',
'probe_exited_early',
- {'actual_seconds': elapsed, 'expected_seconds': expected},
+ {
+ 'actual_seconds': stream_data.get('elapsed_time'),
+ 'expected_seconds': stream_data.get('ffmpeg_duration'),
+ 'media_seconds': stream_data.get('probe_media_seconds'),
+ 'minimum_completion_percent': (config or {}).get(
+ 'minimum_probe_completion_percent',
+ stream_data.get('minimum_probe_completion_percent', 80),
+ ),
+ 'completion_basis': basis,
+ },
)
stream_stats = stream_data.get('stream_stats')
diff --git a/backend/apps/stream/checker/bitrate_progress.py b/backend/apps/stream/checker/bitrate_progress.py
index fc46ce7b..6e1654bc 100644
--- a/backend/apps/stream/checker/bitrate_progress.py
+++ b/backend/apps/stream/checker/bitrate_progress.py
@@ -55,6 +55,9 @@ def recheck_bitrate_stream(stream, _initial):
capacity_transition_lock=stream_statuses_lock,
probe_slots=getattr(self, '_preflight_probe_slots', None),
ffmpeg_duration=analysis_params.get('ffmpeg_duration', 30),
+ minimum_probe_completion_percent=_threshold_config.get(
+ 'minimum_probe_completion_percent', 80,
+ ),
timeout=analysis_params.get('timeout', 30),
retries=0,
retry_delay=0,
diff --git a/backend/apps/stream/checker/classification.py b/backend/apps/stream/checker/classification.py
index d3eb7eb5..fb264a8b 100644
--- a/backend/apps/stream/checker/classification.py
+++ b/backend/apps/stream/checker/classification.py
@@ -27,6 +27,10 @@ def _build_threshold_config_from_profile(self, stream_checking: Dict[str, Any])
second argument. Only non-zero thresholds are included.
"""
config: Dict[str, Any] = {}
+ from apps.core.probe_completion import normalize_minimum_probe_completion_percent
+ config['minimum_probe_completion_percent'] = normalize_minimum_probe_completion_percent(
+ stream_checking.get('minimum_probe_completion_percent', 80),
+ )
min_res = stream_checking.get('min_resolution', 'any')
if min_res in ('2160p', '4k'):
config['min_resolution_width'], config['min_resolution_height'] = 3840, 2160
@@ -101,6 +105,11 @@ def _is_stream_dead(self, stream_data: Dict[str, Any], channel_id: Optional[int]
if profile:
stream_checking = profile.get('stream_checking', {})
if stream_checking.get('enabled', False):
+ profile_config['minimum_probe_completion_percent'] = (
+ self._build_threshold_config_from_profile(stream_checking)[
+ 'minimum_probe_completion_percent'
+ ]
+ )
# Construct config from profile settings
# Convert min_res string (e.g., '1080p') to dimensions
min_res = stream_checking.get('min_resolution', '0x0')
diff --git a/backend/apps/stream/checker/concurrent_channel.py b/backend/apps/stream/checker/concurrent_channel.py
index 6c902ab1..18b1b178 100644
--- a/backend/apps/stream/checker/concurrent_channel.py
+++ b/backend/apps/stream/checker/concurrent_channel.py
@@ -730,6 +730,9 @@ def inspection_result(analyzed, ordered_ids=None, dead_ids=()):
capacity_transition_lock=stream_statuses_lock,
probe_slots=getattr(self, '_preflight_probe_slots', None),
ffmpeg_duration=analysis_params.get('ffmpeg_duration', 30),
+ minimum_probe_completion_percent=_threshold_config.get(
+ 'minimum_probe_completion_percent', 80,
+ ),
timeout=analysis_params.get('timeout', 30),
retries=analysis_params.get('retries', 1),
retry_delay=analysis_params.get('retry_delay', 10),
diff --git a/backend/apps/stream/checker/sequential_channel.py b/backend/apps/stream/checker/sequential_channel.py
index 8ca08a6e..dfea013b 100644
--- a/backend/apps/stream/checker/sequential_channel.py
+++ b/backend/apps/stream/checker/sequential_channel.py
@@ -534,6 +534,9 @@ def _check_channel_sequential(
stream_id=stream['id'],
stream_name=stream.get('name', 'Unknown'),
ffmpeg_duration=analysis_params.get('ffmpeg_duration', 20),
+ minimum_probe_completion_percent=_threshold_config.get(
+ 'minimum_probe_completion_percent', 80,
+ ),
timeout=analysis_params.get('timeout', 30),
retries=analysis_params.get('retries', 1),
retry_delay=analysis_params.get('retry_delay', 10),
@@ -570,6 +573,9 @@ def recheck_sequential_bitrate(_stream, _initial):
stream_id=stream['id'],
stream_name=stream.get('name', 'Unknown'),
ffmpeg_duration=analysis_params.get('ffmpeg_duration', 20),
+ minimum_probe_completion_percent=_threshold_config.get(
+ 'minimum_probe_completion_percent', 80,
+ ),
timeout=analysis_params.get('timeout', 30),
retries=0,
retry_delay=0,
@@ -874,6 +880,9 @@ def sequential_recheck_started(initial, recheck_index, recheck_total):
stream_id=stream['id'],
stream_name=stream.get('name', 'Unknown'),
ffmpeg_duration=analysis_params.get('ffmpeg_duration', 20),
+ minimum_probe_completion_percent=_threshold_config.get(
+ 'minimum_probe_completion_percent', 80,
+ ),
timeout=analysis_params.get('timeout', 30),
retries=analysis_params.get('retries', 1),
retry_delay=analysis_params.get('retry_delay', 10),
diff --git a/backend/apps/stream/stream_check_utils.py b/backend/apps/stream/stream_check_utils.py
index f82a206c..3c2f33ca 100644
--- a/backend/apps/stream/stream_check_utils.py
+++ b/backend/apps/stream/stream_check_utils.py
@@ -95,7 +95,12 @@
'cannot open',
'unknown hwaccel',
)
-EARLY_EXIT_THRESHOLD = 0.8 # Consider ffmpeg exited early if elapsed < 80% of expected duration
+from apps.core.probe_completion import (
+ media_window_seconds, normalize_minimum_probe_completion_percent,
+ probe_window_completion,
+)
+
+EARLY_EXIT_THRESHOLD = 0.8 # Default for diagnostic/bitrate fallback timing
MAX_ERROR_LINES_TO_LOG = 5 # Maximum number of error lines to log from ffmpeg output
MAX_DEBUG_LINES_TO_LOG = 10 # Maximum number of debug lines to log from ffmpeg output
@@ -2008,6 +2013,13 @@ def apply_visual_probe() -> None:
progress_bitrate = None
last_stats_line = None # keeps updating; final line is the most stable average
last_media_time = 0.0
+ media_progress_times = []
+ result_data['ffmpeg_exit_code'] = result.returncode
+ result_data['ffmpeg_error_detected'] = bool(re.search(
+ r'Input/output error|Connection reset by peer|Connection timed out|'
+ r'Error opening input|Error during demuxing|Server returned [45]\d\d',
+ output or '', re.IGNORECASE,
+ ))
# Track Input vs Output sections so we only parse input stream codecs,
# not decoded output formats (e.g. pcm_s16le instead of aac)
@@ -2017,6 +2029,7 @@ def apply_visual_probe() -> None:
progress_time = _parse_ffmpeg_progress_time(line)
if progress_time is not None:
last_media_time = max(last_media_time, progress_time)
+ media_progress_times.append(progress_time)
# ── Section tracking ─────────────────────────────────────────────
if 'Input #' in line:
@@ -2228,6 +2241,9 @@ def apply_visual_probe() -> None:
]
_log_ffmpeg_errors(output, logger, error_patterns)
+ result_data['probe_media_seconds'] = media_window_seconds(media_progress_times, duration)
+ if result.returncode != 0 or result_data['ffmpeg_error_detected']:
+ result_data['status'] = 'Error'
apply_visual_probe()
logger.debug(f" Analysis completed in {elapsed:.2f}s")
@@ -2829,6 +2845,7 @@ def analyze_stream(
preempt_check: Optional[Callable[[], bool]] = None,
defer_missing_bitrate_retry: bool = False,
retry_missing_bitrate: bool = True,
+ minimum_probe_completion_percent: float = 80,
) -> Dict[str, Any]:
"""
Perform complete stream analysis including codec, resolution, FPS, bitrate, and audio.
@@ -3018,6 +3035,12 @@ def analyze_stream(
'audio_bitrate': result_data['audio_bitrate'],
'status': result_data['status'],
'elapsed_time': result_data.get('elapsed_time', 0),
+ 'ffmpeg_exit_code': result_data.get('ffmpeg_exit_code'),
+ 'ffmpeg_error_detected': result_data.get('ffmpeg_error_detected', False),
+ 'probe_media_seconds': result_data.get('probe_media_seconds'),
+ 'minimum_probe_completion_percent': normalize_minimum_probe_completion_percent(
+ minimum_probe_completion_percent,
+ ),
'ffmpeg_duration': ffmpeg_duration,
'ffmpeg_duration_seconds': result_data.get('ffmpeg_duration_seconds', ffmpeg_duration),
'timeout_seconds': result_data.get(
@@ -3145,7 +3168,7 @@ def analyze_stream(
# data that is not representative of sustained delivery.
# Give it another attempt rather than accepting the result.
elapsed = result_data.get('elapsed_time', ffmpeg_duration)
- completed = elapsed >= ffmpeg_duration * EARLY_EXIT_THRESHOLD
+ completed, result['probe_completion_basis'] = probe_window_completion(result)
missing_bitrate = result.get('bitrate_kbps') is None
if completed and missing_bitrate and not retry_missing_bitrate:
logger.info(
diff --git a/backend/apps/stream/stream_stats_writer.py b/backend/apps/stream/stream_stats_writer.py
index 3b7f63e9..6bd2a9e0 100644
--- a/backend/apps/stream/stream_stats_writer.py
+++ b/backend/apps/stream/stream_stats_writer.py
@@ -43,6 +43,13 @@ def _update_stream_stats(self, stream_data: Dict) -> bool:
"ffmpeg_output_bitrate": bitrate_value,
"bitrate_source": stream_data.get("bitrate_source"),
"quality_score": stream_data.get("score"),
+ "probe_completion_basis": stream_data.get("probe_completion_basis"),
+ "probe_media_seconds": stream_data.get("probe_media_seconds"),
+ "probe_elapsed_seconds": stream_data.get("elapsed_time"),
+ "probe_expected_seconds": stream_data.get("ffmpeg_duration"),
+ "minimum_probe_completion_percent": stream_data.get("minimum_probe_completion_percent"),
+ "ffmpeg_exit_code": stream_data.get("ffmpeg_exit_code"),
+ "ffmpeg_error_detected": stream_data.get("ffmpeg_error_detected"),
"quality_reason": stream_data.get("quality_reason"),
"quality_reason_detail": stream_data.get("quality_reason_detail"),
"quality_reason_context": stream_data.get("quality_reason_context"),
@@ -165,6 +172,13 @@ def _prepare_stream_stats_for_batch(self, stream_data: Dict) -> Optional[Dict[st
"ffmpeg_output_bitrate": bitrate_value,
"bitrate_source": stream_data.get("bitrate_source"),
"quality_score": stream_data.get("score"),
+ "probe_completion_basis": stream_data.get("probe_completion_basis"),
+ "probe_media_seconds": stream_data.get("probe_media_seconds"),
+ "probe_elapsed_seconds": stream_data.get("elapsed_time"),
+ "probe_expected_seconds": stream_data.get("ffmpeg_duration"),
+ "minimum_probe_completion_percent": stream_data.get("minimum_probe_completion_percent"),
+ "ffmpeg_exit_code": stream_data.get("ffmpeg_exit_code"),
+ "ffmpeg_error_detected": stream_data.get("ffmpeg_error_detected"),
"quality_reason": stream_data.get("quality_reason"),
"quality_reason_detail": stream_data.get("quality_reason_detail"),
"quality_reason_context": stream_data.get("quality_reason_context"),
diff --git a/backend/tests/test_probe_completion.py b/backend/tests/test_probe_completion.py
new file mode 100644
index 00000000..1ee8f102
--- /dev/null
+++ b/backend/tests/test_probe_completion.py
@@ -0,0 +1,128 @@
+"""Regression coverage for accelerated probes and per-profile sample windows."""
+
+import sys
+import subprocess
+from pathlib import Path
+from unittest.mock import patch
+
+import pytest
+
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+from apps.core.probe_completion import (
+ media_window_seconds, normalize_minimum_probe_completion_percent,
+ probe_window_completion,
+)
+from apps.core.stream_stats_utils import is_stream_dead
+from apps.stream import stream_check_utils
+
+
+def measured(**changes):
+ return {
+ 'video_codec': 'hevc', 'audio_codec': 'aac', 'resolution': '3840x2160',
+ 'fps': 50, 'bitrate_kbps': 12000, 'hdr_format': 'HLG',
+ 'pixel_format': None, 'audio_sample_rate': None, 'audio_channels': None,
+ 'channel_layout': None, 'audio_bitrate': None, 'status': 'OK',
+ 'elapsed_time': 20, 'ffmpeg_duration': 30, 'ffmpeg_exit_code': 0,
+ 'probe_media_seconds': None,
+ **changes,
+ }
+
+
+def test_full_media_window_is_accepted_below_wall_clock_threshold():
+ row = measured(probe_media_seconds=media_window_seconds(range(31), 30))
+ assert probe_window_completion(row) == (True, 'media_time')
+ assert is_stream_dead(row) == (False, 'none')
+
+
+@pytest.mark.parametrize('times', [
+ [30], [20, 21, 30], [0, 1, 30], [0, 5, 4, 30],
+ [0, 5, float('nan')], [0, 5, float('inf')], [-2, 0, 5], [0, 5, 300],
+])
+def test_bad_timestamps_retain_wall_clock_fallback(times):
+ row = measured(probe_media_seconds=media_window_seconds(times, 30))
+ assert row['probe_media_seconds'] is None
+ assert is_stream_dead(row) == (True, 'unstable')
+
+
+@pytest.mark.parametrize('percent, expected_calls, dead', [(80, 2, True), (60, 1, False), (0, 1, False)])
+def test_profile_threshold_controls_retries_and_final_verdict_consistently(percent, expected_calls, dead):
+ with patch.object(stream_check_utils, 'get_stream_info_and_bitrate', return_value=measured()) as probe:
+ result = stream_check_utils.analyze_stream(
+ 'http://fixture.test/live.ts', 1, 'UHD fixture', ffmpeg_duration=30,
+ retries=1, retry_delay=0, minimum_probe_completion_percent=percent,
+ )
+ assert probe.call_count == expected_calls
+ assert is_stream_dead(result)[0] is dead
+ assert result['minimum_probe_completion_percent'] == percent
+
+
+@pytest.mark.parametrize('failure', [
+ {'ffmpeg_exit_code': 1}, {'ffmpeg_error_detected': True}, {'status': 'Error'}, {'status': 'Timeout'},
+])
+def test_relaxed_duration_never_accepts_probe_errors(failure):
+ row = measured(probe_media_seconds=30, **failure)
+ assert is_stream_dead(row, {'minimum_probe_completion_percent': 0}) == (True, 'offline')
+
+
+@pytest.mark.parametrize('flag, reason', [('blank', 'blank'), ('freeze', 'freeze')])
+def test_duration_disabled_keeps_enabled_visual_failures(flag, reason):
+ row = measured(**{flag + '_detected': True, flag + '_probe_ran': True})
+ config = {'minimum_probe_completion_percent': 0, 'treat_' + flag + '_as_dead': True}
+ assert is_stream_dead(row, config) == (True, reason)
+
+
+def test_media_time_requires_successful_exit_and_usable_measurements():
+ for change in [{'ffmpeg_exit_code': None}, {'bitrate_kbps': None}, {'fps': 0}, {'resolution': '0x0'}]:
+ assert not probe_window_completion(measured(probe_media_seconds=30, **change))[0]
+
+
+@pytest.mark.parametrize('bad', [None, True, False, 'bad', 'nan', float('inf'), -1, 101])
+def test_invalid_profile_values_use_safe_default(bad):
+ assert normalize_minimum_probe_completion_percent(bad) == 80
+
+
+def test_legacy_cached_metrics_without_timing_remain_usable():
+ row = measured()
+ del row['elapsed_time']
+ del row['ffmpeg_duration']
+ del row['ffmpeg_exit_code']
+ assert is_stream_dead(row) == (False, 'none')
+
+
+def test_profile_serialization_preserves_zero_and_normalizes_legacy_values():
+ from apps.automation.automation_config_manager import AutomationConfigManager
+ manager = object.__new__(AutomationConfigManager)
+ for configured, expected in [(0, 0), (60, 60), ('70', 70), ('invalid', 80)]:
+ result = manager._normalize_profile_settings({
+ 'stream_checking': {'minimum_probe_completion_percent': configured},
+ })
+ assert result['stream_checking']['minimum_probe_completion_percent'] == expected
+ assert manager._normalize_profile_settings({'stream_checking': {}})[
+ 'stream_checking']['minimum_probe_completion_percent'] == 80
+
+
+@pytest.mark.parametrize('exit_code, trailing_error', [(0, ''), (1, ''), (0, 'Error during demuxing: Input/output error')])
+def test_analyzer_carries_real_progress_evidence_and_rejects_ffmpeg_failures(exit_code, trailing_error):
+ output = '\n'.join([
+ 'Input #0, mpegts, from fixture:',
+ ' Stream #0:0: Video: hevc (Main 10), yuv420p10le, 3840x2160, 50 fps, 50 tbr',
+ ' Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, 128 kb/s',
+ 'Output #0, mpegts, to pipe:1:',
+ *[f'frame= {i * 50} fps=75 size=1000kB time=00:00:{i:05.2f} bitrate=12000.0kbits/s speed=1.5x'
+ for i in range(31)], trailing_error,
+ ])
+ completed = subprocess.CompletedProcess([], exit_code, stderr=output)
+ with patch.object(stream_check_utils, '_run_ffmpeg_with_optional_fallback', return_value=completed), \
+ patch.object(stream_check_utils.time, 'monotonic', side_effect=[100, 120]):
+ result = stream_check_utils.get_stream_info_and_bitrate('http://fixture.test/live.ts', duration=30)
+ assert result['probe_media_seconds'] == 30
+ assert result['resolution'] == '3840x2160'
+ assert result['fps'] == 50
+ assert result['bitrate_kbps'] == 12000
+ result['ffmpeg_duration'] = 30
+ if exit_code or trailing_error:
+ assert result['status'] == 'Error'
+ assert is_stream_dead(result, {'minimum_probe_completion_percent': 0}) == (True, 'offline')
+ else:
+ assert probe_window_completion(result) == (True, 'media_time')
+ assert is_stream_dead(result) == (False, 'none')
diff --git a/docs/probe-completion.md b/docs/probe-completion.md
new file mode 100644
index 00000000..6c904904
--- /dev/null
+++ b/docs/probe-completion.md
@@ -0,0 +1,33 @@
+# Probe completion
+
+**Where:** Settings -> Profiles tab -> Edit profile -> Stream Checking ->
+Minimum Probe Completion (%).
+
+The advanced profile setting accepts 0 to 100, with 80 as the default for new
+and existing profiles. It controls the minimum accepted portion of the requested
+FFmpeg analysis duration. For example, an 80% setting with a 30-second probe
+requires at least 24 seconds of evidence. Lower values accept shorter samples.
+Zero disables this duration criterion. FFmpeg errors, missing video, other
+quality thresholds and enabled blank/freeze checks still apply.
+
+Set the requested analysis duration separately under Stream Checker -> Stream
+Checker Configuration -> Edit -> Stream Analysis -> FFmpeg Duration (seconds).
+Changing the profile percentage changes the completion rule, not that duration.
+One-off stream checks without a channel profile retain the 80% default.
+
+A successful probe can cover enough video while finishing faster than real
+time. StreamFlow accepts processed media time only with a successful FFmpeg exit,
+usable resolution/FPS/bitrate measurements and plausible continuous progress.
+Isolated timestamps, large initial offsets, jumps, backwards time and implausible
+overruns cannot establish media coverage. They fall back to wall-clock timing.
+Probe retries and the final unstable verdict use the same completion policy.
+
+The resolved profile controls parallel/sequential channel checks and their
+bitrate rechecks, including explicitly selected profiles. Existing preflight
+reuse is invalidated when the profile policy changes. Invalid saved percentages
+fall back to 80%.
+
+Stored stream statistics include the effective percentage, wall-clock/media
+seconds, FFmpeg exit/error indicators and completion basis where available.
+These are diagnostic fields; existing cached measurements without timing keep
+their legacy handling. No credentials or raw FFmpeg output are stored in them.
diff --git a/frontend/src/lib/operator-help-content.js b/frontend/src/lib/operator-help-content.js
index 7b8c84e8..50868037 100644
--- a/frontend/src/lib/operator-help-content.js
+++ b/frontend/src/lib/operator-help-content.js
@@ -229,6 +229,15 @@ export const operatorHelpDetailTopics = [
useWhen: 'Enable for maintenance and event-preflight profiles that should score or protect streams.',
risk: 'Disabling it skips stream analysis and leaves quality state unchanged.',
},
+ {
+ name: 'Minimum Probe Completion (%)',
+ controlType: 'Visible UI setting',
+ defaultValue: '80%',
+ location: 'Settings -> Profiles tab -> Edit profile -> Stream Checking -> Minimum Probe Completion (%)',
+ effect: 'Sets the minimum portion of the requested FFmpeg duration needed for a completed probe. Successful probes with reliable output media timing and usable measurements may complete faster than wall-clock time.',
+ useWhen: 'Use the advanced per-profile control when a provider needs a different minimum sample window. One-off stream checks use the default 80%.',
+ risk: 'Lower percentages accept shorter samples. 0 disables only the duration rule; probe errors and enabled blank/freeze checks still apply.',
+ },
{
name: 'Provider Stream Cap',
controlType: 'Visible UI setting',
diff --git a/frontend/src/pages/AutomationProfileEditor.jsx b/frontend/src/pages/AutomationProfileEditor.jsx
index d9a5c07d..b9f61716 100644
--- a/frontend/src/pages/AutomationProfileEditor.jsx
+++ b/frontend/src/pages/AutomationProfileEditor.jsx
@@ -40,6 +40,7 @@ const DEFAULT_PROFILE = {
freeze_check_enabled: false,
stream_limit: 0,
provider_stream_limit: 0,
+ minimum_probe_completion_percent: 80,
min_resolution: 'any',
min_fps: 0,
min_bitrate: 0,
@@ -569,6 +570,22 @@ export default function AutomationProfileEditor() {
+
+
Minimum Probe Completion (%)
+
updateProfile('stream_checking.minimum_probe_completion_percent', Math.max(0, Math.min(100, Number(e.target.value) || 0)))}
+ />
+
+ Advanced. Default: 80%. Minimum portion of the requested FFmpeg duration required before a probe is considered complete. Successful probes with reliable media timing and valid measurements can complete faster than real time. 0 disables only this duration check; errors and enabled blank/freeze checks still apply. Lower values can accept shorter samples.
+
+
+
Minimum Quality Requirements
From d666a02ef94458f86cb606f3e5128a7520d28295 Mon Sep 17 00:00:00 2001
From: Codex
Date: Tue, 10 Nov 2026 11:09:16 +0100
Subject: [PATCH 2/2] Complete probe policy safeguards and add verified UI
reference
---
backend/apps/core/probe_completion.py | 4 +++-
backend/apps/stream/stream_check_utils.py | 9 ++++-----
backend/tests/test_probe_completion.py | 1 +
.../help/minimum-probe-completion-dark.jpg | Bin 0 -> 14045 bytes
frontend/src/lib/operator-help-content.js | 8 ++++++++
frontend/src/lib/operator-help-content.test.js | 1 +
6 files changed, 17 insertions(+), 6 deletions(-)
create mode 100644 frontend/public/help/minimum-probe-completion-dark.jpg
diff --git a/backend/apps/core/probe_completion.py b/backend/apps/core/probe_completion.py
index 89671f74..933c11d3 100644
--- a/backend/apps/core/probe_completion.py
+++ b/backend/apps/core/probe_completion.py
@@ -52,7 +52,9 @@ def probe_exit_failed(data):
def probe_window_completion(data, minimum_percent=None):
"""Return (complete, basis); missing legacy timing keeps its old behavior."""
- if probe_exit_failed(data):
+ if probe_exit_failed(data) or str(data.get('status') or '').lower() in {
+ 'error', 'failed', 'timeout', 'stream_timeout', 'probe_timeout',
+ }:
return False, 'ffmpeg_error'
if minimum_percent is None:
minimum_percent = data.get('minimum_probe_completion_percent', 80)
diff --git a/backend/apps/stream/stream_check_utils.py b/backend/apps/stream/stream_check_utils.py
index 3c2f33ca..0e0cc8f8 100644
--- a/backend/apps/stream/stream_check_utils.py
+++ b/backend/apps/stream/stream_check_utils.py
@@ -59,6 +59,10 @@
from apps.core.logging_config import setup_logging
from apps.core.log_sanitizer import audit_ref as _audit_ref, scrub_urls, stream_ref, url_ref
from apps.core.stream_protocols import effective_stream_startup_buffer, has_supported_stream_protocol
+from apps.core.probe_completion import (
+ media_window_seconds, normalize_minimum_probe_completion_percent,
+ probe_window_completion,
+)
logger = setup_logging(__name__)
@@ -95,11 +99,6 @@
'cannot open',
'unknown hwaccel',
)
-from apps.core.probe_completion import (
- media_window_seconds, normalize_minimum_probe_completion_percent,
- probe_window_completion,
-)
-
EARLY_EXIT_THRESHOLD = 0.8 # Default for diagnostic/bitrate fallback timing
MAX_ERROR_LINES_TO_LOG = 5 # Maximum number of error lines to log from ffmpeg output
MAX_DEBUG_LINES_TO_LOG = 10 # Maximum number of debug lines to log from ffmpeg output
diff --git a/backend/tests/test_probe_completion.py b/backend/tests/test_probe_completion.py
index 1ee8f102..e5393032 100644
--- a/backend/tests/test_probe_completion.py
+++ b/backend/tests/test_probe_completion.py
@@ -61,6 +61,7 @@ def test_profile_threshold_controls_retries_and_final_verdict_consistently(perce
])
def test_relaxed_duration_never_accepts_probe_errors(failure):
row = measured(probe_media_seconds=30, **failure)
+ assert not probe_window_completion(row, 0)[0]
assert is_stream_dead(row, {'minimum_probe_completion_percent': 0}) == (True, 'offline')
diff --git a/frontend/public/help/minimum-probe-completion-dark.jpg b/frontend/public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lCywW{5yq7fl?
zfP>Hv%Kn4m`(S+fQu=)C;!Vs-&=nKpVk?
zIaz_1FG1xHw{{@?ty%xB%ku%1F~P(C$$f*yM12PH8SqR4n!@|=Fdq41DaO=FTsuXr
ze_TsIOIH6TaSDU(b5%GCErU1pM^0a8WUMF0Q*
literal 0
HcmV?d00001
diff --git a/frontend/src/lib/operator-help-content.js b/frontend/src/lib/operator-help-content.js
index 50868037..3f536e25 100644
--- a/frontend/src/lib/operator-help-content.js
+++ b/frontend/src/lib/operator-help-content.js
@@ -237,6 +237,14 @@ export const operatorHelpDetailTopics = [
effect: 'Sets the minimum portion of the requested FFmpeg duration needed for a completed probe. Successful probes with reliable output media timing and usable measurements may complete faster than wall-clock time.',
useWhen: 'Use the advanced per-profile control when a provider needs a different minimum sample window. One-off stream checks use the default 80%.',
risk: 'Lower percentages accept shorter samples. 0 disables only the duration rule; probe errors and enabled blank/freeze checks still apply.',
+ reference: {
+ imageSrc: '/help/minimum-probe-completion-dark.jpg',
+ triggerLabel: 'UI Screenshot',
+ alt: 'Dark mode crop of the Minimum Probe Completion profile setting.',
+ caption: 'Minimum Probe Completion is in the profile editor under Stream Checking. The default is 80%; 0 disables only the duration rule.',
+ width: 407,
+ height: 132,
+ },
},
{
name: 'Provider Stream Cap',
diff --git a/frontend/src/lib/operator-help-content.test.js b/frontend/src/lib/operator-help-content.test.js
index f0311ce5..cc13d5e9 100644
--- a/frontend/src/lib/operator-help-content.test.js
+++ b/frontend/src/lib/operator-help-content.test.js
@@ -368,6 +368,7 @@ describe('operatorHelpSections', () => {
)
expect(references.map(reference => `${reference.topicId}:${reference.settingName}`)).toEqual([
+ 'automation-periods:Minimum Probe Completion (%)',
'automation-periods:Provider Stream Cap',
'automation-periods:Run all due periods',
'automation-periods:Catch-up cap',