Skip to content

feat(jellycompat): copy video as MPEG-TS for clients that list only TS - #3341

Merged
Quick104 merged 2 commits into
mainfrom
fix/jellycompat-ts-copy
Nov 1, 2026
Merged

Quick104 merged 2 commits into
mainfrom
fix/jellycompat-ts-copy

Conversation

@CoffeeKnyte

@CoffeeKnyte CoffeeKnyte commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: changes #1246 C1

A Jellyfin client that accepts H.264 or HEVC in MPEG-TS HLS, but not in fMP4, gets a full video encode of a file it could have played as a copy. That costs a transcode slot and CPU or GPU, and it lowers quality for no reason. On current main, a 6 Mbps H.264 file sent to a TS-only client is re-encoded to about 29 Mbps. With this change the same client gets a video copy at the source's rate.

Approach

Copy negotiation in buildPlaybackSource tested the profile's fMP4 HLS entries only. It now tests fMP4 first and falls back to MPEG-TS when the profile lists the source codecs there. The copy uses the same MPEG-TS route that Roku and webOS copies already use. A client that lists fMP4 keeps fMP4, and a progressive remux the client can take still comes first.

HLS carries only H.264 and HEVC in MPEG-TS, with AAC, AC-3, E-AC-3 or MP3 audio. playback.HLSCopyFitsMPEGTS holds that rule. Other audio converts to AAC when the profile accepts it.

This only changes the Jellyfin-compatible surface, so silo-apple and silo-android need no follow-up. docs/jellycompat-api.md is updated.

Validation

  • Focused tests: internal/jellycompat passes except TestAttachmentServesActualFontAndRejectsWrongRoute, which also fails on main in my environment. internal/playback fails the same real-FFmpeg tests as main in my environment, which has an older host FFmpeg.
  • make lint-changed reports 0 issues. go vet on both packages and make verify-local-paths are clean.
  • End to end: built this branch and main as images and ran each with a fresh database and a synthetic 40 s library. A scripted client called PlaybackInfo with a TS-only profile, fetched the playlists and segments, and checked them with ffprobe and FFmpeg 8.1.3-Jellyfin.
  • H.264/AAC, H.264/E-AC-3, H.264/FLAC and HEVC/AAC each played to #EXT-X-ENDLIST with 960 of 960 frames and clean decoding. Segment timestamps match the playlist to within 0.125 s.
  • Not run: make test-go and the rest of the full gate, and any real TS-only client app. Seeking was checked only against segments already produced.
  • Review fixes (715b4d6): the Dolby Vision strip no longer accepts a TS-only copy, since it is packaged as fMP4. An untagged audio track is judged by the file codec, so FLAC or DTS is converted instead of copied into TS. TestPlaybackInfoSkipsStripForTSOnlyClient and the untagged track is judged by the file codec row fail on 3fcb587 and pass now. The PR's TS-only client takes the copy and needs no burn row fails on main.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/pr-3341/

Same request on the same synthetic file: a TS-only profile with direct play off and a 120 Mbps ceiling. Sizes are the first four segments.

Source Before (main 84cab92) After (this branch)
H.264 + AAC libx264, -maxrate 113808k, 29.4 MB -c:v copy, MPEG-TS, 7.2 MB
H.264 + E-AC-3 libx264, audio to AAC, 29.4 MB -c:v copy, E-AC-3 kept, 7.8 MB
H.264 + FLAC libx264, 29.5 MB -c:v copy, audio to AAC
HEVC + AAC libx264 to H.264, 35.4 MB -c:v copy, HEVC kept, 5.2 MB
H.264 + AAC, client lists MP4 and TS -c:v copy, fMP4 -c:v copy, fMP4 (unchanged)

Surface and build: jellycompat PlaybackInfo and HLS output, images built from main 84cab92 and this commit. TranscodeReasons changes from VideoCodecNotSupported to ContainerNotSupported for these requests.

Risks

Checklist

  • Complete diff read by the author: pending, to be confirmed before review.
  • This pull request addresses one concern.
  • The added tests meet "Decide what to test": public jellycompat negotiation with real edge cases.
  • The Evidence section shows the server's output before and after.

AI Disclosure

  • Harness: Claude Code
  • Tool(s): Claude Code
  • Model(s): claude-opus-5-5
  • Involvement: AI-assisted. Claude Code wrote the code, tests and this description at the maintainer's direction.
  • Adversarial review: maintainer review by Claude Code (claude-opus-5-5) with a cross-provider round by Codex (gpt-6.1-sol); review fixes in 715b4d6.

Note

Add MPEG-TS HLS video-copy routes for TS-only clients in jellycompat

  • PlaybackHandler.buildPlaybackSource in handlers_playback.go can now negotiate an MPEG-TS HLS copy route when the client profile supports the codecs in TS but not fMP4 and no progressive remux route exists. It also applies TS-aware checks to audio-transcode HLS routes.
  • PlaybackHandler.HandlePlaybackInfo selects TS packaging for sources marked as MPEG-TS remuxes, unless Dolby Vision is being stripped to HDR10.
  • New helper playback.HLSCopyFitsMPEGTS in plan_v3.go limits TS copy routes to H.264 or HEVC video plus an HLS-native audio codec.
  • supportedHLSRemuxAudioStreamIndexes filters audio switch targets against the negotiated container, and PlaybackMediaSource gains an unexported hlsRemuxInTS marker used only during PlaybackInfo.
  • Behavioral Change: TS-only clients now get playable copy routes instead of errors in cases like the TS-only subtitle-transport test, which changed from HTTP 400 to 200 in subtitle_selection_test.go.

Changes since #3341 opened

  • Changed MPEG-TS packaging decisions for HLS remuxes in PlaybackHandler.buildPlaybackSource, and extended TestHLSCopyPackagesForTheContainerTheClientLists [715b4d6]
  • Added a guard in PlaybackHandler.applyCompatDVStrip that returns the original source when the negotiated HLS remux uses MPEG-TS, and added TestPlaybackInfoSkipsStripForTSOnlyClient [715b4d6]
  • Replaced the explicit H.264/HEVC codec check in playback.PlanPlaybackV3 with a call to HLSCopyFitsMPEGTS(source.VideoCodec, "") [715b4d6]

Macroscope summarized 3fcb587.

A client whose HLS profile accepts the source codecs in MPEG-TS but not in
fMP4 got a full video encode, because copy negotiation tested fMP4 alone. It
now gets a video copy in MPEG-TS, through the route Roku and webOS copies
already use. A progressive remux the client can take still comes first.

HLS carries only H.264 and HEVC in MPEG-TS, with AAC, AC-3, E-AC-3 or MP3
audio. Other audio converts to AAC when the profile accepts it.
@silo-triage silo-triage Bot added the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Nov 1, 2026
@silo-kody

silo-kody Bot commented Nov 1, 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 ❌

@macroscopeapp

macroscopeapp Bot commented Nov 1, 2026

Copy link
Copy Markdown

The Jellycompat playback route now gives TS-only profiles a video copy instead of an encode (internal/jellycompat/handlers_playback.go). The before/after table reports output modes and segment sizes, but lacks before-and-after PlaybackInfo response excerpts showing the negotiated route/container. Please add those excerpts for the same request and include the matching build or commit for each.

Suggested fix: No diff — add the response excerpts to the Evidence section.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 85509ac4-c9d7-4d96-8470-0b03aaf77186
Commits

Reviewing files that changed from the base of the PR and between 3fcb587 and 715b4d6.

Files selected for processing: 5
  • internal/jellycompat/dv_strip.go
  • internal/jellycompat/dv_strip_test.go
  • internal/jellycompat/handlers_playback.go
  • internal/jellycompat/playback_output_conditions_test.go
  • internal/playback/plan_v3.go

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

Walkthrough

HLS playback negotiation can select MPEG-TS remux for eligible copy and audio-encode routes when progressive remux is unavailable and the client profile supports TS. Playback output handling uses the selected container for packaging and audio-track compatibility. Dolby Vision strip remux remains in fMP4.

Changes: HLS MPEG-TS Copy Negotiation

Layer / File(s) Summary
MPEG-TS eligibility and selection
internal/playback/plan_v3.go, internal/jellycompat/handlers_playback.go
The planner checks H.264 or HEVC video and audio compatibility for MPEG-TS copying. Jellyfin-compatible negotiation selects TS when progressive remux is unavailable, the codecs fit, and the profile supports the applicable TS route.
Container propagation and playback constraints
internal/jellycompat/handlers_playback.go, internal/jellycompat/playback_sessions.go, internal/jellycompat/dv_strip.go, internal/jellycompat/*_test.go, docs/jellycompat-api.md
Playback records the selected container and uses it for output packaging and audio-track support. Dolby Vision strip remux rejects TS packaging. Tests and API documentation cover container negotiation, audio handling, client profiles, and strip behavior.

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant PlaybackInfo
  participant PlaybackNegotiation
  participant ClientProfile
  PlaybackInfo->>PlaybackNegotiation: request playback source
  PlaybackNegotiation->>ClientProfile: check container support
  ClientProfile-->>PlaybackNegotiation: supported containers
  PlaybackNegotiation-->>PlaybackInfo: selected container and remux flags
Loading

Possibly related issues

Suggested labels: impact: playback, impact: usability, impact: perf

Suggested reviewers: quick104

Merge Risk: Minimal · up to 715b4

TS negotiation and packaging are consistent on the reviewed paths. No merge-blocking risk remains identified.

Security architecture risk: Low · up to 715b4

The change broadens supported playback formats without an observed increase in access or privileges. Existing ownership and format-consistency checks remain in place, although concurrent recovery and mixed-version operation were not fully validated.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated exposure change is additional authenticated client profiles reaching an existing media packaging path for their negotiated source. The inspected change does not establish broader asset access, cross-user session reuse, or additional execution privileges.

Trust Boundaries and Controls

  • observed — HLS follow-up authentication resolves the negotiated playback session, and master, manifest, and segment consumers enforce its CompatToken ownership. Source and route validation remain separate checks after authentication.
  • observed — The two routed test symbols are test functions, not new HTTP entrypoints. Their assertions cover TS packaging eligibility and rejection of the fMP4-only Dolby Vision stripping path for a TS-only client.

Resilience and Maintainability Implications

  • observed — The existing negotiation identity includes the selected container, audio/subtitle choices, audio conversion, and Dolby Vision mode. Container changes therefore remain represented in session negotiation identity rather than relying on the temporary marker after persistence.
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: MPEG-TS video-copy support for Jellyfin-compatible clients that list only TS.
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.
Description check Passed The description is specific and tied to the changeset. It explains the problem (TS-only Jellyfin clients get full video re-encodes instead of copies), the approach in buildPlaybackSource and the new p…
Full details: Description check

Explanation

The description is specific and tied to the changeset. It explains the problem (TS-only Jellyfin clients get full video re-encodes instead of copies), the approach in buildPlaybackSource and the new playback.HLSCopyFitsMPEGTS helper, the Dolby Vision strip exclusion, validation steps, end-to-end evidence, risks, and a follow-up fix commit. Its content matches the file summaries, so the check passes.

Full details: Docstring Coverage

Explanation

Docstring coverage is 55.56% which is insufficient. 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 9 functions across 9 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

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

@silo-triage silo-triage Bot added enhancement New feature or request go Pull requests that update go code priority: P2 Limited scope, workaround exists, or polish labels Nov 1, 2026
@coderabbitai coderabbitai Bot added impact: perf Unusable slowness on normal hardware impact: playback Can't play, stalls, or wrong media impact: usability Core flow broken or severely blocked labels Nov 1, 2026
Comment on lines +2352 to +2353
source.HLSRemuxMPEGTS = compatWebOSDVMPEGTS(r.UserAgent(), source) || compatRokuMPEGTS(r.UserAgent(), profile, source) ||
source.hlsRemuxInTS && compatHLSCopiesVideo(source) && !source.DVStripToHDR10

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Bug high

Unsupported fMP4 strip delivery occurs because applyCompatDVStrip now accepts TS-only copy negotiation, but PlaybackInfo disables MPEG-TS for DVStripToHDR10 and compatTranscodingContainer advertises fMP4, leaving a client that rejects the Dolby Vision source and accepts its HDR10 base layer only in TS without a supported stream. Exclude TS-only remuxes from strip selection unless the strip delivery path supports that container.

Prompt for LLM

File internal/jellycompat/handlers_playback.go:

Line 2352 to 2353:

Unsupported fMP4 strip delivery occurs because applyCompatDVStrip now accepts TS-only copy negotiation, but PlaybackInfo disables MPEG-TS for DVStripToHDR10 and compatTranscodingContainer advertises fMP4, leaving a client that rejects the Dolby Vision source and accepts its HDR10 base layer only in TS without a supported stream. Exclude TS-only remuxes from strip selection unless the strip delivery path supports that container.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Claude Code (claude-opus-5-5)

Confirmed, high severity. applyCompatDVStrip accepts the HDR10 base whenever stripped.HLSRemux is true. With this PR, that can now be a copy the client accepts only as MPEG-TS. PlaybackInfo then keeps the strip on fMP4 (!source.DVStripToHDR10 here), so the client gets remux-dv-v1 with TranscodingContainer: mp4, a container its profile never listed. Before this PR the strip was refused, and the client got the encode fallback, or no route when tone mapping was off.

Trigger: a Dolby Vision profile 8.1 HEVC file, and a client that rejects DOVIWithHDR10, lists HEVC only in a ts HLS profile, and can't take a progressive remux of HEVC. The new TestPlaybackInfoSkipsStripForTSOnlyClient gets a 200 with remux-dv-v1 on this head.

I'm fixing this in a commit on this branch, so there's no need to change it yourself. The strip will skip a TS-only copy (stripped.hlsRemuxInTS), as it did before. Packaging the strip as MPEG-TS would need its own route and recipe change.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed in 715b4d6. applyCompatDVStrip now returns the original source when the stripped negotiation is a TS-only copy (!stripped.HLSRemux || stripped.hlsRemuxInTS). TestPlaybackInfoSkipsStripForTSOnlyClient fails on 3fcb587 (200 with remux-dv-v1, TranscodingContainer: mp4) and passes now. The internal/jellycompat and internal/playback suites pass.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Agreed—rejecting stripped.hlsRemuxInTS in applyCompatDVStrip addresses the container mismatch while keeping the existing fMP4 strip path intact. MPEG-TS strip delivery should remain a separate change.

For regression coverage, verify that the TS-only case never selects remux-dv-v1, falls back to encoding when available, and returns no playable route when tone mapping is disabled. An fMP4-capable profile should still retain the strip route.

I’ll leave the branch changes to you.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks—the guard in 715b4d693 addresses the reported mismatch: TS-only stripped negotiations are rejected, preserving the existing fallback behavior while leaving fMP4-capable strip routes intact.

The reported regression failure on 3fcb58729 and pass after the fix demonstrate coverage of the original bug. With both package suites passing, I consider this finding addressed based on your report.

Comment on lines +2674 to +2675
remuxAudioEncodeTS := !remuxAudioEncodeFMP4 && !progressiveRemuxOK && playback.HLSCopyFitsMPEGTS(version.CodecVideo, "") &&
profile.supportsHLSRemuxWithAudioTranscodeIn(version, selectedAudioIndex, targetAudioChannels, compatContainerTS)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Bug medium

Blocked audio-only conversion occurs because the new TS AAC fallback requires !audioSupported, which reflects progressive MP4 compatibility rather than MPEG-TS audio support. For H.264/FLAC accepted by the direct-stream codec profile, a routing policy that forbids progressive remux sets remuxAudioCopyTS to false and remuxAudioEncodeTS to true while audioSupported remains true, forcing a full video encode or no playable route; gate the fallback on MPEG-TS audio compatibility instead.

Prompt for LLM

File internal/jellycompat/handlers_playback.go:

Line 2674 to 2675:

Blocked audio-only conversion occurs because the new TS AAC fallback requires !audioSupported, which reflects progressive MP4 compatibility rather than MPEG-TS audio support. For H.264/FLAC accepted by the direct-stream codec profile, a routing policy that forbids progressive remux sets remuxAudioCopyTS to false and remuxAudioEncodeTS to true while audioSupported remains true, forcing a full video encode or no playable route; gate the fallback on MPEG-TS audio compatibility instead.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Claude Code (claude-opus-5-5)

The mechanism is real, but this PR doesn't introduce it. main has the same (!allowAudioCopy || !audioSupported) gate, and it already blocks the fMP4 audio conversion the same way. A focused test on main (84cab92) with H.264/FLAC, a direct-play profile that accepts FLAC, an fMP4 HLS profile that lists only AAC, and RemuxExecution: worker_only returns no route at all (SupportsTranscoding=false). The fix changes the expression this PR edits, so I filed it as #3356 to follow this PR rather than widening this one.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Agreed—your reproduction on main shows the gate is a pre-existing bug, not a regression introduced by #3341. My suggestion should have made that distinction.

Tracking the fix in #3356 is reasonable: the follow-up should make audio-only transcoding eligibility depend on the negotiated HLS container’s audio support, rather than progressive MP4 compatibility, covering both fMP4 and MPEG-TS. I wouldn’t treat this finding as a blocker for #3341.

…pies

The Dolby Vision strip is packaged as fMP4, so a strip negotiated from a
copy the client accepts only as MPEG-TS handed that client a container it
never listed. The strip now skips such a copy, as it did before TS copies
existed.

The MPEG-TS audio check read the selected track's codec, which is empty
on an untagged track, and treated it as a video-only check. It now uses
the file codec fallback the profile match already uses, so FLAC or DTS
is converted instead of copied into TS.

Also drops a progressive-remux test from the TS audio-encode branch that
could never change its result, and has the native planner use the shared
MPEG-TS video rule.

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

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Claude Code (claude-opus-5-5), maintainer review

The approach is sound, and I found two defects in the new MPEG-TS negotiation. I'm fixing both in a commit on this branch, so there's no need to change anything yourself.

  1. Dolby Vision strip sent as fMP4 to a TS-only client (high). Kody's thread on line 2353 already covers this. My reply there has the trigger and the test.
  2. Untagged audio track skips the MPEG-TS audio check (medium). See the inline comment.

There's also one cleanup in the inline comment on line 2674.

Kody's second finding (FLAC with progressive remux ruled out by policy) is real, but main has it too, and it hits fMP4 as well. I filed it as #3356 so it can follow this PR. While reviewing, I also found that jellycompat remote starts never check the node's MPEG-TS copy attestation. That predates this PR, but the PR sends more clients down that path. It's filed as #3355.

@silo-kody

silo-kody Bot commented Nov 1, 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 ❌
⚠️ 4 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility

@Quick104

Quick104 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Claude Code (claude-opus-5-5), maintainer review summary

Reviewed head: 715b4d6 (the PR's 3fcb587 plus my review fixes)

Fit: 9/10 · Readiness: 8/10 — conditional (assuming CI is green)

Fit. Jellyfin compatibility is a long-term commitment, and a Jellyfin server copies video into MPEG-TS for a client whose profile lists only TS. Encoding a stream the client could take as a copy wastes a transcode slot and lowers quality, which hurts most on small servers. The change stays inside jellycompat negotiation, reuses the existing remux-ts-v1 route, and adds no setting.

Readiness. The approach is sound, and the two defects the review found are fixed. Two items hold the score below 9. No real TS-only client app has played the new route; the evidence is the author's scripted client with ffprobe, plus handler tests. The validation board couldn't be read in this run (see below).

Addressed in 715b4d6

  • Dolby Vision strip sent as fMP4 to a TS-only client (high, Kody's thread). The strip now skips a copy the client accepts only as MPEG-TS, as it did before this PR. TestPlaybackInfoSkipsStripForTSOnlyClient failed on 3fcb587 with a 200 and remux-dv-v1.
  • Untagged audio track skipped the MPEG-TS audio check (medium). The check now reads the same codec the profile match uses. The new table row failed on 3fcb587, where FLAC was copied into TS.
  • Cleanup. Removed a check that could never change the result, and the native planner now uses HLSCopyFitsMPEGTS.

internal/jellycompat and internal/playback pass, and make lint-changed reports 0 issues.

Tests that fail on the base

The PR's handler-level row TS-only client takes the copy and needs no burn fails on main with 400 PlaybackUnavailable, so it detects the change. The PR's direct buildPlaybackSource tests read the new hlsRemuxInTS field, so they don't build on main and don't count as proof on their own.

Other feedback

Left for the maintainers

  • A client that lists HEVC or E-AC-3 for MPEG-TS but can't really play them there now gets a copy instead of an encode. The PR body discloses this risk.

Cross-provider review

One round by Codex (gpt-6.1-sol) on 3fcb587. It confirmed the Dolby Vision finding and agreed that the FLAC gate predates the PR. It found no path after PlaybackInfo that loses the TS packaging.

Validated features

Validation tasks: changes #1246 C1

The board couldn't be read in this run (the token lacks the project scope), so this line rests on #1246's recorded results. C1's smoke matrix covers clients that can fall back from direct play to HLS. Any client whose profile lists only TS would now get a copy where it used to get an encode. The recorded run excluded Roku. A re-check of #1246 C1 on a build with this change is worth asking for after merge.

User manual and clients

  • Manual: unaffected. siloserver.org doesn't describe how jellycompat picks the HLS container.
  • Apple and Android: no change needed. This only changes the Jellyfin-compatible surface.

Evidence: https://evidence.siloserver.org/r/silo-server/pr-3341/

@Quick104
Quick104 merged commit 6a63e16 into main Nov 1, 2026
34 checks passed
@Quick104
Quick104 deleted the fix/jellycompat-ts-copy branch November 1, 2026 16:22
@macroscopeapp

macroscopeapp Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The recorded #1246 C1 matrix covers H.264 direct play and HEVC HLS transcode, but does not exercise the new TS-only video-copy route. The PR must explain why validated playback behavior changes; #1246 C1 needs re-validation after merge with a real TS-only client/profile.

Suggested fix: No diff — record the post-merge C1 re-run in #1246.

Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.

Posted via Macroscope — v1 validation impact

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 impact: playback Can't play, stalls, or wrong media impact: usability Core flow broken or severely blocked priority: P2 Limited scope, workaround exists, or polish size/M 50–199 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants