The Local Media Source
All local libraries belong to a singleLocalMediaSource. Unlike Plex, Jellyfin, or Emby, the local source has no connection parameters, authentication tokens, or remote server to contact. It exists purely as a container that groups local libraries together under a single source entry in the ErsatzTV database.
Each LocalLibrary is a named library associated with the local source. It carries:
A
LibraryPath holds the actual folder path that ErsatzTV scans:
Within each path, ErsatzTV tracks individual subdirectories as
LibraryFolder records. Each folder has a path, an optional parent folder reference (for nested structures), an Etag for change detection, and links to the MediaFile records found inside it. Image folders additionally support a ImageFolderDuration that controls how long each image is displayed on screen.
Supported Media Kinds
When creating a local library you select aLibraryMediaKind that tells ErsatzTV what kind of content to expect and how to parse metadata. The media kind cannot be changed after a library is created.
Adding a Local Library
1
Open Local Libraries
In the ErsatzTV sidebar, navigate to Media Sources → Local Libraries (served at
/media/sources/local). A table lists all existing local libraries with their names and media kinds.2
Create a New Library
Click Add Local Library. The editor opens at
/media/sources/local/add.3
Name the Library
Enter a descriptive name in the Name field. This name appears throughout the ErsatzTV UI (schedules, search results, channel programming). Examples:
Feature Films, Kids Shows, Concert Videos.4
Choose a Media Kind
Select the appropriate Media Kind from the dropdown. This selection is permanent and determines how ErsatzTV parses and organizes the files it finds.
5
Add One or More Paths
Type a directory path into the Path field and click Add Path. ErsatzTV validates that the path exists on the file system before accepting it. Repeat to add additional paths — a single library can span multiple directories. Example paths:
/media/movies/mnt/nas/tv/dramaD:\Media\MusicVideos(Windows hosts)
6
Save the Library
Click Add Local Library (or Save Local Library for an existing one). ErsatzTV creates the library and its path records. The library now appears in the list.
7
Trigger a Scan
The library does not contain any media until it is scanned. Trigger a scan from the library list or via the API. See Scanning below.
Scanning Local Libraries
ErsatzTV walks the directories in your library paths and builds an index of all media files it finds. Two scan modes are available:- Regular Scan
- Deep Scan
A regular (quick) scan compares directory etags against what ErsatzTV last recorded. Folders whose contents have not changed are skipped, making periodic scans fast even for large libraries. New files, modified files, and deleted files are all handled automatically.
Scan Library via API
{id} with the ErsatzTV library ID shown in the URL when editing the library. Returns 200 OK when queued or 404 Not Found if the library does not exist.
Scan a Single Show via API
ForShows libraries, you can target a single TV show instead of rescanning the entire library:
Returns
400 Bad Request if the show is not found in the library or the library does not support single-show scanning. Targeted deep scans will also extract embedded text subtitles for the scanned show if that feature is enabled in Settings.
Single-show scanning is also accessible from the show detail page in the ErsatzTV UI via the Scan button. This is useful when you add a new season or want to force a metadata refresh for one series without waiting for a full library scan.
Subtitle Support
ErsatzTV automatically discovers and indexes subtitles found alongside your media files. Two subtitle delivery mechanisms are supported:Sidecar Subtitles
Sidecar subtitles are separate files placed in the same folder as the video file, following a naming convention. Common formats recognized:- SRT (
.srt) — SubRip text subtitles - ASS / SSA (
.ass,.ssa) — Advanced SubStation Alpha - WebVTT (
.vtt) — Web Video Text Tracks
movie.en.srt → English). When no language can be determined from the file name, ErsatzTV assigns the und (undetermined) language tag.
A known issue was fixed where content with multiple sidecar subtitles would have subtitle metadata incorrectly merged (e.g. language codes mixing between files). If you experienced this, the next local library scan will automatically clean up the affected records.
Embedded Subtitles
ErsatzTV also indexes subtitle streams embedded inside video files. Each embedded subtitle track is represented as aSubtitle record with:
Text-based embedded subtitles (SRT, ASS, WebVTT, MOV text) can be extracted to disk by enabling Extract Embedded Text Subtitles in ErsatzTV’s Settings. Once extracted, they behave identically to sidecar subtitles during playback.
Image-based subtitle formats — including PGS (
hdmv_pgs_subtitle, pgssub), DVD subtitles (dvd_subtitle, dvdsub), and VobSub (vobsub) — are detected but not extracted; they are handled at transcode time.
A fix resolved an edge case where an embedded subtitle with stream index zero would create an invalid subtitle record. Affected items will be automatically cleaned up on the next local library scan.
Managing Library Paths
A single local library can have multiple directory paths. All paths must exist on the file system at the time they are added. You can:- Add a path by typing in the Path field and clicking Add Path
- Delete a path by clicking the delete icon next to it in the library editor — you will be shown how many media items will be removed
- Move a path to a different library by clicking the move icon — useful when reorganizing content between libraries without losing playout history
Running ErsatzTV in Docker
When ErsatzTV runs in a Docker container, the host paths to your media must be mounted into the container. The path you enter in the local library editor must be the path inside the container, not the path on your host./media/movies (inside the container) corresponds to /srv/media/movies on the host. When adding the library in ErsatzTV, enter the container-side path (/media/movies).
For more container configuration options including NVIDIA GPU passthrough, see Docker Operations.
Supported File Formats
ErsatzTV leverages FFmpeg for media analysis and playback, so any container format that FFmpeg can read is supported. Commonly used formats include:- Video containers: MKV, MP4, AVI, MOV, TS, M2TS, WEBM, FLV
- Audio containers (Songs): MP3, FLAC, OGG, AAC, M4A, WAV, OPUS
- Image formats (Images): JPEG, PNG, GIF, WebP, BMP, TIFF
.nfo) following the Kodi/Jellyfin naming convention are parsed for additional metadata (titles, years, plot summaries, ratings, tags) and take precedence over data embedded in the media file.
Related Pages
API: Libraries
Reference for the
/api/libraries/{id}/scan and /api/libraries/{id}/scan-show endpoints.Docker Operations
Container deployment guide including volume mount patterns for media directories.
