Skip to content

perf(trickplay): start Matroska list entries at their keyframes - #2484

Merged
Quick104 merged 12 commits into
mainfrom
perf/trickplay-keyframe-inpoints
Oct 14, 2026
Merged

Quick104 merged 12 commits into
mainfrom
perf/trickplay-keyframe-inpoints

Conversation

@Quick104

@Quick104 Quick104 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Closes #2476
Related issue: N/A
Validation tasks: none

Generating seek previews reads most of each Matroska file to make a few hundred thumbnails. On hosts whose library sits on spinning disks, the preview queue keeps a disk busy for every file and slows playback from that disk. This change starts each Matroska list entry at the sample's keyframe instead of at the sample time, so ffmpeg reads the keyframe and a short span after it rather than everything between the keyframe and the sample. On a 1080p H.264 film with two audio tracks, the reads drop from 6.9 GB to 0.7 GB, and the published previews are the same cells. It builds on the approach and measurements in #2464.

A list entry that starts at its sample time makes the concat demuxer seek to the keyframe before the sample and read every packet of every stream, video and all audio tracks, up to the sample. The decoder only needs the keyframe (-skip_frame nokey).

Approach

  • Runner.Run reads the input's keyframes once, before any attempt, from the Matroska Cues with keyframes.ReadMatroska. Cues are the index the demuxer's own seek uses, and the read happens in-process without decoding. It runs in a goroutine with a 10-second bound and at most 4 reads in flight per process, so stalled storage cannot hold a trickplay worker and parsing cannot stack (Cues parsing allocates a few times their size; the parser's own limit is [bug] Reading a Matroska file's keyframe index can allocate hundreds of megabytes #2487, fixed in fix(playback): bound the Cues a Matroska keyframe index reads #2492). A file without usable Cues, or a read that fails, keeps today's sample-time entries. A hardware attempt that falls back to software reuses the lookup.
  • Each entry starts at the last keyframe at or before the sample. A sample whose keyframe is the previous sample's gets no entry. It takes the previous cell's frame, and the existing repeat repair then decodes its own moment. That avoids sending a keyframe twice in a row, which the HEVC decoder drops as a duplicate picture order count. Every frame of a keyframe entry lies at or after its inpoint, so the source times the repair compares are exact. With sample-time entries, ffmpeg rewrites the time of a keyframe decoded from before the inpoint, which on main hid some repeats from the repair (a new test with a 40-second GOP fails on main for this reason).
  • An open-GOP keyframe reached after a jump gets a picture order count derived from the last picture the decoder parsed, skipped pictures included. Keyframe entries leave longer gaps between parsed pictures, and with x265's default 8-bit count the derived counts can run backwards. The decoder then passes on keyframes out of list order, or drops them as duplicates. As soon as either happens, or the H.264 decoder drops a keyframe whose reference marking names skipped pictures, the attempt stops ffmpeg and reads the samples from their own times, exactly as main does. Without this guard, open-GOP HEVC placed more wrong cells than main.
  • MP4 and other containers, Stats lists, and repairs keep sample-time entries. An MP4 entry that starts exactly at its keyframe's time often seeks past it.
  • docs/architecture/media-sampling.md gains a "Keyframe entries" section, and its Repairs section is updated.

Server and transcode nodes only. Clients and the Jellyfin-compatible surface read the same published sheets and need no change. The user manual does not describe how previews are built.

Validation

  • go build ./..., gofmt, go vet ./..., make lint-changed, make verify-local-paths, make verify-case-collisions: clean. The web gate and the API contract checks were not run; the change touches no web, API, or migration files.
  • make test-go with ffmpeg 6.1 on 78265f6: every package passes except two internal/mediasample real-ffmpeg tests that fail on main too with that ffmpeg. On the current head, after merging main, internal/mediasample fails only TestRunStatsWithRealFFmpeg with ffmpeg 6.1, as main does. With Jellyfin FFmpeg 7.1.4, the build Silo ships, the whole internal/mediasample package passes, including the new real-ffmpeg tests.
  • New tests cover the keyframe plan (shared, close, before the first keyframe, non-zero container start, microsecond rounding), the lookup's bound and cancellation, entries and repairs over a fake ffmpeg, the abandon-and-reread path for both triggers, an abandoned read after the attempt's deadline, and real ffmpeg for a 40-second-GOP H.264 file (also shifted to start at 11.4 s) and an open-GOP x265 file that must fall back. The guard tests fail with the guard disabled.
  • Comparison matrix through the Go runner against main: x264 and x265 at default settings and with scene cuts off at 5, 10, 20, and 40-second GOPs; open- and closed-GOP HEVC, including log2-max-poc-lsb=8; Matroska and MP4; samples every 5 and 10 seconds; counting cells whose picture is not the scene at the sample time. Rerun against main after fix(trickplay): publish seek previews for XviD/DivX AVI and interlaced MPEG-2 #2462 and fix(trickplay): publish seek previews for H.264 files whose keyframes reference skipped pictures #2463, with this branch merged on top and interlaced MPEG-2 and MPEG-4 Part 2 at 0.5 and 10-second GOPs added: no case is worse than main with ffmpeg 6.1 (1,329 wrong cells against 1,444) or Jellyfin FFmpeg 7.1.4 (1,717 against 1,832). MP4 cases are identical, and MPEG-2 and MPEG-4 Part 2 place no wrong cells on either build.
  • Dev sandbox, built from main (after fix(trickplay): publish seek previews for XviD/DivX AVI and interlaced MPEG-2 #2462 and fix(trickplay): publish seek previews for H.264 files whose keyframes reference skipped pictures #2463) and from this branch merged on top: seek previews for seven release fixtures, with reads taken from /proc/<pid>/io for every ffmpeg the trickplay worker ran. Every file published the same number of cells, none filled. Six publish byte-identical sheets. On the 1080p H.264 film, 3 of 622 cells differ: on main each showed the keyframe half a second after its sample, the same picture as the next cell, and now each shows the keyframe before its sample.
Reads per file, main vs this branch
File main: read, read calls This branch: read, read calls Less read
1080p H.264 Matroska, 2 audio tracks 6.88 GB, 135,672 0.72 GB, 16,491 89%
1080p H.264 MP4 4.84 GB, 115,915 4.84 GB, 115,213 unchanged
4K SDR HEVC Matroska 0.18 GB, 5,740 0.07 GB, 2,864 63%
4K HDR10 HEVC Matroska, 38 GB 9.49 GB, 196,853 7.88 GB, 175,582 17%
4K Dolby Vision HEVC Matroska, 46 GB 13.21 GB, 233,062 13.31 GB, 236,843 0.8% more
AV1 Matroska 0.50 GB, 13,350 0.18 GB, 5,850 64%
VP9 Matroska 0.07 GB, 2,721 0.03 GB, 1,383 58%

Measured against main at 8f28583 with this branch merged on top. The Dolby Vision file's open-GOP keyframes come out of order across 10-second jumps, so the branch abandons its keyframe list in each of two chunks within about a second and reads as main does; those two runs are the 0.8% extra. The HDR10 file has keyframes under a second apart, so most of each entry's remaining cost is the concat demuxer opening and probing the file again for every entry, about 5 MB of the roughly 10 MB per entry. This change does not address that.

Evidence

Before-and-after sheets from the sandbox, the three cells that differ, and the comparison matrix tables.

Evidence: https://evidence.siloserver.org/r/silo-server/issue-2476/

Risks

  • Open-GOP HEVC whose listed keyframes are more than about 5 seconds apart falls back to sample-time entries. That includes x265's default 10-second GOP, and the 4K Dolby Vision fixture above. Such files read what they read today, plus the first few entries of the abandoned run.
  • Every Matroska Sheets run reads the file's Cues and a few clusters' block headers in-process, typically a few hundred kilobytes.

Possible follow-ups, not in this change:

  • Limit the concat demuxer's per-entry stream probing (option probesize/analyzeduration in the list), which dominates on short-GOP 4K remuxes.
  • A damaged-file policy for missing cells, deciding from missing video packets rather than keyframe distance. Missing cells are repaired as on main, whatever the keyframe distance.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code (CLI), in T3 Code
  • Tool(s): Claude Code; Codex through T3 Code delegated tasks
  • Model(s): claude-opus-5-5 (implementation); gpt-6.1-sol (reviews)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: Codex (gpt-6.1-sol, xhigh) reviewed the plan in two rounds. Round 1 found that open-GOP HEVC placed more wrong cells than main, that leaving out a sample whose distinct keyframe fell inside the previous entry's span could lose a valid frame, that reordered output makes source times unreliable, and that an in-process Cues read could block past the attempt timeout. These led to the reorder and duplicate guard, omitting only samples that share a keyframe, and the bounded goroutine lookup. Round 2 reviewed the implementation, found unbounded leftover lookups and a test race, and both were fixed. Codex's security review found that Cues parsing allocates a few times their size; the lookup cap is now 4, and the parser's own bound, which predates this change through playback, is [bug] Reading a Matroska file's keyframe index can allocate hundreds of megabytes #2487, fixed in fix(playback): bound the Cues a Matroska keyframe index reads #2492. It reran hardware, threading, multi-track, all-intra, WebM, negative-start, unknown-size-segment and fractional-timescale cases with equal or better cells. A background review by Codex (gpt-6.1-sol) of 78265f6 found one issue: an abandoned keyframe read could be published when ffmpeg exited cleanly and the attempt's time ran out while its frames tripped the guard. It is fixed in b0d9223 with a test that fails before the fix.

🤖 Generated with Claude Code

Note

Start Matroska Sheets list entries at their keyframes in mediasample to speed up trickplay

  • Looks up Matroska keyframes once per Runner.Run for non-ReadThrough Sheets requests, with a 10-second timeout and 4 concurrent lookups process-wide. Lookup uses a nonblocking open and skips non-regular files such as FIFOs. See keyframes.go.
  • Builds a keyframe plan that starts each ffconcat entry at the last keyframe at or before the sample, rounded up to the microsecond. Samples that share a keyframe get no entry. See concat.go.
  • Copies the preceding cell's frame and source time into omitted cells before repair, and maps source time through the actual entry inpoint. See sheets_join.go.
  • Abandons the keyframe read and retries with sample-time entries when ffmpeg logs a dropped keyframe or frames arrive out of entry order. See run.go.
  • Adds unit tests and real-ffmpeg tests for keyframe plans, lookup limits, fallback and shared keyframes, and documents the behavior in media-sampling.md.
  • Risk: Open-GOP content can trigger the fallback, so those reads decode twice.

Macroscope summarized 16411a6.

Quick104 and others added 2 commits October 14, 2026 16:47
A seek-preview list entry that starts at its sample time makes the concat
demuxer read every packet of every stream from the keyframe before the
sample up to it, most of the file when keyframes are seconds apart. Sheets
lists over Matroska now start each entry at the sample's keyframe, read
once per run from the file's Cues, and leave out samples that share the
previous sample's keyframe; the repeat repair decodes those at their own
time. A keyframe list whose decoder passes on frames out of list order or
drops a keyframe as a duplicate picture order count (open-GOP HEVC across
long gaps) is abandoned for sample-time entries.

Closes #2476

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Cap the Cues reads in flight across the process, skip the read when every
slot is taken, and stop a read between calls once its run stops waiting.
The cancellation test now waits for its lookup to exit, so it no longer
leaks into the next test's stub.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T22:45:45.902921Z 16411a6 New commits
🔒 Security Review ✅ Completed 2026-10-14T22:46:24.901904Z 16411a6 New commits

Security findings

Advisory findings (1)

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@silo-triage silo-triage Bot added enhancement New feature or request go Pull requests that update go code impact: perf Unusable slowness on normal hardware priority: P2 Limited scope, workaround exists, or polish labels Oct 14, 2026
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 00df6fc2-777f-4112-b8e8-ae8fdf981282
📥 Commits

Reviewing files that changed from the base of the PR and between efdc731 and 78265f6.

📒 Files selected for processing: 11
  • docs/architecture/media-sampling.md
  • internal/mediasample/args.go
  • internal/mediasample/concat.go
  • internal/mediasample/ffmpeg_test.go
  • internal/mediasample/keyframes.go
  • internal/mediasample/keyframes_test.go
  • internal/mediasample/run.go
  • internal/mediasample/sheet_repair.go
  • internal/mediasample/sheet_repair_test.go
  • internal/mediasample/sheets_join.go
  • internal/mediasample/sheets_test.go

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

📝 Walkthrough

Matroska Sheets sampling now reads keyframe-based list entries when keyframes are available. The runner falls back to sample-time entries when keyframe reads are abandoned. Frame assembly and repair use planned entry timestamps.

Changes: Matroska sheet sampling

Layer / File(s) Summary
Plan list entries and discover keyframes
internal/mediasample/concat.go, internal/mediasample/args.go, internal/mediasample/keyframes.go, internal/mediasample/keyframes_test.go, internal/mediasample/sheets_test.go
List entries now separate sample timestamps from container inpoints. Matroska keyframe lookup uses a 10-second timeout and a process-wide limit of 16 concurrent lookups. Planning assigns samples to keyframes or creates sample-time entries. Tests cover planning, lookup conditions, and list arguments.
Run keyframe reads and fallback
internal/mediasample/run.go, internal/mediasample/keyframes_test.go, internal/mediasample/ffmpeg_test.go, docs/architecture/media-sampling.md
The runner passes keyframes across attempts and falls back to sample-time reads when a keyframe read is abandoned for disorder or duplicate POCs. Tests cover fallback and real-FFmpeg cases. The documentation describes the Matroska path and its fallback behavior.
Map frames and repair sampled cells
internal/mediasample/sheets_join.go, internal/mediasample/sheet_repair.go, internal/mediasample/sheet_repair_test.go, internal/mediasample/keyframes_test.go
The assembler maps frame timestamps through the read plan and shares a preceding frame with a following sample omitted from the plan. Repair runs also use a sample plan. Tests cover source-time mapping and frame sharing.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant Runner
  participant sheetKeyframes
  participant MatroskaIndex
  participant FFmpeg
  participant sheetAssembler
  Runner->>sheetKeyframes: request sheet keyframes
  sheetKeyframes->>MatroskaIndex: read Matroska Cues
  MatroskaIndex-->>sheetKeyframes: keyframe times
  sheetKeyframes-->>Runner: keyframe times or no keyframes
  Runner->>FFmpeg: read keyframe-based list
  FFmpeg-->>Runner: frames and decode logs
  Runner->>sheetAssembler: place frames using the read plan
  alt keyframe read is abandoned
    Runner->>FFmpeg: read sample-time list
    FFmpeg-->>Runner: sample-time frames
    Runner->>sheetAssembler: place frames using the sample plan
  end
Loading
Merge Risk: ⚪ Minimal · up to 78265

No actionable issue was established that would prevent merging after normal checks.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Linked Issues check Passed The pull request meets the coding requirements in [#2476]. Runner.Run performs one bounded Matroska Cues lookup before attempts. keyframePlan starts Matroska list entries at the latest usable keyf…
Out of Scope Changes check Passed The changes stay within [#2476]. The modified runtime files implement Matroska seek-preview planning, bounded lookup, fallback, assembly, and repair behavior. The added tests verify those paths. The d…
Docstring Coverage Passed Docstring coverage is 82.14% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 10 files. (1 skipped: 1…
Title check Passed The title clearly and concisely identifies the main change: Matroska trickplay list entries now start at keyframes to improve read efficiency.
Description check Passed The description directly explains the problem, implementation, fallback behavior, validation results, risks, and scope of the Matroska keyframe-entry changes.
✨ 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

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 78265f62ac

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread internal/mediasample/keyframes.go Resolved
Parsing Cues allocates a few times their size, and keyframes.ReadMatroska
accepts up to 64 MiB, so the in-flight bound also bounds that memory. A
lookup takes milliseconds; four slots serve any number of workers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Adversarial review (gpt-6.1-sol, reviewed 78265f6)

The finding remains present in 70de066.

AI disclosure: Review performed with Codex (gpt-6.1-sol).

Comment thread internal/mediasample/run.go Resolved
When ffmpeg exited cleanly and the attempt's time ran out while its
buffered frames tripped the guard, the abandoned read's result was
returned as a success. An abandoned read is now always discarded: reread
from sample times while the attempt lives, else fail as timed out or
canceled.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b0d9223618

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return nil
}
defer func() { _ = file.Close() }()
index, err := keyframes.ReadMatroska(contextReaderAt{ctx: ctx, r: file}, info.Size())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Require a verified cue index before optimizing seeks

For a valid Matroska file whose Cues omit a video keyframe outside the four clusters sampled by checkCueCoverage, ReadMatroska returns the incomplete index even though VerifyMatroska would reject it. The new plan can then start a 0.5-second entry at an older cue; a first or single sample accepts that stale frame because it is neither missing nor comparable to a preceding cell for repeat repair, producing an incorrect thumbnail instead of falling back to sample-time entries. Use only a fully verified index here, or treat an unverified index as unavailable until verification completes.

AGENTS.md reference: AGENTS.md:L73-L75

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not a regression, so I'm keeping ReadMatroska. The concat demuxer's seek uses these same Cues. With a keyframe missing from the Cues, a sample-time entry on main seeks to the same earlier cued keyframe. It decodes that keyframe first, then the uncued one up to the sample, and keeps the first frame. A keyframe entry starting at that cue decodes the same first frame. Both builds show the same picture, and the shared-keyframe and repeat-repair logic sees the same cue for both samples.

VerifyMatroska (via Load/LoadVerified) reads the block headers of every cluster, which is a full pass over the file. That would cost about as much as the reads this change removes. On real fixtures (two 4K remuxes, 1,521 and 1,315 sample times), "last cue at or before the sample" matched where ffprobe's -read_intervals seek, the same avformat_seek_file call concat makes, landed every time. checkCueCoverage still rejects files whose Cues skip keyframes in the sampled clusters, and those keep sample-time entries.

I haven't reproduced a sparse-Cues file here: ffmpeg's muxer cues every video keyframe, and mkvmerge isn't available. The argument above follows from both builds seeking through the same index.

Comment thread internal/mediasample/keyframes.go Resolved
Comment thread internal/mediasample/keyframes_test.go Resolved
@silo-kody

silo-kody Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

syscall.Mkfifo does not exist on Windows, so the package's tests did not
build there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9adbc37226

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/mediasample/keyframes.go Resolved
Checking the path before opening it left a window in which a FIFO could
replace the file and hold the open, and so a lookup slot, indefinitely.
Open non-blocking and check the descriptor instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c0ac83a9bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/mediasample/keyframes.go Resolved
Quick104 and others added 2 commits October 14, 2026 18:10
#2463 adds H.264's "illegal short term buffer state" as a dropped-keyframe
signal (droppedKeyframe) and has samples() watch it alongside duplicate
POCs. sheets() keeps main's log-handler signature: a keyframe list now
abandons on any dropped keyframe, and its caller's handlers see none of an
abandoned read's log from the line that abandons it on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

…ead test

The test waited for the attempt's deadline by the wall clock, but the
context's own timer can fire a moment later on a loaded runner, so the
attempt still looked live and the run took the reread path. Drive
attemptRun.sheets with an attempt context whose deadline has passed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@Quick104
Quick104 merged commit 8cad25c into main Oct 14, 2026
16 checks passed
@Quick104
Quick104 deleted the perf/trickplay-keyframe-inpoints branch October 14, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update go code impact: perf Unusable slowness on normal hardware priority: P2 Limited scope, workaround exists, or polish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Generating seek previews reads most of each Matroska file

1 participant