Skip to content

Name WebVTT as the Reason HandBrake Encodes Without Subtitles - #1232

Merged
ptr727 merged 4 commits into
developfrom
fix/handbrake-ass-comment
Nov 9, 2026
Merged

ptr727 merged 4 commits into
developfrom
fix/handbrake-ass-comment

Conversation

@ptr727

@ptr727 ptr727 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

HandBrake 1.10 and later keep SubRip subtitles as SubRip, so the ASS conversion is no longer why ConvertUsingHandBrake() encodes without subtitles. That reason is gone from the code comment and from ARCHITECTURE.md, which now name the format HandBrake still drops.

Measured in the 3.24.41 image (HandBrake 1.11.2) on a synthetic MKV with SubRip, WebVTT, and ASS tracks, encoded with --all-subtitles:

  • The SubRip track comes through as SubRip, with its name and forced flag.
  • The ASS track comes through as ASS.
  • The WebVTT track is missing from the output.

So encoding without subtitles and merging the originals back with MkvMerge is still needed. HISTORY.md's 3.23 line "no longer converts them to ASS" stays as it is, since 3.22 could run a HandBrake older than 1.10, which did convert.

This closes the revalidation of #95. The comments label is set because the change rewords a comment line.

Open findings from the local review

  • PlexCleaner/ProcessFile.cs:2589 (introduced): "some subtitle formats, such as WebVTT, the IETF tags, and embedded closed captions" can read as a list of subtitle formats. Fixed in a5a41f2, which names WebVTT subtitles directly.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified that HandBrake may drop WebVTT subtitles, IETF tags, and embedded closed captions rather than converting subtitles to ASS.
    • Updated guidance to describe encoding without subtitles and merging the original subtitle tracks back unchanged.

ptr727 and others added 3 commits November 9, 2026 08:52
HandBrake 1.10 and later keep SubRip subtitles as SubRip, so the ASS
conversion is no longer a reason to encode without subtitles. The
workaround stays for the dropped IETF tags and closed captions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
HandBrake 1.11.2 drops a WebVTT subtitle track on passthrough, which
is why it still encodes without subtitles and MkvMerge merges the
originals back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Nov 9, 2026
Copilot AI lite review requested due to automatic review settings November 9, 2026 17:00
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The architecture documentation and a code comment now state that HandBrake drops WebVTT subtitles rather than converting subtitles to ASS. The architecture documentation still describes encoding without subtitles and restoring the original subtitle tracks with MkvMerge.

Changes: HandBrake subtitle handling documentation

Layer / File(s) Summary
Correct the HandBrake subtitle description
ARCHITECTURE.md, PlexCleaner/ProcessFile.cs
The architecture documentation and code comment now describe HandBrake as dropping WebVTT subtitles. The architecture documentation still says MkvMerge restores the original subtitle tracks.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Possibly related PRs

  • ptr727/PlexCleaner#1156: Added the HandBrake workflow that the current PR documents, including encoding without subtitles and merging the original subtitle tracks back.
Merge Risk: Minimal · up to a5a41

The changes clarify why original subtitles are restored after HandBrake encoding without changing processing behavior. No merge-blocking issue is identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title states that WebVTT is the reason HandBrake encodes without subtitles. The raw summary and PR objectives both say the change documents that HandBrake drops WebVTT subtitles (in ProcessFile.cs…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states that WebVTT is the reason HandBrake encodes without subtitles. The raw summary and PR objectives both say the change documents that HandBrake drops WebVTT subtitles (in ProcessFile.cs and ARCHITECTURE.md), and that this is why the workflow encodes without subtitles and merges the originals back. The title names the main change and its reason, so it matches the changeset. It is specific and does not use vague terms. The title is a single sentence of 61 characters.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 1362689 and a5a41f2.

Files selected for processing: 2

  • ARCHITECTURE.md
  • PlexCleaner/ProcessFile.cs

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@ptr727

ptr727 commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 5902a2925e7baa61fbb446b4614f6f5b9b57186c, the content this pull request carries at that commit against develop, and it recorded 1 finding.

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

qodo-free-for-open-source-projects Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Informational

1. A comment reads as a format list 🐞 Bug ⚙ Maintainability
Description
The rewritten comment in ConvertUsingHandBrake() puts WebVTT, the IETF tags, and embedded closed
captions in one list introduced by "HandBrake drops some subtitle formats, such as", so the IETF
tags and closed captions read as subtitle formats. The next line says "the tags are restored", which
points at the IETF tags, so a maintainer may conclude HandBrake drops them as subtitle formats when
they are separate concerns.
Code

PlexCleaner/ProcessFile.cs[2589]

+    // HandBrake drops some subtitle formats, such as WebVTT, the IETF tags, and embedded closed captions
Evidence
The added comment on line 2589 lists three items in one clause, and the PR's own open local-review
finding flags the same ambiguity, which the third commit was meant to address but did not. The
ARCHITECTURE.md hunk avoids the problem by naming only the subtitle format ("some subtitle formats,
such as WebVTT") and describing closed captions separately, so the two docs now word the same
behavior differently.

PlexCleaner/ProcessFile.cs[2589-2590]
ARCHITECTURE.md[679-679]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The comment added at PlexCleaner/ProcessFile.cs line 2589 lists WebVTT, the IETF tags, and embedded closed captions as if they were all subtitle formats HandBrake drops. The next line says the tags are restored, so the comment mixes a format with two unrelated concerns.
## Fix Focus Areas
- PlexCleaner/ProcessFile.cs[2589-2590]
- ARCHITECTURE.md[679-679]
## Recommended Fix
Rewrite the comment as two sentences: one naming WebVTT as the subtitle format HandBrake drops on passthrough, and one saying the IETF tags and embedded closed captions are dropped and restored separately. Keep the wording consistent with the ARCHITECTURE.md paragraph.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can see how risky a PR is at a glance with blast radius labels

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

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

Copy link
Copy Markdown

PR Summary by Qodo

Clarify why HandBrake encoding excludes subtitles

📝 Documentation 🕐 Less than 5 minutes

Grey Divider

AI Description

• Replace the outdated ASS-conversion explanation with HandBrake's WebVTT omission.
• Clarify why encoding still excludes subtitles before MkvMerge restores the original tracks.
Diagram

graph TD
  A["Original MKV"] --> B["HandBrake encode"] --> C["MkvMerge subtitles"] --> D["Restore tags"] --> E["Output MKV"]
  A -->|"original tracks"| C
Loading
High-Level Assessment

Keep the focused wording change. The documented HandBrake-to-MkvMerge workflow remains necessary, and changing the encoding strategy is outside this PR's scope.

Files changed (2) +2 / -2

Documentation (2) +2 / -2
ARCHITECTURE.mdIdentify WebVTT omission in the HandBrake workflow +1/-1

Identify WebVTT omission in the HandBrake workflow

• Replaces the outdated ASS-conversion rationale with HandBrake's omission of formats such as WebVTT. Retains the explanation that MkvMerge restores original subtitle tracks.

ARCHITECTURE.md

ProcessFile.csCorrect the HandBrake subtitle comment +1/-1

Correct the HandBrake subtitle comment

• Rewords the comment above ConvertUsingHandBrake() to name WebVTT instead of ASS conversion while retaining the references to lost language tags and embedded closed captions. No executable code changes.

PlexCleaner/ProcessFile.cs

@ptr727

ptr727 commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

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

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.

🟡 Changes recommended

An active finding remains in PlexCleaner/ProcessFile.cs:2589 because the loss description incorrectly groups IETF language tags and embedded closed captions with subtitle formats.

1 open issue
What changed in this PR

This pull request updates the HandBrake subtitle-loss documentation to identify WebVTT as the format dropped by current HandBrake versions, while preserving the existing remux-and-restore workflow.

Changes:

  • Rewords the ConvertUsingHandBrake() comment to mention WebVTT.
  • Updates ARCHITECTURE.md to reflect HandBrake 1.10+ behavior.
  • Keeps the existing subtitle restoration logic unchanged.
  • Review note: clarify that IETF language tags and embedded closed captions are distinct from subtitle formats. [P2, nit; 4 votes]
File Description
PlexCleaner/​ProcessFile.cs Updates the HandBrake conversion rationale comment.
ARCHITECTURE.md Documents WebVTT loss and the continued subtitle remux workaround.

Review effort: Lite

Comment thread PlexCleaner/ProcessFile.cs Resolved
@ptr727

ptr727 commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

Qodo finding 1, "A comment reads as a format list" (PlexCleaner/ProcessFile.cs:2589, raised on 5902a29): Fixed in a5a41f2. The comment now reads "HandBrake drops WebVTT subtitles, the IETF tags, and embedded closed captions", so no "such as" list remains for the tags and captions to read into. (1) finding answered.

@ptr727

ptr727 commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit 604eee1 into develop Nov 9, 2026
20 checks passed
@ptr727
ptr727 deleted the fix/handbrake-ass-comment branch November 9, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants