The open sea, under your control. A Rust-native replacement for Jellyfin Server, designed for compatibility with existing Jellyfin clients, including the unmodified Smart TV Jellyfin apps.
Identity: #1DB2C0 Β· oklch(70% 0.115 205) (color decision). Administration appearance: β System (default) / β Light / βΎ Dark, with the selector at the top right.
Pre-alpha, not yet Jellyfin compatible. Rust login with persistent device-aware session records, authenticated system-info capability reporting, scoped
/Sessionsqueries, item browsing, virtual folders, read-only scanning, FFprobe and SQLite indexing now exist. FFprobe-backed read-only PlaybackInfo, catalog-v2 persisted empty libraries, permission-scoped Search/Hints, static audio/video byte-range streaming, indexed poster/collection artwork and ImageInfo, personal watched/favorite state and direct-play resume positions are synthetic-test verified. Users/Items responses are incomplete, ordinary accounts require explicit local per-library grants, and there is still no client-accepted authentication, Quick Connect, complete remux/transcoding pipeline, user-data migration or Smart TV playback. Synthetic HTTP tests cover library-authorized static audio/video byte ranges and short, CPU-first FFmpeg/FFprobe H.264/AAC MPEG-TS HLS VOD for both audio and video routes: token-scoped single- and opt-in 2β4-rendition audio/video masters, media playlists and segments, source-revisioned private LRU publication reuse, independently decoded rendition switches, and GET/HEAD byte ranges. Sustained network-adaptive HLS, long/live streaming, DASH and unmodified Smart TV acceptance remain unfinished. Full compatibility is a mandatory acceptance goal, not a current claim.
- Replace all built-in Jellyfin Server v12.3 C#/.NET application logic with Rust, independently implemented with protocol and behavioral parity. No .NET runtime or original Jellyfin daemon.
- Connect existing, unchanged Jellyfin Smart TV clients: Android TV, Fire TV, LG webOS, Samsung Tizen, and Roku, plus web and mobile clients.
- Match core library, metadata, search, user/auth, playback, transcode, subtitles, SyncPlay, Live TV, admin, tasks, backup, settings and important first-party features.
- Retain
ffmpeg,ffprobe, Linux filesystems and GPU drivers instead of pointlessly rewriting proven media tools. - Safely import compatible existing library/user data without changing the user's original Jellyfin installation.
Full-port acceptance: all M0βM6 milestones must be met. Passing first TV playback is a major gate but not MVP completion.
ββββββββββ 39.35% β the ledger's milestone/phase/task aggregate; 201 of 513 checks accepted across 171 atomic tasks. The overall percentage is not the simple ratio of passed checks. This is project completion accounting, not a claim of passing CI or Smart TV operation. Every task has evidence-gated checks. See machine-readable ledger, full roadmap, source baseline, port matrix and TV compatibility contract.
Latest verified implementation CI: run 41682776399 β formatting, Clippy, full Rust/HTTP and real-FFmpeg tests, and repository evidence checks. Experimental, explicitly opt-in pelagosExcerptDurationTicks supports authenticated PGS HLS excerpts from longer sources, adaptive renditions, token-scoped next-window navigation, actual subtitle pixels, and rejection of changed source/sidecar revisions. Private continuation and EOF checks are verified in CI 41497147943, restricted-grant and source-invalidation checks in CI 41498489629, and legacy-publication refusal in CI 41498828863. HEAD continuation rejection passed CI 41499770715; continuation preflight admission passed CI 41500180644; authenticated continued-segment byte ranges and HEAD passed CI 41500932162; and capped initial subtitle probes, including HTTP 429 overload behavior, passed CI 41501535670. The refactored continuation interval planner passed CI 41502238432, covering EOF, the PGS PTS ceiling and checked timestamp overflow. The opt-in private HLS continuation now carries monotonic media/discontinuity sequence numbers across independently encoded windows (CI 41506288810). An opt-in read-only, authenticated two-window stitched preview passed real-media and grant-revocation tests (CI 41508111859); live same-source wrong-start rejection also passed (CI 41508391305). Canonical stitched-manifest and segment-order checks passed CI 41551995888. The private preview can now combine up to three already-published adjacent windows (synthetic CI 41553042605, authenticated real-FFmpeg HTTP CI 41555639151). EOF continuation now rechecks token, library grants, media and sidecar revisions after asynchronous FFprobe work (grant-revocation CI 41555848950; sidecar-revision CI 41556174214). An explicit authenticated hls1/{publication_id}/advance.m3u8 request can now publish the immediately adjacent window and return a stitched preview; ?windows=3 requests at most two successors, with EOF clamping (CI 41558628704, CI 41559506914). A stitched preview now advertises an immutable, token-scoped X-Pelagos-Retained-Path URI: completed MPEG-TS roots survive ordinary cache eviction by unrelated clients. At most two retained previews, each with two or three windows, exist globally. Their lifetime covers the preview duration plus one minute, bounded between three and 31 minutes. GET revalidates token, library grants and source/sidecar revisions; authenticated DELETE releases the lease without touching source media. LRU eviction, token isolation and real-FFmpeg HTTP tests passed CI 41562575721; duration-bounded lifetime and HEAD tests passed CI 41563097677; early release passed CI 41563438425. A separate opt-in, token-scoped rolling-start.m3u8 route now publishes a stable X-Pelagos-Rolling-Path URI. Repeated GETs advance one adjacent PGS excerpt when due, retain a sliding three-publication window and only append ENDLIST after confirmed EOF; the playlist's target duration and media/discontinuity sequence rules are enforced. One rolling session is admitted globally, with 15-minute inactivity and 24-hour absolute lifetime limits and token-scoped DELETE release. Explicit rolling-start.m3u8?prebuffer=1 or ?prebuffer=2 can prepare one or two immediate adjacent windows using the same bounded authorized continuation path; the default is no prebuffer. Unfinished startup is not reusable by other callers, and a failed new startup releases its admission slot (CI 41654401426). Real FFmpeg source-EOF prebuffer clamping and release passed CI 41655142618. Read-only retries of an already-ready one-window session passed the real-media regression CI 41655622399. Rolling playlist assembly also checks the session's generation after asynchronous revision authorization, retrying at most three times rather than returning an already-replaced manifest (full real-FFmpeg and matrix verification CI 41657468404). Rolling playlists additionally publish a per-session/per-generation strong ETag: conditional If-None-Match GET may return an empty 304 only after checking the current token, library grant, source and sidecar revision and window generation. A completed EOF transition changes that validator even without another TS segment; the old validator receives the final #EXT-X-ENDLIST playlist (CI 41679489729, 41679999542). Immutable retained.m3u8 previews now also expose a stable lease-scoped ETag and authorize any matching If-None-Match before responding with bodyless 304; wrong-token, revoked-grant and expired/released access remain denied, and the validator persists through unrelated LRU eviction (CI 41682776399). The first real-FFmpeg rolling HTTP and token checks passed CI 41565887805; pinned target duration and true final-source EOF passed CI 41566855022; active-session lifetime checks passed CI 41567534433; real four-window sliding, rotation and old-segment eviction passed CI 41567819202. FFmpeg now independently decodes video and audio from authenticated three-window and shifted rolling HLS snapshots after a local segment rewrite (CI 41668018739); a separate localhost HTTP test verifies token forwarding through the completed retained preview (CI 41668755027). Actual live-rolling URI playback, bounded to 2.5 seconds, passed CI 41669828863. FFmpeg also followed an adaptive master into a nested rendition and decoded audio/video over authenticated HTTP (CI 41670546989), including both X-Emby-Token and Jellyfin-style Authorization: MediaBrowser ... Token=... forms (CI 41670996431). These tests use synthetic sources and an isolated localhost server. All are nonstandard experimental APIs, not a completed Jellyfin multi-hour HLS scheduler, adaptive client parity or verified unmodified Smart TV compatibility. See CI runs for subsequent revisions.
cargo run -- --bind 127.0.0.1 --port 8097
# Read-only offline inventory; no server started, no writes to media:
cargo run -- scan /path/to/authorized/media
# Optional FFprobe metadata inspection (requires the system's ffprobe):
cargo run -- probe /path/to/authorized/media.mp4
# Populate the separate Pelagos SQLite catalog without changing source media:
cargo run -- index /path/to/authorized/media
cargo run -- catalog /path/to/authorized/media
# CLI account bootstrap: user-add reads a password securely from standard input.
# Supply it using a trusted password source piped to:
# cargo run -- user-add admin
# Grant/revoke access to an explicitly indexed media root for a local account:
cargo run -- library-grant viewer /path/to/authorized/media
cargo run -- library-revoke viewer /path/to/authorized/media
# Independently grant/revoke downloading of authorized indexed media:
cargo run -- download-grant viewer
cargo run -- download-revoke viewer
# Opt-in LAN discovery; this does not establish TV login/playback compatibility:
cargo run -- --bind 0.0.0.0 --port 8097 --discover
cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test --all-targetsOpen http://127.0.0.1:8097/web/. JSON diagnostics: /health, /api/pelagos/status. The partially authenticated prototype deliberately defaults to loopback-only and port 8097, avoiding the usual Jellyfin port 8096. UDP discovery is opt-in, on port 7359, only responds to LAN/loopback peers and cannot run alongside another service already bound to that UDP port. Do not expose this build to untrusted networks. Requires a normal Rust toolchain; no Python tooling is required.
Recognized media sidecar images stay indexed but are hidden from standalone photo browsing and Search/Hints, preserving unrelated photos. Artwork GET/HEAD responses now advertise private ETags and return 304 for matching validators; edits invalidate the tag. Primary local artwork is indexed read-only from poster/cover/folder sidecars: video, audio, library and nested-folder DTOs can report ImageTags.Primary; GET/HEAD /Items/{id}/Images/Primary[/0] and GET /Items/{id}/Images are scoped, synthetic-tested subsets. Artwork resizing, images from external providers, blurhash/dimensions and real app compatibility are still open. New partial user-data routes include POST/DELETE /UserPlayedItems/{id}, POST/DELETE /UserFavoriteItems/{id}, and POST /Sessions/Playing[/Progress|/Stopped]. Per-user watched/favorite and direct-play resume positions persist in a separate Pelagos database; item DTOs expose authenticated UserData. An authenticated, chunk-streamed GET /Playback/BitrateTest supports Jellyfin's 1..100000000-byte range without allocating a whole response. PlaybackInfo GET/POST now check requested userId, apply Jellyfin deprecated query-over-body parameter precedence, and explicitly reject unsupported seek/live/stream-selection controls. Session reporting does not yet implement live presence, auto-completion thresholds, WebSocket notifications or non-static playback. The provisional HTTP routes include GET /Search/Hints, GET/HEAD /Audio/{id}/stream?static=true, and POST /Users/AuthenticateByName, GET /Users/Me, POST /Sessions/Logout, GET /UserViews, GET /Items, GET /Items/{id} and GET /Users/{user_id}/Items. The catalog and search routes support recognized type/media filters and require authentication; administrators can see all indexed libraries, while non-administrators have default-deny access with explicit root grants. A user with library access may request GET /Videos/{id}/stream?static=true or HEAD for a previously indexed, unchanged video file, including a single HTTP Range header. Non-static/transcoding requests explicitly return 501. Audio and video static direct play share the same authorization, byte-range and checked-file implementation. Matching original extensions can also be requested through Jellyfin-shaped /Videos/{id}/stream.mp4 and /Audio/{id}/stream.mp3 routes; incompatible container, codec, subtitle or tick-seek requests do not silently claim conversion. On Linux the opened file descriptor is checked against its canonical indexed root before media bytes are sent, guarding the tested symlink-swap race. This is a narrow synthetic-tested direct-file stream, not proof an unmodified TV client works.
Jellyfin's pinned GET /Items/{id}/Ancestors now returns a private immediate-parent-first folder chain with per-user data. GET /UserItems/{id}/UserData and the legacy /Users/{userId}/Items/{id}/UserData return locally persisted per-user watched, favorite and direct-play position fields; cross-account requests are denied and revoked-library items remain undiscoverable. These are synthetic contract subsets, not verified unmodified client navigation or synchronization.
The current authenticated GET /Users/{userId} only resolves the current account; it does not implement administrator enumeration. Indexed media item DTOs now expose a filename-derived Container, but no inferred movie or series classification. The pinned UserData POST route and its legacy URL accept transactional, authorized updates to Played, IsFavorite, PlayCount and PlaybackPositionTicks. Unsupported non-null metadata fields return an explicit error rather than being dropped. These subsets have synthetic CI evidence only; full Jellyfin client behavior is not established.
GET /UserItems/Resume and legacy GET /Users/{userId}/Items/Resume now return permission-scoped video/audio items with positive saved resume ticks, filters, pagination and personal UserData. Positive direct-play progress records an activity timestamp for sorting; unsupported active-session exclusions and unsupported metadata options are rejected. This is not a full Jellyfin resumable-item engine or a real client-tested resume shelf.
A new authenticated GET /Items/Root (and legacy /Users/{userId}/Items/Root) provides a stable virtual user root. GET /Items?parentId=<rootId> navigates only permission-granted collection folders, including empty libraries; ancestor chains connect them to the virtual root. /Items now validates supported SortName, ascending/descending order, user ownership and image/UserData suppression; unsupported sort and field projections return 501. These are synthetic-tested subsets, not full upstream query or real-client parity.
The scoped GET /Library/MediaFolders exposes indexed collection roots, including empty libraries, to administrators only. Ordinary accounts remain forbidden even with media grants, and physical filesystem paths are not included in these DTOs. Hidden/disabled library configuration and full Jellyfin admin behavior remain unimplemented.
System info now reports LocalAddress from a concrete listening IPv4/IPv6 socket, using the actual bound port, never from the incoming HTTP Host header. Wildcard binds intentionally return null rather than an invalid 0.0.0.0 or :: URL. UDP LAN discovery continues to choose its address per requester. This network contract remains synthetic-tested; actual Smart TV connection is not verified.
GET /QuickConnect/Enabled now returns false, while disabled initiation, secret polling and authorization refuse requests without issuing pairing credentials. This deliberately does not implement Jellyfin Quick Connect; manual credentials remain the only preliminary login path. Resume queries now have deterministic automated tests for saved-position newest-first ordering, including when UserData is omitted from display. Both features still require real-client acceptance.
Conservative local SxxEyy recognition now identifies Series, Season and Episode objects only under season-directory agreement, retaining generic Video for unrecognized files. Stable SeriesId/SeasonId references connect the existing virtual folder IDs. Preliminary GET /Shows/{seriesId}/Seasons and /Shows/{seriesId}/Episodes expose permission-scoped results, numeric season/episode order, specials, paging and startItemId continuation. Unsupported options refuse rather than imply metadata that Pelagos lacks. Full naming parity, missing-episode discovery, NextUp and unmodified client acceptance remain open.
Conservative local Movie recognition now requires the video filename and containing folder to match Title (YYYY); otherwise the indexed file stays a generic Video. The Movie DTO exposes a constrained title and ProductionYear, and the shared catalog/search filters recognize Movie and the isMovie query. Existing stable indexed IDs, playback-position state, and per-library access controls remain in place. This is filename evidence only, not automatic movie classification, NFO parsing, provider metadata or verified client parity.
GET /Items/Counts now reports visible indexed media totals and recognized Movie/Series/Episode counts, honoring the authenticated user's own isFavorite state. Other categories remain zero until actual matching classification exists; those zeros are not evidence of full Jellyfin counts parity. Explicit isSeries/isMovie filters now work across /Items and /Search/Hints, including typed Series discovery, without changing default file-only browsing or library access controls.
Personal watched/favorite/resume metadata now loads via bounded SQLite batches rather than a separate query for every media item; regression coverage includes 900+ IDs and enforces isolation and input-order preservation. The pinned GET /Library/PhysicalPaths provides administrators only with configured indexed filesystem roots, while ordinary media DTOs remain pathless. Neither change establishes full upstream migration or real client parity.
Pelagos serves pinned GET /Items/{itemId}/File and HEAD using its indexed, authorized, Linux descriptor-confined original-media reader. Byte ranges, video/audio/photo MIME types, and library revocation are synthetic-tested. The separate pinned GET /Items/{itemId}/Download now supports authenticated original audio/video attachments with safe UTF-8 Content-Disposition, byte ranges, private no-store responses and symlink-escape protection. Download privilege is persisted separately from library visibility: administrators are implicitly allowed, ordinary accounts are default-deny until explicitly granted with the local CLI, and download requires access to the indexed media library as well. This models a preliminary EnableContentDownloading policy field, not the complete upstream CanDownload item policy, telemetry, transcoding or real-client parity. Opaque/unreadable, duplicated, multi-range and unsatisfiable Range requests are rejected with 416 and a size-qualified Content-Range, instead of silently serving the entire original. Full upstream multipart Range parity remains open.
Pelagos now persists a first-indexed timestamp in catalog schema v3, preserving existing items across rescans rather than misrepresenting every refresh as newly added. Pinned GET /Items/Latest and legacy user route provide permission-scoped, newest-first ungrouped media when callers explicitly use groupItems=false. Upstream defaults to grouped shelves; unsupported/default grouping returns 501 until genuine grouping is implemented. Historical v1/v2 data uses the last-seen timestamp as the best available backfill, not a claimed original creation date.
GET /Items and GET /Search/Hints now honor isPlayed and isFavorite from the authenticated account's persisted user data. Filtering occurs before limits and pagination; explicit enableUserData=false suppresses returned personal state without disabling correct filtering. No parent or series-wide watched-state inference is claimed. Tests verify that library revocation and account isolation apply equally to these filtered views.
The latest-media API supports pinned Episode-to-Series grouping for explicit Episode queries and mixed recognized Movie/Episode/Video requests, plus the default groupItems=true when all media visible to the viewer is video. Multiple episodes replace their cards with a Series and accurate ChildCount; a singleton stays an Episode. Movie and generic Video cards remain individual items, and group counts are computed before pagination. Grouped requests involving Audio or Photo (which require unsupported album entities) return 501 instead of inventing results. These are synthetic Rust HTTP-tested subsets, not unmodified-client acceptance.
The pinned GET /Shows/NextUp has an explicitly per-series subset: callers supply seriesId, and Pelagos selects the first recognized unplayed episode after the highest watched season/episode index. enableResumable=false can suppress the selected episode if it has saved progress; startIndex, limit, enableImages and enableUserData are scoped to the authenticated viewer. Broad NextUp discovery, episode versions, specials, cutoff and rewatching remain unsupported, and unmodified-client compatibility is not claimed.
GET /Shows/NextUp now implements both selected-Series behavior (seriesId) and a conservative general feed that includes only visible recognized series with a recorded watch history. The feed chooses each series' next episode after its highest watched index and ranks by the user's latest recorded playback date. It preserves personal authorization, pagination, and basic resume exclusion. Upstream advanced handling of specials, alternate media versions, rewatching, date cutoffs, and library preference exclusions is still unsupported, and unmodified-client compatibility remains untested.
The general GET /Shows/NextUp feed now additionally understands parentId for a permitted library root and an inclusive nextUpDateCutoff in UTC timestamp format. Parent scoping traverses only indexed authorized media nodes; unsupported nested folder/series intersections are explicit 501 responses and inaccessible roots are 404. The cutoff is applied before paging and its parser rejects malformed UTC dates and invalid calendar days. Offset-aware timestamp variations, nested parent views, and unmodified Jellyfin clients are still open.
Pelagos now also serves a pinned, administrator-only read-only GET /Library/VirtualFolders inventory from its indexed roots, with stable identifiers shared with Library/MediaFolders, actual root paths in the privileged Locations field and support for indexed empty libraries. A separate bounded administrator-only POST /Library/VirtualFolders now registers and indexes one existing canonical local directory under an administrator-chosen UTF-8 display name, independent of the physical folder basename. Root and case-insensitive label conflicts are rejected in one SQLite transaction; advanced options/multi-root paths are not silently accepted. The inventory still omits unmodeled CollectionType, LibraryOptions, and refresh metadata; multi-root configuration, library options and real Jellyfin admin-client acceptance remain open. A separate administrator-only POST /Library/VirtualFolders/Name now changes a persisted display name without moving the media folder, changing stable item IDs, or revoking current access grants. It applies to GET /Library/VirtualFolders, media folder DTOs and authorized user views. This is a constrained Pelagos mapping, not full upstream virtual-library rename parity. A separate bounded administrator-only DELETE /Library/VirtualFolders?name=... removes the registered root and its user-library grants in one attached SQLite transaction without deleting media. Offline roots can be unregistered, ambiguous names return 409, and re-registering requires fresh grants; full lifecycle and client compatibility remain unverified.
Pelagos now supports a narrow, genuine indexed-local-media subset of pinned GET /Items/{itemId}/ThemeSongs, /ThemeVideos and /ThemeMedia. For authorized movie folders or recognized series, direct audio named theme, audio inside theme-music, and videos inside backdrops are returned as media DTOs with ExtraType=ThemeSong or ThemeVideo; returned IDs are synthetic-tested against direct-play routes. SortName ascending/descending and scoped inheritFromParent=true are recognized, with song and video fallback resolved independently through the indexed parent tree. Unsupported sorting remains an explicit 501. A music track in the collection root is not silently attached to unrelated movies. No metadata provider, arbitrary extras rule, complete parent traversal, or unmodified client acceptance is claimed. (CI 40037734907).
Pelagos supports a restricted administrator-only POST /Library/Refresh. It synchronously rescans only roots previously registered in Pelagos, commits all library updates within one SQLite transaction, refuses missing/redirected roots with 503 without deleting existing records, and never writes to media. Unlike upstream Jellyfin v12.3, which schedules a scan, the native subset returns 204 after the scan completes. Async task lifecycle, real-client acceptance and scale/concurrency gates remain open (CI 40039692258).
A pinned administrator-only POST /Users/New subset now creates password-backed ordinary Pelagos accounts using the existing Argon2 credential store. It requires the CLI-bootstrap administrator, strictly accepts Name and Password, rejects privilege-control fields, and never returns the password. The response is a limited Pelagos User DTO, not Jellyfin's full UserDto; passwordless accounts, user updates/deletion and real-client acceptance remain open (CI 40043498922).
The administrator account API now includes protected GET /Users listing and disabled filtering, limited GET /Users/{userId} inspection, and a strict POST /Users/{userId}/Policy subset accepting only IsDisabled. Disabling an ordinary account revokes outstanding tokens immediately; disabling any administrator is refused. Unsupported policy fields are rejected. Account listing, policy changes, and ID lookup passed native CI (run 40044882895). Full Jellyfin user policy and real-client parity remain open.
A strict POST /Users/{userId} subset now permits an administrator to update only the account's Name; the account ID, current sessions, password hash, and per-library permissions remain unchanged. Existing tokens immediately report the new username, while the old username no longer authenticates. Unimplemented UserDto fields are rejected, not silently ignored (CI 40045301553).
A restricted POST /Users/{userId}/Password permits an authenticated administrator to replace a non-administrator password without exposing credentials. The password is Argon2-hashed, all existing user tokens are revoked in one transaction, and prior login credentials stop working. Current-password and passwordless reset flows are not modeled (CI 40045690959).
Rust owns HTTP, protocols, indexing, metadata, state, playback negotiations, and FFmpeg supervision. A lightweight browser admin shell is included as a scaffold. The system supports Linux-first development, with EndeavourOS/Hyprland a primary target. The existing user-installed Jellyfin server remains independent and untouched.
Architecture Β· Pinned API attributes Β· Compatibility Β· Provenance and licensing Β· Tracking.
Pelagos is independent of and not endorsed by Jellyfin. This repository retains its original MIT license for independently authored implementation; Jellyfin's GPL-2.0 source must not be copied/translated without meeting derivative-work licensing obligations.
Pelagos implements a deliberately narrow authenticated GET /Items/{itemId}/Collections subset for visible, indexed items. It returns Jellyfin's query wrapper with an empty Items array and zero TotalRecordCount, because Pelagos has not indexed any BoxSets or collection memberships. Nonexistent or inaccessible items yield 404, other-user requests are refused, and unsupported rich field projections yield 501. Paging fields are accepted and preserved. This is tested server behavior, not real BoxSet support or TV-client acceptance (CI 40031984883).