Repository navigation
Conversation
…clients)
Silo never captured or reported the video color range (limited/tv vs full/pc),
so the Jellyfin-compat MediaStream omitted ColorRange. Clients (Infuse, etc.)
then render limited-range content as full-range on direct play -> raised blacks,
capped whites -> washed out / faded, even on plain SDR h264.
Thread ffprobe's color_range through to the API, mirroring the existing
ColorSpace/ColorTransfer/ColorPrimaries handling:
- scanner/probe.go: capture color_range and set it on the built VideoTrack
- scanner/scanner.go: carry ColorRange through applyProbeData (persist path)
- scanner/types.go, models/media.go: add ColorRange to track structs
- jellycompat/dto.go: add ColorRange to mediaStreamDTO
- jellycompat/handlers_playback.go: populate ColorRange from the track
- catalogseed/{types,service}.go: carry it through catalog-seed import
Values pass through verbatim (tv/pc), same as Jellyfin; untagged files stay
empty (omitempty). Existing libraries need a re-scan to repopulate video_tracks.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
📝 WalkthroughWalkthroughVideo color range metadata is parsed from ffprobe output, stored on video tracks, and propagated to catalog records and Jellyfin-compatible playback stream DTOs. ChangesVideo color range propagation
Possibly related issues
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/scanner/probe.go`:
- Line 212: Normalize ffprobe’s ColorRange value before assigning it to
VideoTrackInfo: convert only the "unknown" sentinel to an empty string, while
preserving "tv" and "pc" unchanged. Update the ColorRange mapping in the
surrounding probe construction without altering other stream fields.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8bef80e3-4b09-4ba9-86c5-b47bbdfbb3f5
📒 Files selected for processing (8)
internal/catalogseed/service.gointernal/catalogseed/types.gointernal/jellycompat/dto.gointernal/jellycompat/handlers_playback.gointernal/models/media.gointernal/scanner/probe.gointernal/scanner/scanner.gointernal/scanner/types.go
| ColorPrimaries: s.ColorPrimaries, | ||
| ColorSpace: s.ColorSpace, | ||
| ColorTransfer: s.ColorTransfer, | ||
| ColorRange: s.ColorRange, |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n '"color_range"[[:space:]]*:[[:space:]]*"unknown"' .
rg -n 'ColorRange|color_range' internal/scanner internal/models internal/catalogseed internal/jellycompatRepository: Silo-Server/silo-server
Length of output: 161
🏁 Script executed:
#!/bin/bash
set -euo pipefail
ast-grep outline internal/scanner/probe.go --view expanded
printf '\n---\n'
sed -n '1,280p' internal/scanner/probe.go
printf '\n---\n'
rg -n 'normalizeColorRange|ColorRange|color_range|unknown' internal/scanner internal/models internal/catalogseed internal/jellycompatRepository: Silo-Server/silo-server
Length of output: 21673
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '600,710p' internal/scanner/probe.go
printf '\n---\n'
sed -n '1,320p' internal/models/media.go
printf '\n---\n'
sed -n '860,930p' internal/jellycompat/handlers_playback.go
printf '\n---\n'
sed -n '2530,2610p' internal/catalogseed/service.goRepository: Silo-Server/silo-server
Length of output: 20714
Normalize ffprobe’s unknown color-range sentinel before storing it.
ffprobeStream.ColorRange is copied through as-is, so unset ranges become the literal string unknown in VideoTrackInfo and downstream JSON/API payloads. Map only unknown to "" and leave tv / pc unchanged.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@internal/scanner/probe.go` at line 212, Normalize ffprobe’s ColorRange value
before assigning it to VideoTrackInfo: convert only the "unknown" sentinel to an
empty string, while preserving "tv" and "pc" unchanged. Update the ColorRange
mapping in the surrounding probe construction without altering other stream
fields.
Silo never captured or reported the video color range (limited/tv vs full/pc), so the Jellyfin-compat MediaStream omitted ColorRange. Clients (Infuse, etc.) then render limited-range content as full-range on direct play -> raised blacks, capped whites -> washed out / faded, even on plain SDR h264.
Thread ffprobe's color_range through to the API, mirroring the existing ColorSpace/ColorTransfer/ColorPrimaries handling:
Values pass through verbatim (tv/pc), same as Jellyfin; untagged files stay empty (omitempty). Existing libraries need a re-scan to repopulate video_tracks.
Summary by CodeRabbit
color_rangevalue.