Skip to content

Log idet Counts on Every Interlace Scan - #1188

Merged
ptr727 merged 3 commits into
developfrom
feature/log-idet-counts
Nov 3, 2026
Merged

ptr727 merged 3 commits into
developfrom
feature/log-idet-counts

Conversation

@ptr727

@ptr727 ptr727 commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Summary

With DeInterlace on, each parsed interlace scan logs its verdict and idet counts on one Information line, whatever the verdict. Processing a collection then surveys its field orders. That's the evidence #1176 asks for before the field-order rule changes.

  • ProcessFile.FindInterlacedTracks logs Interlace scan counts : Interlaced: <bool>, Multi: ..., Single: ..., Repeated: ... : "<file>", with the multi-frame, single-frame, and repeated-field counts. Repeated fields show telecine.
  • The maintainer chose Information over Debug, so normal processing of the media collection records the survey, not only regression runs. ARCHITECTURE.md "Logging Conventions" now lists the scan's verdict and counts under Information, and keeps the idet tool run under Debug.
  • corpus_common.parse_log reads the line into an informational idet field per catalog entry. The reduce equivalence gate ignores it, since a cut clip's counts differ from its source's. The line avoids the word "detected", which the parser reads as a detection.
  • line_target shares trailing-filename attribution between the detection and idet branches.
  • A unit test reads the log template out of ProcessFile.cs, fills its placeholders, and checks that parse_log reads every count back. So the C# template and the Python regex can't drift silently. The CI integration run can't check this, because Docker/test.sh runs --logwarning.

Refs #1176. It stays open until a promotion carries this to main.

Verification

  • Built and processed two synthetic clips in the develop image, per OPERATIONS.md "Test an unreleased build in the image": testsrc at 1280x720, and testsrc2 at 320x240, the balanced repro from Balanced TFF and BFF idet Counts Classify Progressive Video as Interlaced #1176. Both log the counts line, and the balanced clip still logs its Interlaced warning. parse_log over that real log records both idet entries, with no spurious detection.
  • Changing the template's Multi: label to MultiFrame: fails the new test, and restoring it passes.
  • dotnet build with 0 warnings, dotnet test passed. Python ruff, mypy, and unittest (53 tests) pass, and the prose gate and markdownlint are clean.
  • Local strict review: three frontier passes recorded. The first two raised six findings, all fixed on this branch.

🤖 Generated with Claude Code

ptr727 and others added 3 commits November 2, 2026 18:41
Each interlace scan logs its verdict and multi-frame, single-frame, and
repeated-field counts at Information level, so normal processing of a
collection surveys its field orders before the field-order rule changes.
The catalog records the counts as an informational idet field per entry,
which the reduce equivalence gate ignores.

Refs #1176

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings November 3, 2026 03:05
@ptr727

ptr727 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 6d5cedd857487036ca2a1d3cf660113d8d668472, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 264b3917-1485-41f0-b84d-709545ad0e1a
Commits

Reviewing files that changed from the base of the PR and between d98d35c and 6d5cedd.

Files selected for processing: 7
  • ARCHITECTURE.md
  • HISTORY.md
  • PlexCleaner/ProcessFile.cs
  • RegressionTests/README.md
  • RegressionTests/catalog_corpus.py
  • RegressionTests/corpus_common.py
  • RegressionTests/tests/test_corpus_common.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Log interlace scan counts and catalog field-order results

✨ Enhancement 🧪 Tests 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Log every completed interlace scan’s verdict and idet counts at Information level.
Diagram

graph TD
  F["FFmpeg idet"] --> P["ProcessFile scan"] --> L[("Information log")] --> R["Log parser"] --> C[("Corpus catalog")] --> G["Reduce gate"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Store counts in structured process results
  • ➕ Avoids coupling catalog extraction to a human-readable log format.
  • ➖ Requires changes to the application results schema and its consumers for an informational survey.

Recommendation: Keep the log-based approach for this observational change: it makes counts visible during normal runs without changing result schemas, and the template-derived test guards the C#/Python format contract. Consider structured results if idet counts become a durable API or decision input.

Files changed (7) +130 / -8

Enhancement (3) +59 / -6
ProcessFile.csLog every completed idet scan result +18/-1

Log every completed idet scan result

• Logs the interlaced verdict and multi-frame, single-frame, and repeated-field counts before handling either verdict. Skipped or failed scans do not produce a counts line.

PlexCleaner/ProcessFile.cs

catalog_corpus.pyInclude idet data in corpus entries +2/-1

Include idet data in corpus entries

• Adds the parsed idet field to each catalog entry, defaulting to null when no scan result was logged.

RegressionTests/catalog_corpus.py

corpus_common.pyParse and attribute interlace scan counts +39/-4

Parse and attribute interlace scan counts

• Parses verdicts and counts into a nested idet value. Shares trailing-filename attribution with detection parsing and keeps scan lines out of detections.

RegressionTests/corpus_common.py

Tests (1) +56 / -0
test_corpus_common.pyTest idet parsing against the application log template +56/-0

Test idet parsing against the application log template

• Covers count extraction, verdicts, filename and thread attribution, and absence of spurious detections. A test fills the C# log template and verifies that the Python parser reads every count.

RegressionTests/tests/test_corpus_common.py

Documentation (3) +15 / -2
ARCHITECTURE.mdClarify interlace-scan logging levels +12/-2

Clarify interlace-scan logging levels

• Places scan verdicts and counts at Information level while retaining the idet tool run among Debug-level inspection details.

ARCHITECTURE.md

HISTORY.mdAnnounce interlace count logging +1/-0

Announce interlace count logging

• Adds a release note explaining that DeInterlace processing records scan counts for a collection-wide field-order survey.

HISTORY.md

README.mdDocument the catalog’s informational idet field +2/-0

Document the catalog’s informational idet field

• Explains when idet data is null and why reduction equivalence does not compare counts from source files and cut clips.

RegressionTests/README.md

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can tweak Display settings with a live preview to see your comment before it ships

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain, and the interlace telemetry change includes parser/template regression coverage and corresponding documentation.

No open issues 🎉

What changed in this PR

Adds Information-level interlace telemetry, exposing FFmpeg idet verdicts and field-order counts in regression catalogs without affecting reduction equivalence.

Changes:

  • Logs interlace verdicts and MultiFrame, SingleFrame, and RepeatedFields counts.
  • Parses and stores idet data in corpus catalog entries.
  • Adds parser/template regression coverage.
  • Documents the logging and catalog behavior.
File Description
RegressionTests/​tests/​test_corpus_common.py Tests idet parsing and synchronizes it with the C# log template.
RegressionTests/​README.md Documents cataloged idet data.
RegressionTests/​corpus_common.py Parses interlace counts and attributes them to catalog entries.
RegressionTests/​catalog_corpus.py Stores parsed idet data in catalog entries.
PlexCleaner/​ProcessFile.cs Logs interlace verdicts and field-order counts at Information level.
HISTORY.md Records the new interlace telemetry behavior.
ARCHITECTURE.md Documents the Information-versus-Debug logging classification.

Review effort: Lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants